-
Notifications
You must be signed in to change notification settings - Fork 31
Suspend not working #1
Comments
Hey there thanks for the heads up, I'm assuming you've replaced username with your own username? You can follow the following to make a script that stops/starts the service pre and post suspend: https://wiki.archlinux.org/index.php/Power_management#Hooks_in_.2Fusr.2Flib.2Fsystemd.2Fsystem-sleep The script would probably look something like this:
See how that goes. |
Here is the result:
It does disable the service, but still wont suspend successful. Adding a sleep
does magic and works.. but sounds like an ugly hack to me. |
That's interesting - I actually don't have this problem on my Yoga (running KDE 4.14 though) so I can not troubleshoot it myself. The next step I suppose would be determining whether it is the yoga-rotate or yoga-tablet script which wakes up the computer. Can you keep yoga-rotate stopped/disabled and yoga-tablet on and see if suspend works as intended? |
I did check this already, But I will retry/reconfirm, this evening (GMT+1). |
Found the problem. Simple test case:
My system if it helps: Suspending with |
Hi KoKuToru, Running your script (all though the accelerometer is in device iio:device4) does not break suspend for me using the same DE and command. I am using the latest Arch Kernel though. Is this still a problem for you? Do you have the i5 or i7 version of the laptop? By the sounds of it though, disabling the service before suspend may be the simplest solution as you have to read from the accelerometer for natural rotation. I'll leave this open in case others may have a solution. Cheers, |
I was having the same problem, on an i7 version of the Yoga, using any of the DEs. What seems to have fixed it is to allow the ST_SENSOR_HUB USB device to be suspended. On my machine:
You can also set this using e.g. powertop (although that doesn't make the setting permanent). |
I have pretty same issue, and unfortunately solution suggestd by @oggy- doesn't work. |
Finally found a fancy solution here https://wiki.archlinux.org/index.php/Powertop Hm, played a bit more, it works on first suspend attempt but then, being resumed once, don't want to do it again and even manual running of |
I have 4.0.1 kernel on ARCH distribution and gnome 3.16. With or without these scripts, the suspend doesn't work. It just wakes up after a second, by examining journalct it happens due to ACPI call. |
@pfulop I managed to fix it with metioned above workaround in combination with powertop daemon. The last one might not be required, but I found it useful and keep it.
Finally I faced another issue: laptop won't wake up normally in some cases and getting stuck immediate after sleep but it seems like many of thinkpad laptops suffering from this issue. And disabling usb 3.0 mode in bios is the only fix. Lenovo started to fix this with bios update for some models. |
@iRet Well my problem happens even without these services on my system, it can be clean install. I would say it's more of kernel problem probably not turning off usb devices that has wake allowed? |
@pfulop Without services it sleeps fine on my side except the problem I mentioned related to usb 3.0. I'm on 4 kernel but latest from 3 branch works the same way. I'm not actually tested on a clean system, usually installing at least |
@iRet tlp standalone no, but powertop did the trick |
The problem also reappeared on my computer with 4.0 kernels. The following did the trick:
|
@oggy- thanks, that's interesting. |
@iRet the problem of not going to sleep (or rather, waking up immediately). I have also had problems with the system refusing to wake up intermittently, but not recently (I wasn't able to pin down what caused it and whether it was related to the scripts). |
Finally I found my hangs while waking up was related to 4.0 kernel and 3.16 as well as 3.19 not hangs. |
Thank you all for this scripts and sharing your experience. Recently I too installed these scripts in my Thinkpad Yoga 20C0, and I too was facing the problem of suspend not working as expected. As everyone was facing, my system too wakes up immediately after suspending. But the rest of the stuff are working, except for the button to toggle auto-rotate (is it supposed to work?). I tried to isolate the the cause to one or few of the scripts, and I couldn't, I tried all 16 permutation of the four services/scripts (if anyone is interested in the results please let me know). Anyway I tried the methods described above to disable the scripts just before suspending and restarting immediately after resuming. I tried the above method as well as implementing the same operation with Another weird thing is that, if I manually stop the scripts and then suspend, it works. But if I write a small shell script for doing them same, /usr/bin/systemctl stop [email protected] /usr/bin/systemctl stop [email protected] /usr/bin/systemctl stop yoga-tablet.service /usr/bin/systemctl stop yoga-backlight.service sleep 5 systemctl suspend It doesn't, Interesting!!. FInally, I went through the |
I've got a Lenovo Yoga S1 (20CD), and while not running any script, it would also have similar issues with auto-resume after a few seconds. I'm running a kernel 4.6, with Ubuntu 16.04. It used to work up to Ubuntu 15.10. I've noticed that |
I have another issue as of now, EDIT:- checking |
When doing
systemctl start [email protected]
or
systemctl start yoga-tablet.service
.Suspend stops working, immediately wakes up.
Is there a way to stop the service
when going to suspend and
restart when suspend ends ?
*Suspend by laptop lid close in Gnome 3.14.
The text was updated successfully, but these errors were encountered: