LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-23-2010, 04:11 PM   #1
eagleamon
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Rep: Reputation: 0
Resume from suspend with a specific device


Hi all!

I was trying to get this feature: wake up my htpc from s3 with my remote control and the solution is to modify /proc/acpi/wakeup and a descriptor in /sys

Here are the details:
I'm using a Microsoft IR receiver for MCE remote that appears as dev 2 of bus 2 in lsusb

root@htpc:~# lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0471:0815 Philips (or NXP) eHome Infrared Receiver
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 006: ID 045e:0714 Microsoft Corp.
Bus 001 Device 005: ID 045e:0715 Microsoft Corp.
Bus 001 Device 004: ID 045e:0707 Microsoft Corp. Wireless Laser Mouse 8000
Bus 001 Device 003: ID 045e:070c Microsoft Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

or in lsusb -t :
root@htpc:~# lsusb -t
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
|__ Port 1: Dev 2, If 0, Class=vend., Driver=mceusb, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/8p, 480M
|__ Port 4: Dev 3, If 0, Class=hub, Driver=hub/4p, 480M
|__ Port 4: Dev 4, If 0, Class=hub, Driver=hub/3p, 12M
|__ Port 2: Dev 5, If 0, Class=HID, Driver=usbhid, 12M
|__ Port 3: Dev 6, If 0, Class=HID, Driver=usbhid, 12M

The first thing I don't really understand is that in /proc/acpi/wakeup
root@htpc:~# cat /proc/acpi/wakeup
Device S-state Status Sysfs node
P0P2 S4 *disabled pci:0000:00:01.0
P0P1 S4 *disabled pci:0000:00:1e.0
PS2K S4 *disabled pnp:00:0e
PS2M S4 *disabled pnp:00:0f
UAR1 S4 *disabled pnp:00:10
MC97 S4 *disabled
P0P4 S4 *disabled pci:0000:00:1c.0
P0P5 S4 *disabled pci:0000:00:1c.1
P0P6 S4 *disabled
P0P7 S4 *disabled
P0P8 S4 *disabled
P0P9 S4 *disabled
USB0 S4 *enabled pci:0000:00:1d.0
USB1 S4 *disabled pci:0000:00:1d.1
USB2 S4 *disabled pci:0000:00:1d.2
USB3 S4 *disabled pci:0000:00:1d.3
EUSB S4 *disabled pci:0000:00:1d.7

that's USB0 I have to enabled, why not usb 1 or 2 (bus 2 in lsusb) ?
Moreover why are all the disabled/enabled preceded with a star and S4 and not S3 mentionned ?

Nevertheless that wasn't enough to get it work. I looked in gconf-editor in apps/gnome-power-manager/general but I have no can-suspend or something similar... (I'm running on 10.10, with 10.04 I could suspend only once, afterwards the computer didn't go to suspend, just black screen then login screen)
So I looked in /sys/ and found that 'cat /sys/bus/usb/devices/2-1/power/wakeup' (notice the 2.1 as bus 2 device 2 (0,1,...) gave 'disabled' so a
echo enabled > /sys/bus/usb/devices/2-1/power/wakeup
and now I can wake-up with the remote when I want


I hope this thread will help and if someone could answer what I don't understand:
Why USB0 in /proc/acpi/wakeup ?
Why have to change in /proc and /sys ?
Is it possible to automate this to get it work even if I change the usb port the receiver is plugged in ?


.. thanks a lot guys

PS: this post is duplicated from http://ubuntuforums.org/showthread.php?t=814939 but I thought I would be interesting to have a larger audience for my question
 
Old 10-27-2010, 05:23 AM   #2
eagleamon
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Bump up ?
 
  


Reply

Tags
acpi, proc, suspend, sys, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
resume: could not stat the resume device file Zaskar Debian 17 03-29-2012 10:10 PM
can't resume after suspend newbiesforever Linux - General 1 08-26-2009 06:52 AM
resume: cannot stat resume device file sixerjman Linux - Kernel 0 05-27-2007 03:09 PM
No resume from suspend mehlkelm Debian 3 11-22-2005 10:48 AM
resume and suspend pthreads okhan Programming 3 07-30-2004 08:32 AM


All times are GMT -5. The time now is 02:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration