Skip to contentSkip to conversation

cannot resume using USB keyboard/mouse

DISCUSSION Ben Liblit 2 participants 4 messages Nov 24, 2007

lore
Share & tools
lore

Ben Liblit

author
#0 lore raw

When I suspend my desktop box, I cannot resume again by pressing a key on my USB keyboard or clicking a button on my USB mouse. I have to press the chassis power button to wake things up again. (I'd expect this to be necessary after hibernation, but not after suspend.) The same machine resumes from suspend using keyboard or mouse buttons under Vista, so I know this is something that the hardware is capable of.

Is this a bug? Or is there some local configuration tweak I should be making to tell the system to wake up in response to USB key presses & mouse clicks?

I'm running Fedora 8, with a Fedora-provided kernel version 2.6.23.1-49.fc8. Attached below is a pruned-down hardware description (from lshw) showing the mouse and keyboard, plus other buses and bridges by which they are connected. Are there any other useful details I can provide?

Thanks!

-- Ben

H/W path Device Class Description
===========================================================

                                 system         Nobilis
/0                               bus            DG965RY
/0/100                           bridge         82P965/G965 Memory Controller Hub
/0/100/1d                        bus            82801H (ICH8 Family) USB UHCI Controller #1
/0/100/1d/1          usb5        bus            UHCI Host Controller
/0/100/1d/1/2                    bus            TUSB2040/2070 Hub
/0/100/1d/1/2/1                  generic        Microsoft Natural Keyboard Pro
/0/100/1d/1/2/2                  generic        Microsoft IntelliMouse
#1 lore raw
Quoted 17 lines · On Saturday 24 November 2007 08:15:05 Ben Liblit wrote:

When I suspend my desktop box, I cannot resume again by pressing a key on my USB keyboard or clicking a button on my USB mouse. I have to press the chassis power button to wake things up again. (I'd expect this to be necessary after hibernation, but not after suspend.) The same machine resumes from suspend using keyboard or mouse buttons under Vista, so I know this is something that the hardware is capable of.

Is this a bug? Or is there some local configuration tweak I should be making to tell the system to wake up in response to USB key presses & mouse clicks?

I'm running Fedora 8, with a Fedora-provided kernel version 2.6.23.1-49.fc8. Attached below is a pruned-down hardware description (from lshw) showing the mouse and keyboard, plus other buses and bridges by which they are connected. Are there any other useful details I can provide?

Quoted 4 lines

Thanks!

-- Ben

You probably need to tell the system which devices can do the wakeup. To do so first do a "cat /proc/acpi/wakeup".

and then write corresponding device name (the first column) to that file (under root)

For example, mine /proc/acpi/wakeup:

maxim@MAIN:~$ cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
SLPB      S4    *enabled
P32       S4     enabled   pci:0000:00:1e.0
UAR1      S4     enabled   pnp:00:0a
ILAN      S4     enabled   pci:0000:00:19.0
PEGP      S4     enabled   pci:0000:00:01.0
PEX0      S4     enabled   pci:0000:00:1c.0
PEX1      S4     enabled   pci:0000:00:1c.1
PEX2      S4     enabled   pci:0000:00:1c.2
PEX3      S4     enabled   pci:0000:00:1c.3
PEX4      S4     enabled   pci:0000:00:1c.4
PEX5      S4     enabled
UHC1      S3     enabled   pci:0000:00:1d.0
UHC2      S3     enabled   pci:0000:00:1d.1
UHC3      S3     enabled   pci:0000:00:1d.2
UHC4      S3     enabled
EHCI      S3     enabled   pci:0000:00:1d.7
EHC2      S3     enabled   pci:0000:00:1a.7
UH42      S3     enabled   pci:0000:00:1a.0
UHC5      S3     enabled   pci:0000:00:1a.1
AZAL      S3     enabled   pci:0000:00:1b.0
maxim@MAIN:~$

the UHC1-5, EHCI and EHC2 are the usb1.0 resume devices (ports) so I can do

echo "UHC1" > /proc/acpi/wakeup
echo "UHC2" > /proc/acpi/wakeup

....

And then check whenever the "status" column" shows "enabled"

Note: some resume devices are connected together:

For example doing 'echo "ILAN" > /proc/acpi/wakeup' enables the LAN , EHCI , AZAL.

So my script that enables all wakeup devices is:

#! /bin/bash

echo "UHC1" > /proc/acpi/wakeup # ICH8 UHCI1
echo "UHC2" > /proc/acpi/wakeup # ICH8 UHCI2
echo "UHC3" > /proc/acpi/wakeup # ICH8 UHCI3
echo "UHC4" > /proc/acpi/wakeup # ICH8 UHCI4
echo "UHC5" > /proc/acpi/wakeup # ICH8 UHCI5

echo "ILAN" > /proc/acpi/wakeup # ICH8 internal (lan/HDA/EHCI)
echo "P32" > /proc/acpi/wakeup # ICH8 external (PCI/PCI express)
echo "UAR1" > /proc/acpi/wakeup # SUPERIO (UART/Sleep button)

And last thing, writing to /proc/acpi/wakeup a device name that is already enabled,
disables it, so if I for example run the above script twice (with wakeup devices disabled), all wakeup devices will be disabled again.

Best regards,
Maxim Levitsky

author
#2 lore raw
Quoted 7 lines · Maxim Levitsky

the UHC1-5, EHCI and EHC2 are the usb1.0 resume devices (ports) so I can do

echo "UHC1" > /proc/acpi/wakeup
echo "UHC2" > /proc/acpi/wakeup

....

Ah hah!

Echoing EHCI and EHC2 into that file has no affect on my system; they remain disabled. But enabling UHC[1-5] works, and my system now resumes on USB key presses and mouse clicks as desired.

Thank you very much for your help, Maxim!

#3 lore raw
Quoted 11 lines · On Saturday 24 November 2007 20:29:06 Ben Liblit wrote:
Quoted 7 lines · Maxim Levitsky

the UHC1-5, EHCI and EHC2 are the usb1.0 resume devices (ports) so I can do

echo "UHC1" > /proc/acpi/wakeup
echo "UHC2" > /proc/acpi/wakeup

....

Ah hah!

You are welcome.
Note that the names like UHC1 are system depedent,
those are names that are present in ACPI tables,
so you need to read this file first, and then guess which one is which
You can also check the "Sysfs node" column, and then using sysfs or lspci figure out the device function. But I guess that in your case the USB controllers have same "UHC[1-5]" name.
And btw since most(if not all) keyboard/mice/... are USB 1 devices, the EHCI setting won't work anyway.

Best regards,
Maxim Levitsky