Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Laptop will not wake from suspend with usb-keyboard

The actually weird thing is that my usb-keyboard shows as wakeup enabled.

grep . /sys/bus/usb/devices/*/product

outputs

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

/sys/bus/usb/devices/2-2/product:Mechanical Keyboard
/sys/bus/usb/devices/2-3/product:USB OPTICAL MOUSE 
/sys/bus/usb/devices/usb1/product:EHCI Host Controller
/sys/bus/usb/devices/usb2/product:xHCI Host Controller
/sys/bus/usb/devices/usb3/product:xHCI Host Controller

and

grep . /sys/bus/usb/devices/*/power/wakeup

outputs

/sys/bus/usb/devices/1-1/power/wakeup:disabled
/sys/bus/usb/devices/2-2/power/wakeup:enabled
/sys/bus/usb/devices/2-3/power/wakeup:enabled
/sys/bus/usb/devices/2-5/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:enabled
/sys/bus/usb/devices/usb3/power/wakeup:disabled

Now, I admit, my laptop setup is a little weird in that I have disconnected both the laptop screen, built-in keyboard and touchpad. I only reconnect them prior to travelling and then, only reluctantly.
But that shouldn’t matter because,

a) it has presented no other problems

b) when I reconnect them, waking from the usb-keyboard still doesn’t work. Waking from the built-in keyboard works just fine.

I run Ubuntu 20.04.3 LTS and always avoid major under the hood tinkering if I can, if that helps. The laptop is an Acer Travelmate p256-mg.

>Solution :

This is something that I have seen in the past on an HP ProBook and a Dell Precision notebook. The issue came down to the machine not quite going to sleep and, because it wasn’t sleeping, it couldn’t be woken with a keypress from an external keyboard. Like your machine, though, the built-in keyboard would allow the machine to resume. In the end, the solution was to modify Grub a bit.

Here is how you can do it, too:

  1. Open a Terminal (if it’s not already open)

  2. Open /etc/default/grub for editing with sudo:

    sudo {editor of choice} /etc/default/grub 
    

    Note: Be sure to replace {editor of choice} with your editor of choice.

    Find the line that starts GRUB_CMDLINE_LINUX_DEFAULT. You will be adding settings to this line. Be sure to leave any existing values untouched.

  3. If you have an Nvidia video adapter, add rcutree.rcu_idle_gp_delay=1 to the end of the GRUB_CMDLINE_LINUX_DEFAULT value. For example:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rcutree.rcu_idle_gp_delay=1"
    

    Note: There are instances where an Nvidia device can prevent a machine from entering into sleep/standby, and this is an effective solution.

  4. Add mem_sleep_default=deep to GRUB_CMDLINE_LINUX_DEFAULT, ensuring memory is completely recorded to the storage device when entering sleep. You may now have something like this

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rcutree.rcu_idle_gp_delay=1 mem_sleep_default=deep"
    

    Note: This has generally been the setting I’ve needed to configure in order to resolve the external keyboard issue.

  5. Save the file

  6. Update Grub:

    sudo update-grub
    
  7. Reboot.

This should ensure the notebook enters a proper sleep state, allowing it to now properly respond to wake actions.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading