lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 046a:0011 CHERRY G83 (RS 6000) Keyboard
Bus 001 Device 003: ID 0489:e0d8 Foxconn / Hon Hai Bluetooth Adapter
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 30c9:00a8 Luxvisions Innotech Limited Integrated RGB Camera
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
I’m tring to do this mannulay, tells me permisson denied:
ls -la /sys/class/bluetooth/hci0
lrwxrwxrwx 1 root root 0 3月19日 10:12 /sys/class/bluetooth/hci0 -> ../../devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0/bluetooth/hci0
ls /sys/devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0/bluetooth/hci0/power/
autosuspend_delay_ms control runtime_active_time runtime_status runtime_suspended_time
echo 'enabled' | sudo tee /sys/devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0/bluetooth/hci0/power/wakeup
tee: '/sys/devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0/bluetooth/hci0/power/wakeup': permisson denied
enabled
echo 'enabled' | sudo tee /sys/devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0/bluetooth/hci0/hci0:512/device/power/wakeup
tee: '/sys/devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0/bluetooth/hci0/hci0:512/device/power/wakeup': permisson denied
enabled
and my kernel:
uname -a
Linux lj-82y8 6.7.9-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Fri, 08 Mar 2024 01:58:50 +0000 x86_64 GNU/Linux
BTW, on the same laptop, I have a manjaro, the arch wiki’s method works.
I think this is because you don’t have any permission to modify the directory. If you look at the contents of the /sys/devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0/bluetooth/hci0/power/ directory, you’ll see that there is no wakeup file in it.
So when you try to tee the output into the wakeup file, it will attempt to create a new file inside the directory, which probably don’t have permission.
Can you show the output of
$ ls -l /sys/devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0/bluetooth/hci0/power/
The method proposed in the Arch Wiki should work. You’re saying that it doesn’t work on Endeavor? That doesn’t sound right…
lsusb | grep Bluetooth
Bus 001 Device 003: ID 0489:e0d8 Foxconn / Hon Hai Bluetooth Adapter
ls -ld /sys/devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0/bluetooth/hci0/power/
drwxr-xr-x 2 root root 0 3月19日 16:55 /sys/devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0/bluetooth/hci0/power/
While leaving the terminal window open, connect/disconnect the bluetooth keyboard. There should be a bunch of events printed out in the terminal window. Can you post the output?
Okay. My current theory is that the udev rule was indeed applied during boot, but the problem is that the command triggered by the udev rule failed due to the permission error. To test out this theory, modify the /etc/udev/rules.d/91-keyboard-mouse-wakeup.rules file to this:
BTW, I have another test script, I printed the DEVPATH, and I CAN find the wakeup file in that path.
But the bluetooth still can NOT wake up the suspends…
udevadm info -a -p /sys/devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0/bluetooth
Unknown device "/sys/devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0/bluetooth": No such device
so I run
udevadm info -a -p /sys/devices/pci0000:00/0000:00:08.1/0000:63:00.3/usb1/1-5/1-5:1.0
Huh. I think this is the problem. The bluetooth adapter wakeup is only listed under S4 (hibernate). Normal suspend is S3.
Can you try to hibernate on Endeavour and see if the bluetooth keyboard can wake the system up?
You can also log into Manjaro and post the output of cat /proc/acpi/wakeup.
Edit:
The S4 entry in /proc/acpi/wakeup table might mean the highest level of wakeup. So if S4 is listed, it can technically send wake up signals to all other sleep states.