This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Hotkey not working for sleep function

Tags: None
(comma "," separated)
Txema
Registered Member
Posts
27
Karma
0
OS

Hotkey not working for sleep function

Sun Nov 03, 2013 11:44 am
The sleep function works perfectly fine from the KDE menu and with qdbus org.kde.kded /org/freedesktop/PowerManagement Suspend but when i set a hotkey in systemsettings it doesn't work, this is the only shortcut not working, and it fails with any key i've tried.

Thanks.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Do global shortcuts work for other actions? It sounds like your system might be missing kglobalacceld?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Txema
Registered Member
Posts
27
Karma
0
OS
Global shortcuts works, but those in KDE daemon section don't (this is a desktop pc, not a laptop)

Code: Select all
eix kglobalaccel
[I] kde-base/kglobalaccel                                                                                                                                                                                           
     Available versions:  (4) 4.10.5 (~)4.11.2                                                                                                                                                                       
       {aqua debug}                                                                                                                                                                                                 
     Installed versions:  4.11.2(4)(21:57:43 02/11/13)(-aqua -debug)                                                                                                                                                 
     Homepage:            http://www.kde.org/                                                                                                                                                                       
     Description:         KDE's Global Shortcut Daemon


Code: Select all
locate kglobala
/usr/bin/kglobalaccel
/usr/include/kglobalaccel.h
/usr/lib64/libkdeinit4_kglobalaccel.so
[...]
/usr/share/apps/kglobalaccel
/usr/share/apps/kglobalaccel/kglobalaccel.notifyrc
/usr/share/dbus-1/interfaces/org.kde.kglobalaccel.Component.xml
/usr/share/kde4/services/kglobalaccel.desktop
/usr/share/locale/es/LC_MESSAGES/kglobalaccel.mo


Code: Select all
ps -A|grep kgloba
 3498 ?        00:00:00 kglobalaccel


This worked in a previous version, but i don't remember which one exactly.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Can you please verify that "kded4" is running on your system, and that this behaviour can be reproduced under a new user?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Txema
Registered Member
Posts
27
Karma
0
OS
Sorry for the wait.

Code: Select all
ps -A|grep kded
10703 ?        00:00:01 kded4


And yes, it's the same with a new user

Code: Select all
useradd -m -G wheel,cron,audio,cdrom,video,games,usb,users,vmware,portage,plugdev -s /bin/bash prueba
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Please check in System Settings > Startup & Shutdown > Service Manager that "KDE Power Management" is enabled in the "Startup Services" section.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Txema
Registered Member
Posts
27
Karma
0
OS
yes, all startup services enabled, including Power Management.

I even stopped and restarted it, but to no avail.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Can you check to see if the shortcuts work under a new user?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Txema
Registered Member
Posts
27
Karma
0
OS
Txema wrote:
And yes, it's the same with a new user


That means: it doesn't work with a new user

Thanks.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Oops, I didn't see that.

Can you verify with xev that the appropriate shortcut is being detected by the system correctly? The function keys on many systems work in unusual ways which can lead to them being incorrectly detected, or not at all.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Txema
Registered Member
Posts
27
Karma
0
OS
I think it works, but i don't understand the output of xev:

Code: Select all
FocusOut event, serial 40, synthetic NO, window 0x1600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 41, synthetic NO, window 0x1600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 41, synthetic NO, window 0x0,
    keys:  1   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

FocusOut event, serial 41, synthetic NO, window 0x1600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 41, synthetic NO, window 0x1600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 41, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

MappingNotify event, serial 41, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 41, synthetic NO, window 0x1600001,
    root 0x294, subw 0x0, time 17222801, (711,509), root:(711,532),
    state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 42, synthetic NO, window 0x1600001,
    root 0x294, subw 0x0, time 17223265, (711,509), root:(711,532),
    state 0x14, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

FocusOut event, serial 42, synthetic NO, window 0x1600001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 42, synthetic NO, window 0x1600001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 42, synthetic NO, window 0x0,
    keys:  1   0   0   0   96  0   0   0   1   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 42, synthetic NO, window 0x1600001,
    root 0x294, subw 0x0, time 17223953, (711,509), root:(711,532),
    state 0x1c, keycode 38 (keysym 0x61, a), same_screen YES,
    XLookupString gives 1 bytes: (01) ""
    XFilterEvent returns: False

KeyRelease event, serial 42, synthetic NO, window 0x1600001,
    root 0x294, subw 0x0, time 17224553, (711,509), root:(711,532),
    state 0x1c, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 42, synthetic NO, window 0x1600001,
    root 0x294, subw 0x0, time 17224633, (711,509), root:(711,532),
    state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


That's 2 special keys of my keyboard and the last one is "Ctrl + Alt + a"

And i changed the deafult shortcuts when i saw it didn't work, just in case it was the keys fault.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Unfortunately that output only indicates that the Ctrl, Alt and A keys were pressed. This indicates that the sleep key is not being registered.
Can you check the output of "dmesg" to see if anything relating to "setkeycodes" is being output?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]