News for hackers. Stuff that matters.
Re:Why does Linux have so much trouble sleeping and waking? by chadlavi on Friday December 11, 2020 @02:52PM (#25390065)
> I've never experimented with auto-suspend on lid close and auto-resume on open; maybe that's what's more troublesome.

That's what 99% of all laptop users would like a laptop be able to do, no? At the very least auto-suspend on close.

Re:Why does Linux have so much trouble sleeping and waking? by MarkusWandel on Friday December 11, 2020 @04:09PM (#25391013)
Auto-suspend on lid close is a feature that I hate. Even on my work Windows laptop, I can never be sure that it will suspend, and half the time you wish it wouldn't because then your VPN connection will time out, etc. Thus people walking around with their laptop open a couple of inches. Much better to completely disable auto-suspend and get used to just pushing the suspend button and waiting the couple of seconds for it to react and then closing the lid.

That's the main reason I can't even be bothered to configure this (as in from the GUI) on my Linux machines.

Re:Why does Linux have so much trouble sleeping and waking? by hsitz on Friday December 11, 2020 @04:53PM (#25391685)
I understand that. My Linux machine is a 2015 Asus UX305 laptop. Suspend/resume works under Ubuntu's desktop, but I use i3wm, which requires the user to enable features like that themselves. I never did get auto-suspend to work, but I was able to get suspend to work when I attached to a hotkey. So instead of closing lid (or having auto-suspend after, say, 30 minutes inactivity), I just press the hotkey to have the machine suspend. I grew to prefer this to lid-closing. (Auto-resume always worked fine under i3wm, just press any key and it started up).
Re:Why does Linux have so much trouble sleeping and waking? by javier2 on Saturday December 12, 2020 @04:47PM (#25402034)
The Asus UX3xx series has been working near flawless for me. I now have a ryzen based matebook that is quite moody wrt to suspend. I havent used hibernate in over 10 years.
Re:Why does Linux have so much trouble sleeping and waking? by MarkusWandel on Friday December 11, 2020 @04:11PM (#25391042)
And what I mean by "flawless" is that the machine can be suspended and unsuspended hundreds of times between reboots, and that suspend/resume are quick. This definition of "flawless" also applies to the laptop that has the workaround on it. Kiddie laptops in this household aren't the most modern ones and reboots require patience.
Re:Why does Linux have so much trouble sleeping and waking? by chadlavi on Friday December 11, 2020 @11:05PM (#25395417)
As a Mac user this is pure madness to me.
Re:Why does Linux have so much trouble sleeping and waking? by ACow_Adonis on Friday December 11, 2020 @03:23PM (#25390481)
maybe that's the issue: as a hacker/ programmer/ data scientist, I spend my life trying to get the computer to not sleep/ suspend when I walk away because it's generally doing something.

My use case is in direct contrast to the 99%, and with Linux being focused on a technical audience, it gets short shrift in terms of priorities/ resources.

(honestly, most of my computers are generally set to no automatic sleeping/ suspension)

Re:Why does Linux have so much trouble sleeping and waking? by BHSPitMonkey on Friday December 11, 2020 @03:34PM (#25390608)
I can't remember how many times in the last few years I've shut/stowed my ThinkPad, commuted home, and opened my backpack to find it burning hot and drained of battery because it either failed to sleep on close or reawakened itself while put away.

Even now, turning off or disconnecting my Bluetooth headphones causes my modern/up-to-date Linux machines to reawake if they were connected before sleep, which inevitably causes my monitors to come back online and fill my room with light and fan noise while I'm trying to put _myself_ to sleep...

Re:Why does Linux have so much trouble sleeping and waking? by freedomben on Friday December 11, 2020 @03:43PM (#25390706)
Me too. I happens just often enough that I get complacent and forget to check D-:

I have a habit now of just running:

    systemctl suspend -i
Before closing the lid. Wake ups always work. That will suspend even if some applications is blocking suspends.
Re:Why does Linux have so much trouble sleeping and waking? by core-questions on Friday December 11, 2020 @04:42PM (#25391464)
> opened my backpack to find it burning hot

Right? It's like, trying to suffocate itself. I just turn the damned thing off before going home now.

Re:Why does Linux have so much trouble sleeping and waking? by IfOnlyYouKnew on Friday December 11, 2020 @03:45PM (#25390749)
This comment is baffling...

If I get it right, it's saying that Linux is intentionally bad at shutdown / hibernation because that's how its users want it. And users want it because they are better users than other users: they are "professionals", whose computers never sleep.

So, if you are using an OS that actually works as expected, that's just proof that you're an amateur.

(and let's ignore the mention of the lid being closed. Because that would be devastating to this argument)

Re:Why does Linux have so much trouble sleeping and waking? by ACow_Adonis on Saturday December 12, 2020 @06:03AM (#25397475)
I didn't say Linux is intentionally bad at hibernation/shutdown: I said maybe it's not a priority in terms of resources/focus.

At no point did I say users want it to be bad at shutdown/hibernation.

I said for my job/use-case, I spend most of my time trying to stop the computer from sleeping. I posted this because the comment I was responding to said that 99% of users wanted the computer to sleep on lid-shut, and I thought I'd contribute to point out that's the opposite of my use case (indeed, I pretty much want the computer to never sleep on lid-shut). And i run linux as the primary OS on pretty much all my computers. A lot of linux users are also probably coming from a background where computers didn't sleep/shutdown very often.

I didn't use the word amateur. I didn't use the word professional. I didn't mention anything about using an OS that works as expected. I listed my background and use case.

I didn't say anything about any users being better than others.

I do think, based on all that, you may have some sensitivities that made you interpret things in a particular light.

Re:Why does Linux have so much trouble sleeping and waking? by chadlavi on Friday December 11, 2020 @03:33PM (#25390601)
> auto-suspend on lid close

on lid close being the operative term here.