Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My laptop seems to go into standby mode fine when I use KDE's power control features. However, I have a dilemma - to resume, I have to hit the power button. Just one tap on the power button also sends the shutdown signal. This means that if I go into standby mode, once I resume I automatically shut down.
I am therefore wondering if it is possible to use another button to get out of sleep mode. I want to keep the power button to be able to shut down in case I need to (I can't pull the power on a laptop as easily). I have two buttons next to my power button that look like reboot buttons or something like that, but they don't do anything. Could I possibly activate those buttons to resume?
Using: kernel 2.6.11.7
Laptop: Compal CL56, pentium M, ATI Radeon 9700.
Distro: Slackware-current.
This probably won't help, but when I was still getting familiar with my laptop, I likewise couldn't get it to wake up successfully. After some digging, I discovered that the button needs to be pressed for a certain amount of time - a very quick "click" won't do anything, but holding it down too long will shut it off. On my machine, the "wake up call" works if I do a quick "one two" count and then release the button. Admittedly this may have no bearing on your situation, but perhaps you might be pressing the button for too long.
That being said, does the User Manual address how to do a wake up? There presumably should be some sort of commentary on it, which may be relevant. Good luck with it -- J.W.
Cool, I didn't know those files were there. Here is my acpi_handler.sh:
Code:
#!/bin/sh
# Default acpi script that takes an entry for all actions
IFS=${IFS}/
set $@
case "$1" in
button)
case "$2" in
power) /sbin/init 0
;;
*) logger "ACPI action $2 is not defined"
;;
esac
;;
*)
logger "ACPI group $1 / action $2 is not defined"
;;
esac
And the "default" file in /etc/acpi/events/default:
Code:
# This is the ACPID default configuration, it takes all
# events and passes them to /etc/acpi/default.sh for further
# processing.
# event keeps a regular expression matching the event. To get
# power events only, just use something like "event=button power.*"
# to catch it.
# action keeps the command to be executed after an event occurs
# In case of the power event above, your entry may look this way:
#event=button power.*
#action=/sbin/init 0
# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.
event=.*
action=/etc/acpi/acpi_handler.sh %e
Does this mean I can add something like the amount of time the button is pressed to these configuration files?
And as I said, I have two buttons next to my power button that are unused, and they are probably designed for rebooting and the like. Could I reference one of them to go into sleep mode, and the other to resume? That would be nifty, and would sidestep the entire power button issue. But I wouldn't know how to reference them. Like, the power button is "event = button power *". What would I call the other two buttons?
I don't think (or should I say I don't know how ) you can assign different action based on how long the button is pressed.
When you press the power button, it will generate an acpi event in /var/log/acpid:
Code:
received event "button/power PWRF 00000080 00000001"
which match the "button", "power" case in acpi_handler.sh so /sbin/init 0 will run. (power off)
You can press those two buttons and check if they generate any similar event, if so you can assign action to them. But I don't think they are supported in stock kernel, so you may have to do some search. Probably there are patches for Compal notebook support.
Ok, well I commented out the default action for the power button, so that pressing it won't initiate /sbin/init 0. This opens up a new can of worms for me - 1) standby doesn't come out of standby, I think it hangs up on reinitializing my USB sound card, I can check that by trying standby when I have it unplugged. 2) Coming out of hibernate screws up the video, and it freezes.
Oh well. I'll see how I can still play with it some more.
I don't think it will cause freezing when resume, really, by comment it out you just ask it to do nothing.
So here are my guess:
The freezing problem probably exist before you comment out the shutdown action.
Before: when resume, the system had been shutdown before it freeze (caused by USB sound card).
After: the system won't shutdown so you will notice the freeze.
USB and video system are typical causes of resume problem. I'm not sure about your system, but you can try few things (based on the experience on my IBM x40):
- I have to add "acpi_sleep=s3_bios" to boot parameter so that video system won't freeze after resume.
- Unload USB modules before standby/hibernate.
- Switch to console before standby/hibernate.
You can search through this forum, you will find many similar cases.
Yes, I figured that the commenting it out wasn't the actualy source of the problems. But now that I can actually resume, they start to show up
But yeah, turning off the sound card fixes the resuming issues for USB, and turning it back on works fine. I might make a little script that automates some of the stuff for me at some point.
If I use lilo, how do I add the bios setting? "acpi_sleep=s3_bios"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.