KEY_SUSPEND should mean "hibernate"/XF86Hibernate

Bug #1167869 reported by Gannet
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kde4libs (Ubuntu)
New
Undecided
Unassigned
xkeyboard-config (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

<Fn><F1>. Puts the computer into hibernate mode. Dell QuickSet is
required (see "DellTM QuickSet" on page 129). --- Info from Notebook technical documentation.

XEV output:

KeyRelease event, serial 40, synthetic NO, window 0x3e00001,
    root 0x103, subw 0x0, time 5090384, (164,-14), root:(166,44),
    state 0x0, keycode 213 (keysym 0x1008ffa7, XF86Suspend), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

So, as we see, this combination generates XF86Suspend code, and it is not working for some reason (nothing`s happened when to press it). It must generate XF86Hibernate to work.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: udev 175-0ubuntu25
ProcVersionSignature: Ubuntu 3.8.0-17.27-generic 3.8.6
Uname: Linux 3.8.0-17-generic x86_64
ApportVersion: 2.9.2-0ubuntu5
Architecture: amd64
Date: Thu Apr 11 11:04:03 2013
InstallationDate: Installed on 2013-02-28 (41 days ago)
InstallationMedia: Kubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.1)
MachineType: Dell Inc. Latitude D830
MarkForUpload: True
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.8.0-17-generic root=UUID=61a1e2a2-ab1a-47a0-bf86-5ef19ee2e901 ro rootflags=subvol=@ quiet splash
SourcePackage: udev
UpgradeStatus: Upgraded to raring on 2013-03-16 (26 days ago)
dmi.bios.date: 12/22/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A16
dmi.board.name: 0UY141
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA16:bd12/22/2011:svnDellInc.:pnLatitudeD830:pvr:rvnDellInc.:rn0UY141:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude D830
dmi.sys.vendor: Dell Inc.

Revision history for this message
Gannet (ken20001) wrote :
Martin Pitt (pitti)
tags: added: keymap
Revision history for this message
Martin Pitt (pitti) wrote :

Can you please follow the steps in /usr/share/doc/udev/README.keymap.txt to check what the current scan code/keycode for that key is?

affects: udev (Ubuntu) → systemd (Ubuntu)
Changed in systemd (Ubuntu):
status: New → Incomplete
summary: - Wrong keymap for hibernate key on Dell Latitude D830
+ [keymap] Dell Latitude D830: hibernate key
Revision history for this message
Gannet (ken20001) wrote : Re: [keymap] Dell Latitude D830: hibernate key

sudo /lib/udev/keymap -i input/event3
Press ESC to finish, or Control-C if this device is not your primary keyboard
scan code: 0x8A key code: suspend

cat /sys/class/dmi/id/sys_vendor
Dell Inc.

cat /sys/class/dmi/id/product_name
Latitude D830

Revision history for this message
Gannet (ken20001) wrote :
Changed in systemd (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

> scan code: 0x8A key code: suspend

That seems right. Unfortunately the naming between the kernel, X.org, and other places is horribly inconsistent. The kernel knows KEY_SUSPEND, which means "hibernate" (suspend to disk), and KEY_SLEEP, which means "suspend to RAM".

I guess the reason for the key not doing anything is that hibernate is disabled by default in Ubuntu. If you want to re-enable it, you can do that in

  sudo gedit /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla

and remove the "[Disable hibernate by default ...]" block (there is one for upower, and one for logind if you are running Ubuntu saucy already).

Changed in systemd (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Gannet (ken20001) wrote :

I'm using Kubuntu 13.04. And I enabled Suspend-to-Disk several days ago already and it works fine through Kickoff menu. So, you meand, that when I remove from com.ubuntu.desktop.pkla file following blocks:

[Disable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=no

[Disable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=no

my Alt+F1 button will work fine ?

Revision history for this message
Gannet (ken20001) wrote :

Recently deleted all two those block, restarted my system and it didn't changed anything. Fn+F1 still not working ! But it must because it returns the code. Also when I try to apply alternative hotkey to enter hibernate mode through system settings, when I pressing Fn+F1 it shows Suspend instead of Hibernate as it is default in KDE. For some reason Suspend is not working and system needs Hibernate code to enter Suspend-to-Disk mode. The last, as I said earlier, is working throught Kickoff menu. Please, see screenshots.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 1167869] Re: [keymap] Dell Latitude D830: hibernate key

BakLAN [2013-05-22 15:01 -0000]:
> So, you meand, that when
> I remove from com.ubuntu.desktop.pkla file following blocks:
>
> [Disable hibernate by default in upower]
> [...]
>
> my Alt+F1 button will work fine ?

Yes, it should.

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Gannet (ken20001) wrote : Re: [keymap] Dell Latitude D830: hibernate key

>Recently deleted all two those block, restarted my system and it didn't changed anything.
Fn+F1 doesn't working

Gannet (ken20001)
Changed in systemd (Ubuntu):
status: Invalid → New
Revision history for this message
Martin Pitt (pitti) wrote :

The udev keymaps are correct. As I said, on the kernel level there is only KEY_SLEEP (suspend to RAM) and KEY_SUSPEND (suspend to disk, aka hibernate).

On the X.org level, /usr/share/X11/xkb/keycodes/evdev assigns <I150> to KEY_SLEEP and <I213> to KEY_SUSPEND. /usr/share/X11/xkb/symbols/inet then maps <I150> to XF86Sleep and <I213> to XF86Suspend, mirroring the evdev naming. There is also an entry

      key <I255> { [ XF86Hibernate ] }; // KEY_HIBERNATE

But this isn't defined in /usr/share/X11/xkb/keycodes/evdev. Per the "evdev code + 8" mapping, this would correspond to KEY_RFKILL and thus be wrong.

So there are two things which can happen here:

  * Change the xkb mapping of <I213> to XF86Hibernate. This seems to be what KDE expects, and GNOME gets along with it as well (it handles both XF86Hibernate and XF86Suspend).

  * Change KDE to accept XF86Suspend for hibernation as well, in addition to XF86Hibernate (which is never emitted right now).

affects: systemd (Ubuntu) → xkeyboard-config (Ubuntu)
Changed in xkeyboard-config (Ubuntu):
status: New → Triaged
summary: - [keymap] Dell Latitude D830: hibernate key
+ KEY_SUSPEND should mean "hibernate"/XF86Hibernate
Revision history for this message
Martin Pitt (pitti) wrote :

I don't know which particular part of KDE does power management, starting with kdelibs for now.

bugbot (bugbot)
tags: added: kubuntu
Revision history for this message
Gannet (ken20001) wrote :

Should I write the same report on bugs.kde.org ? Or what can I do else to help ?

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 1167869] Re: KEY_SUSPEND should mean "hibernate"/XF86Hibernate

BakLAN [2013-05-23 19:53 -0000]:
> Should I write the same report on bugs.kde.org?

That would be a good first step, as this affects all distributions.
KDE might want to add support for XF86Suspend.

Thanks!

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.