This is a fix for Klim Dash USB keyboard not resuming after sleep on Ubuntu 20.04 based systems. Adapted from the Sharkoon PureWriter fix as seen at https://forum.hardware.fr/hfr/OSAlternatifs/Installation/integristes-barbus-femmes-sujet_12264_631.htm#t1445595
Check lsusb
output to ensure that's the correct device:
Bus 001 Device 015: ID 04d9:a231 Holtek Semiconductor, Inc. USB-HID Keyboard
Create files /etc/systemd/system/usb-keyboard-reset.sh
and /etc/systemd/system/usb-keyboard-reset.service
chmod +x /etc/systemd/system/usb-keyboard-reset.sh
systemctl enable usb-keyboard-reset
Suspend, resume, keyboard should work.
journalctl -u usb-keyboard-reset
-- Logs begin at Sat 2019-07-06 10:22:23 CEST, end at Sat 2021-04-03 13:59:32 CEST. --
avril 03 13:59:13 ifrit5 systemd[1]: Finished Reset Klim Dash RGB keyboard (ID 04d9:a231).
avril 03 13:59:23 ifrit5 systemd[1]: Stopping Reset Klim Dash RGB keyboard (ID 04d9:a231)...
avril 03 13:59:24 ifrit5 usb-keyboard-reset.sh[11023]: Device found: 04d9:a231 authorized set to 0
avril 03 13:59:24 ifrit5 usb-keyboard-reset.sh[11023]: sleep 0.5
avril 03 13:59:24 ifrit5 usb-keyboard-reset.sh[11023]: Device found: 04d9:a231 authorized set to 1
avril 03 13:59:24 ifrit5 systemd[1]: usb-keyboard-reset.service: Succeeded.
avril 03 13:59:24 ifrit5 systemd[1]: Stopped Reset Klim Dash RGB keyboard (ID 04d9:a231).
If the keyboard key press doesn't resume the system, you may need to add the following to your udev
rules:
cat /etc/udev/rules.d/10-wakeup.rules
#wakeup holtek usb keyboard
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="04d9", ATTRS{idProduct}=="a231" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/power/wakeup'"
I updated
usb-keyboard-reset.service
file accordingly to those recommandations : systemd/systemd#6364and
/etc/init.d/usb-keyboard-reset.sh
On my computer it works like a charm.