View previous topic :: View next topic |
Author |
Message |
Btoo n00b
Joined: 24 Sep 2008 Posts: 42 Location: An isolated island
|
Posted: Wed Nov 14, 2012 12:21 am Post subject: Suspend, hibernate will not stay "asleep" on secon |
|
|
Hi all, I have both sleep and hibernation working and prefer sleep because of the speed of wake-up vs the slower hibernation "reboot". Problem is I would like to put the computer to sleep more than once before a power off or reboot but I have to always power off after the first sleep because it immediately re-awakens on the second attempt.
On the second sleep attempt the computer goes all the way to sleep but then wakes up immediately with no input. I would guess it has something to do with swap containing all the necessary info to wake up since it did so already the first time. I would guess, but have no real idea why this is happening.
Last edited by Btoo on Thu Nov 22, 2012 7:24 pm; edited 2 times in total |
|
Back to top |
|
|
Btoo n00b
Joined: 24 Sep 2008 Posts: 42 Location: An isolated island
|
Posted: Thu Nov 22, 2012 7:20 pm Post subject: |
|
|
I was able to fix this by checking /proc/acpi/wakeup to see what was enabled to wake the system. /proc/acpi is a deprecated kernel item but was very useful for troubleshooting. Digging around in /sys/power/state was a pain and not particularly useful.
In /proc/acpi/wakeup my usb devices were all that were enabled. Strangely the power button was not listed at all. Changes to /proc/acpi/wakeup are NOT persistent across reboots or even awaking from suspend.
Then after some googling pm-utils and reading many pages I came across disabling the USB driver modules xhci_hcd and ehci_hcd on suspend, which pm-utils will re-enable on wakeup.
To disable the USB modules, well first I had to check which drivers were in use with lspci -k. I should not that if your usb drivers are not compiled as modules they will need to be for this to work, which I needed to do myself.
Then I added a file to /etc/pm/config.d/
Code: | #modules (file name)
SUSPEND_MODULES="xhci_hcd ehci_hcd"
|
These two modules will be suspended in terms of wakeup, this means my usb keyboard and mouse will NOT wake the computer. I can now use the power button to wake the computer and accidental mouse movement will not wake up the machine ( an annoyance for sure). Many posts I have read are searching for the exact opposite of this solution. People have been having trouble getting the usb to wake the computer.
The only issue I have now is that on the second or subsequent suspends the Logitech wireless mouse and keyboard are inactive until I unplug and replug in the wireless USB receiver. So the modules are reloaded but the state information is lacking. Short of getting a PS/2 keyboard I would rather fix this. I would guess I could restart or SIGHUP? to re-detect the USB. Any help with this would be appreciated! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|