Bug 311050

Summary: [Regression] ctrl-alt-l isn't locking the screen
Product: [Unmaintained] kscreensaver Reporter: Dave Gilbert <gilbertd+kde>
Component: locker-qmlAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ales, alex, bluelightning, cfeck, chaofeng111, chemobejk, cmocallaghan, dima, fbcyborg, gekylafas, jay, kamikazow, kde, kdebugs, mgraesslin, post, px79, rdieter, reg, shlomif, simon.tost, stupor_scurvy343, travneff, wstephenson, xejakig884
Priority: NOR    
Version: 4.9.80 Beta1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dave Gilbert 2012-12-02 23:41:20 UTC
(Kubuntu Raring as of today, update from Quantal; shows 4.9.80 in about Kde boxes:
ii  kde-baseapps-bin                      4:4.9.80-0ubuntu1                           amd64        core binaries for the KDE base applications
Quantal's KDE was working fine)

If I hit ctrl-alt-l nothing happens, however, if I wait for the timeout the screen does lock, so the screen saver is working, just not the shortcut.

It's shown in the settings->global keyboard->shortcuts->kscreenlocker->lock session as ctrl+alt+l
so that's still there.

Nothing appears in a tail -f ~/.xsession-errors when I hit the key.

Reproducible: Always

Steps to Reproduce:
1. ctrl-alt-l

Actual Results:  
Nothing happens

Expected Results:  
Screen locks
Comment 1 xejakig884 2012-12-03 00:13:29 UTC
I can't confirm this but my shortcut seems to be set up differently.

Ctrl-Alt-L works as expected and locks the screen everytime.

Investigation shows that the shortcut is defined in Global Keyboard Shortcuts, The KDE Session Manager | Lock Session.

This was a new recent install of Kubuntu 13.04 and a recently upgraded KDE from 4.9.2 to 4.9.80.
Comment 2 Dave Gilbert 2012-12-03 01:05:28 UTC
Interesting; for me the KDE Session manager -> Lock session entry is blank.

I'm assuming here the problem is one of upgrading config files between versions somehow; is there any useful config file I can add ?
Comment 3 Jekyll Wu 2012-12-03 17:30:35 UTC
(In reply to comment #0)

> It's shown in the settings->global keyboard->shortcuts->kscreenlocker->lock
> session as ctrl+alt+l
> so that's still there.

Not sure about the shortcut "not working" problem, but if there is still kscreenlocker in that drop down list, then  ksmserver_shortcuts.upd fails to remove the kscreenlock group as expected.
Comment 4 Jekyll Wu 2012-12-03 17:36:58 UTC
Git commit 76a98ba45884d7d20790c5cf575f0b481cdfc1e4 by Jekyll Wu.
Committed on 03/12/2012 at 18:26.
Pushed by jekyllwu into branch 'master'.

Put the removal of kscreenlocker group into its own section

That should guarantee the removal

M  +4    -0    ksmserver/ksmserver_shortcuts.upd

http://commits.kde.org/kde-workspace/76a98ba45884d7d20790c5cf575f0b481cdfc1e4
Comment 5 Shlomi Fish 2012-12-05 22:51:34 UTC
Here on Mageia Linux Cauldron (what will be Mageia 3) with kdebase4-workspace-4.9.80-3.mga3 , Ctrl+Alt+L causes the screen to freeze without an ability to revert to a working state. The mouse cursor still moves, but no other command is accepted. It also happens in a new UNIX user account.

Regards,

-- Shlomi Fish
Comment 6 Will Stephenson 2013-01-10 14:58:59 UTC
(In reply to comment #3)
> (In reply to comment #0)
> 
> > It's shown in the settings->global keyboard->shortcuts->kscreenlocker->lock
> > session as ctrl+alt+l
> > so that's still there.
> 
> Not sure about the shortcut "not working" problem, but if there is still
> kscreenlocker in that drop down list, then  ksmserver_shortcuts.upd fails to
> remove the kscreenlock group as expected.

4.9.97: The shortcut works for me, and the kscreenlocker section is gone from kglobalshortcutsrc.

Jekyll, please update to Fixed if appropriate.
Comment 7 Will Stephenson 2013-01-10 15:01:55 UTC
*** Bug 312051 has been marked as a duplicate of this bug. ***
Comment 8 Jay LaCroix 2013-01-13 22:24:48 UTC
I am still having this problem currently. Using RC2 on Kubuntu. CTRL+ALT+L does absolutely nothing.
Comment 9 Jay LaCroix 2013-01-20 22:24:11 UTC
Same problem in RC3. This bug needs to be reopened. Can someone with appropriate access rights open this back up?
Comment 10 markuss 2013-01-20 23:04:38 UTC
Per comment 9
Comment 11 A. Cid 2013-02-07 09:31:36 UTC
Upgrading from KDE SC 4.9 to 4.10 on my Kubuntu machine, I resolved this issue just by going to the Global Keyboard Shorcuts and removing the kscreenlocker Component, then reassigned Ctrl+Alt+L to Session Manager's Lock Screen action.
Comment 12 Jekyll Wu 2013-02-07 18:10:49 UTC
*** Bug 311377 has been marked as a duplicate of this bug. ***
Comment 13 Graeme Hewson 2013-02-07 18:16:10 UTC
I'm not experiencing the problem in 4.10 final after upgrading from 4.9.5.
Comment 14 Γιώργος Κυλάφας (Giorgos Kylafas) 2013-02-07 20:19:33 UTC
Kubuntu 12.10 with KDE SC 4.10. Solution in comment 11 did the trick for me too, thanks.
Comment 15 Jekyll Wu 2013-02-08 20:03:24 UTC
*** Bug 314680 has been marked as a duplicate of this bug. ***
Comment 16 Daniel Duris 2013-02-08 22:24:57 UTC
I confirm. solution #11 works for me. it just needs to be reassigned from kscreenlocker to kde session manager->lock screen. you don't have to remove kscreenlocker component. just reassing the shortcut.
Comment 17 Alex 2013-02-10 20:25:38 UTC
Same problem here (Ubuntu 12.10 with KDE 4.10 PPAs) and I solved as for #16
Comment 18 altosch 2013-02-11 08:56:14 UTC
I can confirm this too. Kubuntu 12.10 + KDE 4.10.00:  A. Cid's solution worked for me. Thanks.
Comment 19 Conor O'Callaghan 2013-02-11 09:57:44 UTC
The same issue occurs for me on 4.10.00 "release 546" opensuse 12.2 x86_64 after upgrade from 4.8.4 . 

I cannot use solution #11 as KDE on opensuse doesn't have this session management section.
Comment 20 Dima Ryazanov 2013-03-05 22:48:40 UTC
Same here. This is a pretty serious problem.
Comment 21 Ralf Jung 2013-03-09 16:34:55 UTC
After upgrading from KDE 4.9.5 to KDE 4.10.1, the global shortcut to lock the session is broken. I am using a self-compiled KDE installation.
Comment 22 Stefan Becker 2013-03-18 09:50:14 UTC
Same problem after updating to 4.10.1 on Fedora 18. This is a serious issue as I rely on this feature a lot.

comment 11 doesn't work for me, because I don't have "Global Keyboard Shortcuts/Session Manager" in my system setting.

Adding CTRL-ALT-L as keyboard shortcut to the Lock/Logout widget doesn't work.
Comment 23 Stefan Becker 2013-03-18 10:04:17 UTC
(In reply to comment #22)
> comment 11 doesn't work for me, because I don't have "Global Keyboard
> Shortcuts/Session Manager" in my system setting.

Found a workaround:

- from command line "qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock"
- add Custom Short Cut:
 * New -> Global Shortcut -> D-Bus Command
 * name: "Lock Screen"
 * Trigger: CTRL-ALT-L
 * Action
   - remote application: org.freedesktop.ScreenSaver
   - Remote object: /ScreenSaver
   - Function: Lock
Comment 24 Stefan Becker 2013-03-18 17:51:27 UTC
This seems to be a KDE 4.9.5 -> 4.10.1 configuration update problem. I've now updated my second Fedora 18 system and everything went fine: there is "Global Shortcuts"/"The KDE session manager" and that has the "Lock Screen" action with the default CTRL-ALT-L. So on that system it works fine.

I removed the workaround on my first system and fixed the configuration instead:

 - run "kbuildsycoca4 --noincremental"
 - open System Settings -> Global Keyboard Shortcuts
 - "KDE component" dropdown: if you still have "kscreenlocker" in the list, select it, then choose from the "File" dropdown "Remove component" to remove this obsolete entry.
 - open the "KDE component" dropdown: if you don't see "The KDE Session Manager" *PLEASE* make sure to SCROLL DOWN the scrollbar on the right hand side to the BOTTOM! (on my machine "The KDE Session Manager" is the last entry)
 - Select "Lock Session" and tick the "Default" choice to reset the default to CTRL-ALT-L
Comment 25 Amine Roukh 2013-03-18 18:55:29 UTC
Fix in 24 works great, thank you Stefan :)
Comment 26 Sérgio Basto 2013-03-19 21:38:49 UTC
#24  Stefan , remove component "kscreenlocker" in the list, becuase is obsolete entry. do the trick 
many thanks.
Comment 27 Dima Ryazanov 2013-04-15 19:06:39 UTC
Still happens in KDE 4.10.2 - now on a different computer, after upgrading from Ubuntu 12.10 to 13.04.
Comment 28 Andrew 2013-05-01 08:12:26 UTC
(In reply to comment #24)
Fix works for KDE 4.10.2 @ Fedora 18 x64, thanks!
Comment 29 Peter Albrecht 2013-05-11 18:25:23 UTC
I can confirm this bug on my gentoo linux machine. I did an upgrade of KDE from 4.9.5 to 4.10.2, and then the "screen lock" shortcut was broken. Fortunately the solution in comment #11 worked for me. Thanks alot!
Comment 30 Flavio 2013-05-19 19:33:56 UTC
(In reply to comment #11)
> Upgrading from KDE SC 4.9 to 4.10 on my Kubuntu machine, I resolved this
> issue just by going to the Global Keyboard Shorcuts and removing the
> kscreenlocker Component, then reassigned Ctrl+Alt+L to Session Manager's
> Lock Screen action.
Excuse me, but I did not understand how to reassign to Session Manager's Lock Screen Action.
If I go to Startup&Shutdown and then Session Management I'm not able to do that. I don't even know what to do in Shortcut and Gestures to reassign CTRL+ALT+L.
I use Gentoo Linux - KDE 4.10.2 too.
Comment 31 Peter Albrecht 2013-05-21 19:19:03 UTC
(In reply to comment #30)
> Excuse me, but I did not understand how to reassign to Session Manager's
> Lock Screen Action.
> If I go to Startup&Shutdown and then Session Management I'm not able to do
> that. I don't even know what to do in Shortcut and Gestures to reassign
> CTRL+ALT+L.
> I use Gentoo Linux - KDE 4.10.2 too.

(After having removed the "kscreenlocker component".)
To reassign the shortcut go to:
  K-Menu -> Settings -> System Settings -> Shortcuts and Gestures -> Global Keyboard Shortcuts -> KDE component: The KDE Session Manager
There, assign "Lock Session" to "Custom: None", click "Apply", assign it back to "Default: Ctrl + Alt + L"
and click "Apply" again.
This did the trick for me.
Comment 32 Flavio 2013-05-21 20:45:18 UTC
(In reply to comment #31)
> This did the trick for me.
Thanks a lot! It did the trick for me too!
Comment 33 Simon 2013-05-31 07:29:37 UTC
Hmm, that explains my difficulties. I don't have The KDE Session Manager component available.
I worked around the problem by using a custom Shortcut with the command:
'qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock'

Not sure this is a clean solution though.
Comment 34 Dima Ryazanov 2013-10-14 10:21:09 UTC
The workaround fixed the problem for me... I don't understand, though, why the bug is closed as "fixed". Is every KDE user expected to find this bug report and apply the workaround manually?
Comment 35 Glenn 2014-04-24 04:28:00 UTC
*** This bug has been confirmed by popular vote. ***
Comment 36 Martin Flöser 2015-01-23 13:08:03 UTC
As far as I know we shipped a kconfig update script to migrate the shortcut. Apparently this has not run for all users, which is of course bad.

Unfortunately there is nothing which we could still do at this point as the development has already transited to the 5.x world where the shortcuts are newly assigned and don't need a transition. Given that I consider the bug as fixed.