public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Maxim Levitsky <maximlevitsky@gmail.com>
To: linux-pm@lists.linux-foundation.org
Subject: Re: cannot resume using USB keyboard/mouse
Date: Sat, 24 Nov 2007 19:26:05 +0200	[thread overview]
Message-ID: <200711241926.05105.maximlevitsky@gmail.com> (raw)
In-Reply-To: <4747C169.10807@cs.wisc.edu>

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

  reply	other threads:[~2007-11-24 17:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-24  6:15 cannot resume using USB keyboard/mouse Ben Liblit
2007-11-24 17:26 ` Maxim Levitsky [this message]
2007-11-24 18:29   ` Ben Liblit
2007-11-24 22:18     ` Maxim Levitsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200711241926.05105.maximlevitsky@gmail.com \
    --to=maximlevitsky@gmail.com \
    --cc=linux-pm@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox