USB keyboard / mouse does not wake computer from sleep

Bug #1873885 reported by Guillaume Michaud
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I use a USB Logitech keyboard & mouse combo with a Logitech USB "Unifying" receiver.
With Ubuntu 19.10, moving the mouse or hitting a key woke the computer from sleep.
With Ubuntu 20.04, it does not work anymore.

~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:0a2b Intel Corp.
Bus 001 Device 003: ID 0bda:58d2 Realtek Semiconductor Corp. USB2.0 HD UVC WebCam
Bus 001 Device 015: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: guillaume 1726 F.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: GNOME
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2020-04-11 (9 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Beta amd64 (20200409)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 004: ID 8087:0a2b Intel Corp.
 Bus 001 Device 003: ID 0bda:58d2 Realtek Semiconductor Corp. USB2.0 HD UVC WebCam
 Bus 001 Device 008: ID 046d:c52b Logitech, Inc. Unifying Receiver
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: ASUSTeK COMPUTER INC. UX410UAK
Package: linux (not installed)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.4.0-25-generic root=/dev/mapper/vgubuntu-root ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 5.4.0-25.29-generic 5.4.30
RelatedPackageVersions:
 linux-restricted-modules-5.4.0-25-generic N/A
 linux-backports-modules-5.4.0-25-generic N/A
 linux-firmware 1.187
Tags: focal wayland-session
Uname: Linux 5.4.0-25-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 04/17/2019
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: UX410UAK.312
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: UX410UAK
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrUX410UAK.312:bd04/17/2019:svnASUSTeKCOMPUTERINC.:pnUX410UAK:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnUX410UAK:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
dmi.product.family: ZenBook
dmi.product.name: UX410UAK
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1873885/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Guillaume Michaud (gfmichaud) wrote :

I followed https://askubuntu.com/questions/848698/wake-up-from-suspend-using-wireless-usb-keyboard-or-mouse-for-any-linux-distro and created those to files but that didn't help:

guillaume@massada:~$ cat /etc/rc.local
echo enabled > /sys/bus/usb/devices/1-1/power/wakeup
echo enabled > /sys/bus/usb/devices/1-2/power/wakeup
echo enabled > /sys/bus/usb/devices/1-3/power/wakeup
echo enabled > /sys/bus/usb/devices/usb1/power/wakeup
echo enabled > /sys/bus/usb/devices/usb2/power/wakeup

guillaume@massada:~$ cat /etc/udev/rules.d/10-wakeup.rules
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b" RUN+="/bin/sh -c 'echo enabled > /sys/bus/usb/devices/1-1/power/wakeup'"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b" RUN+="/bin/sh -c 'echo enabled > /sys/bus/usb/devices/1-2/power/wakeup'"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b" RUN+="/bin/sh -c 'echo enabled > /sys/bus/usb/devices/1-3/power/wakeup'"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b" RUN+="/bin/sh -c 'echo enabled > /sys/bus/usb/devices/usb1/power/wakeup'"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b" RUN+="/bin/sh -c 'echo enabled > /sys/bus/usb/devices/usb2/power/wakeup'"

affects: ubuntu → linux (Ubuntu)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1873885

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Guillaume Michaud (gfmichaud) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected focal wayland-session
description: updated
Revision history for this message
Guillaume Michaud (gfmichaud) wrote : CRDA.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : IwConfig.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : Lspci.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : Lspci-vt.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : Lsusb-t.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : Lsusb-v.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : ProcModules.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : PulseList.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : RfKill.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : UdevDb.txt

apport information

Revision history for this message
Guillaume Michaud (gfmichaud) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Guillaume Michaud (gfmichaud) wrote :

I noticed the issue only occurs when on battery.
If this is the intended behaviour (it could be that, for powersaving, USB ports stop being alimented while on sleep?), please close this bug.

Revision history for this message
Guillaume Michaud (gfmichaud) wrote :

New testing today, with latest kernel update.

Booting with Unifying dongle plugged in:

guillaume@massada:~$ uname -a
Linux massada 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
guillaume@massada:~$ grep . /sys/bus/usb/devices/*/power/wakeup
/sys/bus/usb/devices/1-2/power/wakeup:enabled
/sys/bus/usb/devices/1-8/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled

Unplugging the dongle, and then plugging it again, same USB port:

guillaume@massada:~$ grep . /sys/bus/usb/devices/*/power/wakeup
/sys/bus/usb/devices/1-2/power/wakeup:disabled
/sys/bus/usb/devices/1-8/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled

Waking the computer from sleep with mouse or keyboard does not work anymore.

guillaume@massada:~$ sudo -s
root@massada:/home/guillaume# echo "enabled" > /sys/bus/usb/devices/1-2/power/wakeup
root@massada:/home/guillaume# exit
guillaume@massada:~$ grep . /sys/bus/usb/devices/*/power/wakeup
/sys/bus/usb/devices/1-2/power/wakeup:enabled
/sys/bus/usb/devices/1-8/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled

Waking the computer from sleep with mouse or keyboard works again!

>> This should be re-enabled by default whenever you (re)plug such a dongle.

Revision history for this message
Guillaume Michaud (gfmichaud) wrote :

Workaround :
Put in /etc/udev/rules.d/10-wakeup.rules
The folliwing lines
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b" RUN+="/bin/sh -c 'echo enabled > /sys/bus/usb/devices/1-1/power/wakeup'"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b" RUN+="/bin/sh -c 'echo enabled > /sys/bus/usb/devices/1-2/power/wakeup'"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c52b" RUN+="/bin/sh -c 'echo enabled > /sys/bus/usb/devices/1-3/power/wakeup'"

But this will only work for my computer and my dongle.

I guess something has changed in the kernel config or somewhere else, because
- this same workaround did not work a few days ago (cf. comment #2)
- the use of battery or AC power does not change anything (contrary to comment #20)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.