BodhiThis forum is for the discussion of Bodhi 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.
I've tried using key bindings for XF86PowerOff or XF86PowerDown but neither seems to change anything.
Ubuntu directions don't seem to apply as they apperantly have the hardware power button set to bring up a dialog, and people use a gui to change it that bodhi doesn't offer to my knowledge.
You had me hopeful for a second there, and I was kicking myself for forgetting about that as I'd found it when I was trying to get backlight control to work on my laptop (that I still never solved).
Ok. And thanks. Obviously it's not actually important or causing any problems, but I bet its doable somehow. I'm actually trying to get this to work on my two older desktop computers, not my laptop, incase that matters. They're always plugged in so would be nice if we didn't have to wait to boot, and my kids normally turn them on/off with the power button. We end up leaving them on more often that we should to avoid booting incase we think we'll use it later, etc, basically end up on most of the time even tho only used an hour or two a day.
Hmm, what do you think about going to suspend automatically after some idle time? There is a setting in Moksha to do this. If your kids are away from PC more than max. 90 min, PC will blank and you can setup it for also suspend when blank. Just an idea
I already thought about suspend on blank weeks ago, but it had a max delay of like 20 seconds. If I could use something like 5 minutes (after blank), I'd be using that already.
A friend of mine was looking for a way to change lid-close behavior on a laptop running Ubuntu. I found the following info in the link below solved that problem and noticed that there is a power-button setting in the file as well. I have not tried this, but it may give you what you want....
Look at the #HandlePowerKey=poweroff setting in /etc/systemd/logind.conf. I believe that setting can be changed to suspend....
This link explains the capability of logind.conf pretty clearly, and I think this might provide you with what you are looking for.....
Look at the #HandlePowerKey=poweroff setting in /etc/systemd/logind.conf. I believe that setting can be changed to suspend....
Hope that is helpful....
I had a similar issue which I solved by a similar fix. However, you must remove the # sign at the start of the line, and I changed the value to ignore. Once I'd confirmed that the power button was ignored ok, I reprogrammed the power off key in Key Bindings to System Controls, giving the user a choice of options after the button was pressed.
Trying ignore made power button bring up a dialog do you want to suspend, and didn't do anything until hit yes or no. (I had already tried the key bindings and acpi bindings).
Trying suspend works! Power button suspends. But, it still brings up that dialog, it just suspends anyway; however it's there when I resume...
I found that I had to set HandlePowerKey to ignore, and then remove all references to power key (I think there were two entries) from Key Bindings, and another power key reference from ACPI Bindings (on the same page as Key Bindings). Once I'd done this, the system really did ignore the power key and it did nothing at all when pressed.
Then, I went back into Key Bindings, clicked the button to add a new binding, and I pressed the power key. That created new entry which was (IIRC) XF86PowerDown. I was then able to associate this with System Tools, and I got the behaviour I desired.
One word or caution with ACPI bindings. If you set HandlePowerKey to ignore, then be really careful if you click the Add button to add a new event in ACPI Bindings. It caused the system to hang and I couldn't get out of it. I had to yank the power cord to forcibly crash out!! Learn from my mistake!!!
I believe all this really depends on your particular hardware, and the correct settings will vary from computer to computer, so your solution may be different.
Last edited by bobl01; 10-24-2018 at 02:28 AM.
Reason: Fix typo
Something I find odd, the computer is back on this morning. I suspended it that way yesterday sometime and haven't touched the computer since, but just noticed the screen is on. I also have it set to suspend on blank so besides waking up by itself, it should suspend itself anyway.
And when I tried to suspend on another computer (even from the menu) it just hung on suspending.
And, on my laptop, which I don't ever want to suspend as it's a server, I was pretty sure I had set it to do nothing when screen closes, but it suspended when I closed my screen.
So I guess I have some work ahead of me if I want the suspension behaviour I want.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.