Hi, this command won't work on my laptop. If I read it correctly, the sed command will substitute lines matching USB with the "echo 1 ..." command. I have no lines containing that pattern on my /proc/acpi/wakeup. I guess this is because I am running LMDE on a laptop. I do have a keyboard connected but, believe it or not, it is an old PS2 one. So, the question is, which line in my /proc/acpi/wakeup file refers to my laptop keyboard, which refers to the external one and how can I get the above command to work?HTD wrote: Would you like to wake up your pc from sleep with keyboard or mouse? It's easy:
Code: Select all
((echo '#!/bin/sh' && sed -rn 's/^.*(USB[0-9E]+|EUSB).*$/echo \1 > \/proc\/acpi\/wakeup/pg' /proc/acpi/wakeup) | sudo tee /etc/pm/sleep.d/05_usb && sudo chmod +x /etc/pm/sleep.d/05_usb)
I guess the idea here is to create a bash script at /etc/pm/sleep.d/05_usb which will echo "1" into /proc/acpi/wakeup. Is that correct? Or did you mean "$1" for capturing the sed command's output? Or am I missing the point entirely?
/proc/acpi/wakeup:
Code: Select all
Device S-state Status Sysfs node
AGP S4 *disabled pci:0000:00:01.0
P0P1 S4 *disabled pci:0000:00:1e.0
HDEF S4 *disabled pci:0000:00:1b.0
RP01 S4 *disabled pci:0000:00:1c.0
PXSX S4 *disabled
RP02 S4 *disabled pci:0000:00:1c.1
PXSX S4 *disabled pci:0000:03:00.0
RP03 S4 *disabled pci:0000:00:1c.2
PXSX S4 *disabled pci:0000:04:00.0
RP04 S4 *disabled pci:0000:00:1c.3
PXSX S4 *disabled
RP05 S4 *disabled
PXSX S4 *disabled
RP07 S4 *disabled
PXSX S4 *disabled
RP08 S4 *disabled
PXSX S4 *disabled
GLAN S4 *enabled pci:0000:00:19.0
PEG3 S4 *disabled
PEG4 S4 *disabled
PEG5 S4 *disabled
PEG6 S4 *disabled
EHC2 S3 *disabled pci:0000:00:1a.0
EHCI S3 *disabled pci:0000:00:1d.0
LID S3 *enabled
PBTN S3 *enabled
PS. What is this file anyway? What does this mean?
Code: Select all
$ file /proc/acpi/wakeup
/proc/acpi/wakeup: empty
Code: Select all
$ file wakeup
wakeup: ASCII text