Can't disable suspend button

Bug #788415 reported by whitis
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gnome-power-manager (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

gnome-power-manager does not allow you to set the suspend button to "Do Nothing" or "Ask Me". It does have these options for the power button which is generally harder to hit by accident.

This is a bug, not a feature request as argued in #712650. System is behaving in a non-consensual manner which can endanger the integrity of the system. Suspend button on Dynex DX-WKBD is located on corner of keyboard and very easy to bump. It was possible to disable this key in previous ubuntu/debian releases; indeed since a parrot used to share the workstation, it was necessary to disable all particularly destructive keys like suspend and window close. Also related to expired bug #492030.

See also bug 736606, the equivalent problem for closing the lid.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: gnome-power-manager 2.32.0-2ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
CheckboxSubmission: 1e1a99f31ec2933306456e1f141c45d8
CheckboxSystem: edda5d4f616ca792bf437989cb597002
Date: Wed May 25 20:20:13 2011
GnomeSessionIdleInhibited: No
GnomeSessionInhibitors: None
GnomeSessionSuspendInhibited: No
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
MachineType: System manufacturer System Product Name
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=02f53b93-8fd3-44ee-911b-a2d656e2d4d2 ro quiet splash vt.handoff=7
SourcePackage: gnome-power-manager
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/17/2011
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1902
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: Crosshair IV Formula
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1902:bd02/17/2011:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnCrosshairIVFormula:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
whitis (whitis) wrote :
Revision history for this message
whitis (whitis) wrote :

This bug also affects Ubuntu 11.10. And this has resulted in repeated system crashes as 11.10 will not survive hibernate/wake-up.

Revision history for this message
whitis (whitis) wrote :

Instructions here don't work:
http://www.vyvy.org/main/en/node/219

And trying to define a custom key launcher in gnome keyboard settings don't work (you have to press the key to define it).

I have crashed the system a few times now trying to test if it is disabled.

You apparently can't disable it in /etc/default/acpi-support because if gnome-power daemon is running it ignores its own settings and sends the message there.

There was a time when I had linux system uptimes of over a year. Regression like this is not acceptable. Some people have gone as far as removing the suspend/hibernate options from the shutdown menu on systems where suspend/resume is unreliable. And some disable suspend buttons on critical systems that should never be allowed to suspend.

upowerd is running, but doesn't seem (from its documentation) to do anything actually useful, just engage in dbus masturbation.

you probably can't disable it in xmodkeymap since it is probably intercepted by acpi.

How many programs are involved in handling the keyboard power button? BIOS ACPI, acpid, X keymap, upowerd, dbus, gnome-power, gconf, pm-utils (on some distributions), powerdevil, pm-suspend, pm-hibernate, /etc/acpi/*, etc. And no documentation.

Trying:
sudo perl -p -i -n -e "s/acpi_fakekey/#acpi_fakekey/" /etc/acpi/sleepbtn.sh
Of course, when I test this, it will kill the web browser where I am posting this.

Revision history for this message
whitis (whitis) wrote :

sleepbtn.sh change did not help.

Since software folks are busy indiscriminately breaking things and failing to respond to reports that things are broken, I am following the lead of the afforementioned sun conure (parrot) and taking a hardware approach: I performed a sleep-button-ectomy on the keyboard.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-power-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Peter Silva (peter-bsqt) wrote :

I have two desktop systems that are not intended to ever go into sleep mode. The keyboards have the sleep key right near the escape key, and even no the screen, suspend and hibernate are too close to logout and lock screen, without and any confirmation, and typically about twenty minutes of work to recover. I think I toasted a raid device out of this. working on recovery.

Revision history for this message
Peter Silva (peter-bsqt) wrote :

fwiw, If you go into /usr/share/polkit-1/actions
vi *power*
and find
<allow_active>yes</allow_active>

and change them all to no...

<allow_active>no</allow_active>

Then your sleep button is disabled. This is incredibly poorly documented. I have no idea what ''allow_inactive'' means, or what any of the stanzas are trying to convey, or why we have 7 languages in those XML files (I could understand 1 or 150, it's the seven I don't get.... what about standard i18n?) apparently there was a GUI in fedora 11 or something, but it got removed, and there we are...

description: updated
Revision history for this message
Artiom (ar-molchanov) wrote :

I have an idea about the meaning of "allow_active", "allow_inactive", etc. Since the policies are applied to users and sessions this should mean "active session", "inactive session". The value could also be auth_admin so it will ask you admin password to do the action.
Therefore if you change them all to no, the suspend action will be just disabled. Than what I found trying your solution. But what we really need is the possibility to change the behavior of the suspend button. At my keyboard it is located near the minus sign on the keypad and it is often pressed by inadvertence.

Revision history for this message
Donjan Rodic (bryonak) wrote :

@Peter Silva:
Instead of editing the default rules, one should create local ones, as shown here for hibernate and suspend:
http://askubuntu.com/questions/94754/how-to-enable-hibernation-in-12-04/

I do agree that it's poorly documented though...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.