4 ms·
I run a number of Linux laptops ranging from 10 to 3 years old (i.e. nothing bleeding edge) and except for one long retired ancient one, and one in current use,
by MarkusWandel 6y ago
I run a number of Linux laptops ranging from 10 to 3 years old (i.e. nothing bleeding edge) and except for one long retired ancient one, and one in current use, suspend/resume has been flawless (hibernate not so much; if the kids leave one unplugged and it auto-hibernate as the battery runs low, it seems about 50/50 success whether it emerges from hibernation in a usable state).
Now what is not flawless: There are any number of ACPI things that, if set, will immediately re-wake the computer once suspended. The following script is on my current problematic one as /usr/lib/systemd/system-sleep/wakefix.pl
#!/usr/bin/perl
open(FILE,"/proc/acpi/wakeup");
while(<FILE>) {
chomp;
if(/enabled/) {
($a,$b) = split / /;
system("echo $a >/proc/acpi/wakeup");
}
}
[Sorry about the mangled formatting]
It just turns off everything that is enabled to wake the machine up. As this list happens not to include the power button - the only thing I want to be able to wake the laptop up - this works fine.
I've never experimented with auto-suspend on lid close and auto-resume on open; maybe that's what's more troublesome.
Another thing that's not suspend-resume, but nonetheless annoying - if the machine is running an SDL fullscreen thing (Tuxpaint) or if the MATE desktop has a pop-up menu open, the power button won't suspend the computer, because something intercepts the button press.
My experience with suspend/resume on Desktop machines has been 100% bad, on the other hand. Usually they suspend just fine, but don't resume to a usable state.
- rektide 6y agoYour experiences matches my own closely. My desktop machines have done as well though! Suspend/resume to memory and to disk have been exceedingly reliable on every machine I've touched for a decade for me. On my old Dell convertible laptop, the wifi would only turn on every other time it woke up. The machines waking up is a real problem. I have `HandleLidSwitch=ignore` in systemd's logind.conf[1]. I see there are other options though, which I might also try setting to ignore. I too sometimes have unexpected wakeups. I'd like to learn more about how to debug these. I've asked twice on IRC & gotten no reply. My backup plan has been to write a daemon to make the system go to sleep, and whenever it wakes up, put it back to sleep, unless I "disarm" the daemon. I'm in a fairly low-visibility environment now though- I feel like I should work the problem some, fix whatever is going wrong, rather than hack around, but I have not been successful at figuring out second steps in debugging systemd daemons, once `systemd status` & upping the logging level falls short. I too have problems with some desktop things intercepting my power button, which again, I wish I had better visibility in to. I don't know other than trial & error to figure out who might be grabbing the input devices. [1] https://www.freedesktop.org/software/systemd/man/logind.conf.htmlloginctl https://www.freedesktop.org/software/systemd/man/logind.conf....
- chadlavi 6y ago> 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.
- ACow_Adonis 6y agomaybe 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)
- chadlavi 6y ago> auto-suspend on lid close on lid close being the operative term here.
- BHSPitMonkey 6y agoI 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...
- freedomben 6y agoMe 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.
- 6y ago
- dmd 6y ago> Usually they suspend just fine, but don't resume to a usable state. Kind of like cryonics then?
- tluyben2 6y agoI use x220s (2011) for just about anything and everything is flawless with them. Including auto suspend on lid close and resume on open. Same experience on a few newer Dell laptops I was gifted ( will look up the types in the morning if anyone cares; I do not like the keyboards vs the x220 so I do not use them much ). I run the latest Ubuntu with i3 and my own scripts (which I have been tweaking over the years) to fix battery life etc. What machines did you try?
- cactus2093 6y agoNo offense to you, but if this isn't the most Linux user's answer I've ever read... The first line seems to disagree that there's any issue, says it has been "flawless". Then goes on to list what I would certainly consider some very big flaws which can only be partially worked around with custom shell scripts and the like.
- mulmen 6y agoGP said several laptops were flawless but one of them was problematic and required the custom scripts.
- breakfastduck 6y agoAuto suspend on lid close / open is probably the most important feature I can imagine on a laptop. And people actually expect Linux to win over the desktop crowd when it can’t support even the most basic features consumers expect.