Power Button action

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jeenuv
Level 2
Level 2
Posts: 95
Joined: Tue Jun 04, 2013 3:34 pm

Power Button action

Post by jeenuv »

I run Mint Olivia 64-bit on Asus X55C laptop.

The problem I face is this: I've set the power button press action as 'Ask Me' in the Power Manager Preferences -> General Tab. However, what happens when I press power button is that the system always shutdown without asking me. Sometimes I leave the system with only the LCD switched off. When I come back, I press the power button thinking that I had left it suspended, and then yucks, it shuts down, losing all my work and browser pages!

The work around I do now is to press Ctrl-Alt-Delete or Menu->Quit and then click shutdown. I'd much rather have the same window pop-up if I press power button.

Any idea what's going wrong?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Don_Pedro
Level 4
Level 4
Posts: 237
Joined: Sun Jun 23, 2013 11:54 am
Location: Dominican Republic

Re: Power Button action

Post by Don_Pedro »

Hi,
same problem on my side: I sat up the power button to suspend.
It shutdonws the laptop when I press

Anybody has the power button working as excepted ?
P.
Mint 21.2 64-bit , Cinnamon
Think Pad T420 Ram:8 GB Intel© Core™ i5-2520M CPU @ 2.50GHz × 2 SSD Samsung- Firefox/Brave
jeenuv
Level 2
Level 2
Posts: 95
Joined: Tue Jun 04, 2013 3:34 pm

Re: Power Button action

Post by jeenuv »

I've raised a bug for this.
jeenuv
Level 2
Level 2
Posts: 95
Joined: Tue Jun 04, 2013 3:34 pm

Re: Power Button action

Post by jeenuv »

There's a workaround for this, posted in the bug report.
Don_Pedro
Level 4
Level 4
Posts: 237
Joined: Sun Jun 23, 2013 11:54 am
Location: Dominican Republic

Re: Power Button action

Post by Don_Pedro »

Thank you for the news,
As concerning me I have no powerbtn.sh script at /etc/acpi/

P
P.
Mint 21.2 64-bit , Cinnamon
Think Pad T420 Ram:8 GB Intel© Core™ i5-2520M CPU @ 2.50GHz × 2 SSD Samsung- Firefox/Brave
jeenuv
Level 2
Level 2
Posts: 95
Joined: Tue Jun 04, 2013 3:34 pm

Re: Power Button action

Post by jeenuv »

Hm, that's weird. Maybe you can reopen the bug and post a comment there.
Don_Pedro
Level 4
Level 4
Posts: 237
Joined: Sun Jun 23, 2013 11:54 am
Location: Dominican Republic

Re: Power Button action

Post by Don_Pedro »

Jeenuv.
a bug is something important.
I cannot post for a bug without investigate myself deaply.
Developers who work on bug issue need to be disturb only for verificated problem.
I will work on it and will get back to you,
Cordially
P.
P.
Mint 21.2 64-bit , Cinnamon
Think Pad T420 Ram:8 GB Intel© Core™ i5-2520M CPU @ 2.50GHz × 2 SSD Samsung- Firefox/Brave
panchojuan

Re: Power Button action

Post by panchojuan »

I also had the same problem. The workaround was good enough. Hope to see it implemented in later versions.
User avatar
Pierre
Level 21
Level 21
Posts: 13226
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Power Button action

Post by Pierre »

The problem I face is this: I've set the power button press action as 'Ask Me' in the Power Manager Preferences -> General Tab. However, what happens when I press power button is that the system always shutdown without asking
tap the 'space bar'.
- if nothing happens - then - hit the PWR button :?
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
hectormd

Re: Power Button action

Post by hectormd »

Hi there I'm new to the forums, so first of all, Hello :P
Since I'm a Linux newbie I found what I think is a brute force workaround for this.
Following Hans-Christoph Steiner (eighthave)'s workaround: https://bugs.launchpad.net/linuxmint/+b ... comments/4
Which sadly didn't work for me, I decided to just comment the line that was sending the shutdown message, and IT JUST BLOODY WORKED!!!

So... what I did... I just commented this line:

Code: Select all

/sbin/shutdown -h now "Power button pressed"
Worked like a charm :D

Detailed process for beginners like me
Open a terminal, type:

Code: Select all

sudo gedit /etc/acpi/powerbtn.sh
In the opened document go to the very last line and add a Hashtag to the beggining of it, so you will end up with this:

Code: Select all

#/sbin/shutdown -h now "Power button pressed"
Save, close, whether this was a right or dumb thing to do, It will work and I haven't had any issues so far :D
p8r

Re: Power Button action

Post by p8r »

hectormd wrote: Detailed process for beginners like me
Open a terminal, type:

Code: Select all

sudo gedit /etc/acpi/powerbtn.sh
In the opened document go to the very last line and add a Hashtag to the beggining of it, so you will end up with this:

Code: Select all

#/sbin/shutdown -h now "Power button pressed"
Save, close, whether this was a right or dumb thing to do, It will work and I haven't had any issues so far :D
wow, nice work, it really works! thanks mate!
Laugh2
Level 4
Level 4
Posts: 275
Joined: Fri Aug 16, 2013 4:01 am

Re: Power Button action

Post by Laugh2 »

jeenuv wrote:There's a workaround for this, posted in the bug report.
:D Great! The workaround worked for me too. :D
Details:
  • Linux Mint 13 Maya (64 bit) MATE
    Dell Latitiude D630 (Core2 Duo, nVidia Quadro NVS 135M graphics)
PS: This has now worked for me on 3 computers for 3 different people, incl. a system with Mint 13(32bit) MATE. We are all pleased about this workaround.
Last edited by Laugh2 on Sun Jun 22, 2014 5:36 pm, edited 3 times in total.
Minterator

Re: Power Button action

Post by Minterator »

Workaround worked here too!
Locked

Return to “MATE”