LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-27-2009, 10:17 PM   #1
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,387
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
acpi event triggered sleep shuts down twice with USB mouse connected


I'm running Debian Lenny on a Toshiba Portege 3500.

I have set up an ACPI event in /etc/acpi/events/powerbtn:
Code:
event=button[ /]power
action=/etc/acpi/powerbtn.sh
This runs the following script, which sleeps the computer when I press the power button (rather than shutting down).
acpitool -s

Normally this works fine, ie:
1 press button
2 system goes to sleep
3 press button
4 system wakes up

However, when I have a USB mouse plugged in, the following happens:
1 press button
2 system goes to sleep mode
3 press button
4 system starts to wake up, USB restarts, system goes back to sleep mode
5 press button
6 system wakes up

Note that if I invoke 'acpitool -s' directly from the command line, it works properly (whether or not the usb mouse is present), and wakes up the first time.

Why is this happening? Possibly it has something to do with the autowake on USB (which incidentally, I can't figure out how to turn off in order to test this hypothesis, it doesn't have an obvious bios setting). I appear to be getting a reentry into the acpi powerbtn event.

I have a hack of a workaround, but it is ugly; my script now has the following:
Code:
test -f /var/lock/acpisleep1 && exit 0
touch /var/lock/acpisleep1
acpitool -s
(sleep 2; rm /var/lock/acpisleep1) &

Last edited by neonsignal; 08-15-2009 at 11:22 AM.
 
Old 04-29-2011, 08:09 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,387
Blog Entries: 52

Original Poster
Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Additional information; this particular wake-from-sleep quirk has been fixed in Debian Squeeze.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ACPI Kernel >= 2.6.13 USB Mouse Doesn't Power Down light_QQ Linux - Hardware 4 03-15-2006 09:44 AM
USB Keyboard and Mouse problems on Fedora 3 connected through Thinkpad dock mdisano Linux - Laptop and Netbook 6 09-23-2005 11:24 AM
No usb mouse after hotplug loaded (acpi also has to do with it) Erik Plaggenmar Linux - Hardware 2 04-13-2005 11:40 AM
ACPI shuts down the laptop! navarre9 Linux - Laptop and Netbook 1 03-06-2004 02:25 AM
ACPI Sleep aaa Linux - General 9 10-01-2003 12:54 PM


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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration