public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* cannot resume using USB keyboard/mouse
@ 2007-11-24  6:15 Ben Liblit
  2007-11-24 17:26 ` Maxim Levitsky
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Liblit @ 2007-11-24  6:15 UTC (permalink / raw)
  To: linux-pm

[-- Attachment #1: Type: text/plain, Size: 886 bytes --]

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

[-- Attachment #2: lshw-pruned.txt --]
[-- Type: text/plain, Size: 692 bytes --]

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


[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cannot resume using USB keyboard/mouse
  2007-11-24  6:15 cannot resume using USB keyboard/mouse Ben Liblit
@ 2007-11-24 17:26 ` Maxim Levitsky
  2007-11-24 18:29   ` Ben Liblit
  0 siblings, 1 reply; 4+ messages in thread
From: Maxim Levitsky @ 2007-11-24 17:26 UTC (permalink / raw)
  To: linux-pm

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?
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cannot resume using USB keyboard/mouse
  2007-11-24 17:26 ` Maxim Levitsky
@ 2007-11-24 18:29   ` Ben Liblit
  2007-11-24 22:18     ` Maxim Levitsky
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Liblit @ 2007-11-24 18:29 UTC (permalink / raw)
  To: linux-pm

Maxim Levitsky wrote:
> 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!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cannot resume using USB keyboard/mouse
  2007-11-24 18:29   ` Ben Liblit
@ 2007-11-24 22:18     ` Maxim Levitsky
  0 siblings, 0 replies; 4+ messages in thread
From: Maxim Levitsky @ 2007-11-24 22:18 UTC (permalink / raw)
  To: linux-pm

On Saturday 24 November 2007 20:29:06 Ben Liblit wrote:
> Maxim Levitsky wrote:
> > 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-24 22:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-24  6:15 cannot resume using USB keyboard/mouse Ben Liblit
2007-11-24 17:26 ` Maxim Levitsky
2007-11-24 18:29   ` Ben Liblit
2007-11-24 22:18     ` Maxim Levitsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox