How to activate laptop from sleep using external USB keyboard or mouse?

I have a laptop but I only use external devices: external USB keyboard, external USB mouse and external monitor. I prefer to close laptop lid because I don’t use it which can make my table cleaner. But I can’t activate the laptop from sleep using external USB keyboard or external USB mouse like Windows or MacOS laptops. I can only activate it by pressing power button. I think this is because sys-usb VM isn’t working when sleep.

This question seems not to be related to Qubes OS, AFAIK it’s more about your laptop model and the Linux kernel managing the suspend. You should have more luck by asking on your vendor’s forums.

What do you mean - not related? Isn’t Qubes/Xen the host OS?

I actually have the same problem - after introducing sys-usb to my system I can’t wake up my desktop from sleep via USB keyboard/mouse: neither works (even scroll lock doesn’t work) until I enter my password via (an additional) PS/2 keyboard. Had to disable sys-usb (also, it was causing problems with volume controls with my USB sound cards.

1 Like

I installed 4.1 recently, I plug in USB keyboard during installation so Qubes OS doesn’t create sys-usb automatically. At this time, I can use mouse or USB keyboard to wake up latop and input in dom0.

After creating sys-usb with sudo qubesctl state.sls qvm.usb-keyboard and add sys-usb dom0 allow to qubes.InputKeyboard and qubes.InputMouse, I can’t wake up laptop with mouse, USB keyboard or laptop keyboard. I can only wake up through power button.

How to set Qubes OS to let me wake up through USB keyboard or at least mouse?

How to remove sys-usb? I can’t use USB keyboard following How to remove a USB qube.

I think you need to do this after removing sys-usb

What do you mean? sudo qubesctl state.sls qvm.usb-keyboard will create sys-usb while I want to remove it to make USB mouse or USB keyboard can directly control dom0 without through sys-usb.

I followed Grub instruction but doesn’t work. I guess I’m grub because I don’t have /boot/efi/EFI/.

What options do you have in dom0 cmdline?
cat /proc/cmdline

When sys-usb exists:

placeholder root=/dev/mapper/qubes_dom0-root ro rd.luks.uuid=luks-<uuid> plymouth.ignore-serial-consoles rd.driver.pre=btrfs rhgb quiet rd.qubes.hide_all_usb

Do I need to remove hide_all_usb here too if I want to remove sys-usb?

You need to remove rd.qubes.hide_all_usb from grub.
Are you sure you don’t have EFI?
Do you have no files in here?
sudo ls /boot/efi/EFI
If you have EFi then after you remove rd.qubes.hide_all_usb in /etc/default/grub you need to run this command:
grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg

My laptop supports EFI but Qubes OS default uses grub when I install 4.1, I am not familiar with this thing.

I have run this command but didn’t work. Is there any log to debug this?

sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
Should have worked.
Do you have any messages after executing them?