Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Suspend, hibernate will not stay "asleep" on second attemp
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Btoo
n00b
n00b


Joined: 24 Sep 2008
Posts: 42
Location: An isolated island

PostPosted: Wed Nov 14, 2012 12:21 am    Post subject: Suspend, hibernate will not stay "asleep" on secon Reply with quote

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
View user's profile Send private message
Btoo
n00b
n00b


Joined: 24 Sep 2008
Posts: 42
Location: An isolated island

PostPosted: Thu Nov 22, 2012 7:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
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