[SRU]Some keyboard shortcuts randomly stop working

Bug #1188569 reported by Mohammad
124
This bug affects 25 people
Affects Status Importance Assigned to Milestone
GNOME Shell
New
Undecided
Unassigned
Unity
Confirmed
Undecided
Unassigned
unity (Ubuntu)
Invalid
Undecided
Unassigned
unity-settings-daemon (Ubuntu)
Fix Released
Undecided
Khurshid Alam

Bug Description

*Impact

Hi,
Certain shortcuts randomly stops working in my computer. They are Super+s (workspace switcher), Super+Up (switch to workspace above) and Super+Down (switch to workspace below). Other shortcuts work fine.

*Test Case

A few notes that might help:
1- Reassigning shortcuts make them work again except for Super+s.
2- Rebooting make shortcuts work.
3- I have been using these shortcuts with many previous ubuntu versions and my preferences are old.
4- I am not sure of certain steps that produces the problem. The shortcuts sometimes stop working but once they stop, they do not work unless I reassign them or reboot.

I am using Ubuntu 13.04.

Thank you

* Regression potential

None

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: unity 7.0.0daily13.04.18~13.04-0ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-23.34-generic 3.8.11
Uname: Linux 3.8.0-23-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,regex,grid,mousepoll,place,wall,snap,resize,vpswitch,session,animation,gnomecompat,imgpng,commands,move,workarounds,fade,unitymtgrabhandles,expo,scale,ezoom,unityshell]
Date: Fri Jun 7 13:40:06 2013
InstallationDate: Installed on 2013-05-27 (11 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
SourcePackage: unity
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Mohammad (thebsom) wrote :
tags: added: shortcut
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity:
status: New → Confirmed
Revision history for this message
Joel Östblom (joel-ostblom) wrote :

This bug is still present for me in 14.04. A reboot fixes it temporarily.

Revision history for this message
Andreas Tj (tjandreas) wrote :

I just noticed it happen to me as well. Lock screen ctrl-alt-l and swich language super-space.

Revision history for this message
Erik M (erik-martens) wrote :

I got the same. I made a different post, bug 1405214, and list some observations here:
https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1405214

Whenever shortcuts stop working, and
unity-settings-daemon
crashes then also. (and it seems notify-osd, too, but I'm not sure)

It seemed first that
unity-tweak-tool --reset

fixed the issue -- but the problem returned (careful, many of your unity custom settings will be lost and you need to reconfigure if you do this!)

I still get the impression that this crash may be related to docking my laptop -- at least I need to suspend and wake several times, otherwise it doesn't happen. Anyone else seeing this behavior?

--> This is super annoying and debilitates my work flow enormously, as I favor shortcuts vs. mouse usage!

Revision history for this message
Erik M (erik-martens) wrote :

A workaround is to either open a terminal or Alt+F2 and issue the command 'unity' . This fixes the shortcuts by restarting unity, but all applications keep running, wihout login/out.

You may want to try to run this command on resume|thaw in /usr/lib/pm-utils, since the keyboards (for me) seem to get lost on docking/undocking and related resumes; but I'm still testing, so i don't now if this is a robust (automatic) workaround.

Revision history for this message
Tim Rayner (tim-rayner) wrote :

This also affects me on 15.04; various shortcuts including Ctrl-Alt-T for terminal, which is potentially crippling. The 'unity' workaround above does seem to fix the problem temporarily.

Revision history for this message
Woody (wo0dy) wrote :

@Erkik M no running unity with alt + F2 does not result in not being logged out and all applications running. I get logged out, all applications close on Ubuntu 14.04 x64

Revision history for this message
Dawid Laszuk (laszukdawid) wrote :

I'm amazed that such annoying thing has been left for more than 3 years. Moreover, this is not the only bug ticket with such description.

Revision history for this message
Juan Pablo de la Torre (jpdelatorre) wrote :

I'm having this same issue in Ubuntu 18.04. It was working perfectly with 17.10.

Revision history for this message
am (i4ex) wrote :

Damned, the same issue in Ubuntu Budgie 18.04 LTS after all of this time! Are you really?
Some shortcuts is randomly stop working without any reason... And it can't be detected why.
Do something!

Revision history for this message
William (banasura) wrote :

Same bug also under Ubuntu Budgie 18.04.

Revision history for this message
fossfreedom (fossfreedom) wrote :
Revision history for this message
Alejandro A. (volley) wrote :

i'm also affected by this bug since upgrading to 18.04 :( Since i make heavy use of the keyboard including shortcuts.
For instance, the first and most-used shortcut where i notice the bug is using ALT+X for opening terminals (i always remap that from the ubuntu default ctrl+t or something).

@fossfreedom:
i tried all suggestions ahead, also changing the keyboard input method from ibus to none, but nothing changed.

As above, shortcuts keep stop working randomly, the only way to get them back is resetting them via settings -> keyboard -> shortcut (even if the shortcut still shows there), logging out and in again or restarting.

If i can provide any information or do some quick tests, i'd be glad to help. Even any possible workaround, e.g. revert some package to an older version or something. This bug is getting really annoying :(

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

For Unity (18.10, 18.04):
--------------------------

1) All default shortcuts (super+L, ctrl+alt+l) works on fresh install. For some people toggling custom-commands from ccsm (compiz-config-settings-manager) makes everything works. But hard to reproduce.

2) Custom keybinding shortcuts will not work until a re-login. Possibly a bug in unity-settings-daemon. see bug #1435020

3) Print-screen, alt+Print-screen have some problem with key-press vs key-release due to ubuntu removing 6 years old xorg patch. see LP: #1683383

4) Key combination which are hard-coded (ex. ctrl+alt+backspace to kill x-server) doesn't not if it is set to do other things. Possibly bug in u-s-d.

5) Media keys (Volume and Mute etc) doesn't work for some people. But it is most likely device specific. For me it works. Some make it work after restarting u-s-d (unity-settings-daemon -r &) or toggling commands plugin from ccsm. See bug #1727842

To debug properly do this on fresh install:

1) Open terminal on unity.
2) Run "unity-settings-daemon -r --debug", keep it open
3) Now Try removing existing custom shortcut from Unity control center -> keyboard -> shortcuts
4) Try re-adding the shortcut.
5) Paste the output from terminal on https://pastebin.ubuntu.com/

Other sessions with g-s-d:
------------------------
For gnome sessions it could be this bug #1750846, though I am not sure.

Revision history for this message
teo1978 (teo8976) wrote :

I see a bunch of apparently different issues described in several comments here.

What I observe on 16.04 is that, at random times (usually after booting, not sure if I ever observed it in the middle of a session), these shortcuts among others stop working: volume up/down keys, Ctrl+Alt+T for opening a terminal, PrintScreen and Shift+PrintScreen, and not sure what else. However, alt+tab and some others keep working normally.

When I observe this, unity-settings-daemon has NOT crashed (at least, ps aux shows it as a running process, I guess it means it has not crashed strictly speaking), contrary to comment 5.

Restarting unity-settings-daemon (by killing it, it restarts automatically) fixes the issue for me 100% of the times, without the need to do anything else.

Is this the same issue this report is about, or not?
I had reported it separately as issue 1731294 and I'm told it's a duplicate.

My impression is that there are several completely different issues here being mixed together, and 1731294 might be one of them.

Revision history for this message
Alejandro A. (volley) wrote :

Hi again,

i tried several suggested workarounds or options but they didn't help.
1) Restarting unity-settings-daemon as suggested in #15 and other posts makes things unusable: all shortcuts and even my trackpad stop working completely. Only a logout helps in that case.

2) As a workaround, i do re-set some shortcuts via commandline to make them work again, e.g.: with

  gsettings set org.gnome.settings-daemon.plugins.media-keys terminal `gsettings get org.gnome.settings-daemon.plugins.media-keys terminal`

3!!) The most noticable thing i achieved is, that i can reproduce it by simply locking my screen. Once i unlock it, at least the terminal-shortcut (which i use most to test) stops working and i have to use (1) to make it work again.
Funnily enough, the shortcut for locking the screen never stops working....

HTH

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

I found the root cause. Unity uses legacy keygrabber code depending on xdg env variable DESKTOP_SESSION. But since artful DESKTOP_SESSION is "unity" and not "ubuntu".

The fix is in unity7-desktop ppa.

https://code.launchpad.net/~unity7maintainers/+archive/ubuntu/unity7-desktop

In 18.10, add the ppa (ppa:unity7maintainers/unity7-desktop)and upgrade unity-settings-daemon and libunity-settings-daemon.

Now all shortcuts works as expected.

Note: The ppa also the fix for sharing panel.

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Keyboard switcher shortcuts probably still won't work due to above xorg bug.

Changed in unity (Ubuntu):
status: Confirmed → Invalid
Changed in unity-settings-daemon (Ubuntu):
status: New → Confirmed
assignee: nobody → Khurshid Alam (khurshid-alam)
Revision history for this message
teo1978 (teo8976) wrote :

@18 Does that explain that the issue happens RANDOMLY - i.e. every time I boot, shortcuts may or may not be working?

In my case all of these shortcuts stop working at once (i.e. either they all work, or none of them does, never some and some):
- Ctrl+Alt+T
- all or most special keys, e.g. Volume +/-/mute, switch screens (which on my laptop is Fn+F6)
- PrintScreen and Shift+PrintScreen
- maybe others that I don't remember.

Killing unity-settings-daemon (which automatically restart) systematically fixes it. But it breaks stupid Nautilus, so then I have to kill and relaunch Nautilus too.

Is this actually the same issue??

And if so, what's the fix for 16.04?

Revision history for this message
Alejandro A. (volley) wrote :

@18
Installing the unity-settings-daemon from mentioned ppa in 18.04 fixed my problems completely :)

Thank you very much for your efforts!

Revision history for this message
Arfian (arfianadam) wrote :

@18 is the fix gonna be merged to the main repo soon?

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

@Arfian

Yes, it will go soon into 19.04. Once it lands there it will be SRUed for 18.10 and 18.04.

Revision history for this message
Arfian (arfianadam) wrote :

@Khurshid your solution works but it seems it doesn't affect media keys. Media keys (Play/Pause, Stop, Previous, Next) still don't work. Do you think the root cause is the same?

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Media keys not working is different issue, patch is only for custom keyboard shortcuts randomly not working after getting back from lock screen.

About media keys I have tested 12 different machines, but I can't reproduce. For me play/pause have always worked even before the patch.

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

This bug was fixed in the package unity-settings-daemon - 15.04.1+19.04.20190209-0ubuntu2

---------------
unity-settings-daemon (15.04.1+19.04.20190209-0ubuntu2) disco; urgency=medium

  [ Khurshid Alam ]
  * Unity uses legacy key-grabber code. But since artful unity isn't the
    default session anymore and DESKTOP_SESSION changed from ubuntu to unity.
    Fixes LP: #1755106 LP: #1188569 LP: #1727842

 -- Sebastien Bacher <email address hidden> Fri, 01 Mar 2019 17:53:16 +0100

Changed in unity-settings-daemon (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Max (m-gorodok) wrote :

unity-settings-daemon 15.04.1+19.04.20190209-0ubuntu2 built for Ubuntu-18.04 bionic works for me. Please, backport changes to the LTS version.

I have faced a problem with non-working keyboard language switcher in unity desktop. It works till next screen lock. An irritating workaround is to set shortcut again in system settings → Keyboard → Shortcuts → Typing → Switch to next source.

The trivial patch I have had to apply is removing gnome-settings-daemon-common dependency.

--- unity-settings-daemon-15.04.1+19.04.20190209.orig/debian/control 2019-03-13 04:44:44.000000000 +0000
+++ unity-settings-daemon-15.04.1+19.04.20190209/debian/control 2019-03-13 03:56:15.778916801 +0000
@@ -58,7 +58,6 @@
          accountsservice (>= 0.6.34),
          gsettings-desktop-schemas (>= 3.15.4),
          nautilus-data (>= 2.91.3-1),
- gnome-settings-daemon-common (>= 3.16),
          gsettings-ubuntu-schemas (>= 0.0.7+17.10.20170922),
 Recommends: ibus (>= 1.5.0),
             pulseaudio,

summary: - Some keyboard shortcuts randomly stop working
+ [SRU]Some keyboard shortcuts randomly stop working
description: updated
tags: added: verification-needed-cosmic
Revision history for this message
Tyler M Slaughter (techtiger255) wrote :

I found a solution that works on Ubuntu 19.04...
     - Note: This is only for media keys (the keybindings that stop working for me)
     - Note: If you know a better way to set the keybindings to disabled then do that! ;)
Steps:
 1) Open Terminal and enter:
    "sudo apt install playerctl"

    then to be sure run "restart"
 1) Go to settings
 2) Find keyboard shortcuts (devices > keyboard)
 3) Find play-pause under media and set it to:
    Ctrl+Shift+E or something you don't use (this is what I used)
      Explanation: you need to disable these shortcuts to actually use them (with playerctl)
    (Do this for each predefined media key keybinding, when you do it'll disable the last one
     done and they'll all be set to disabled except for one which is set to Ctrl+shift+E or
     whatever you chose)
 4) Scroll to the bottom
 6) Create a new custom keyboard shortcut
 7) Set the name according to which action you desire, set the command to something similar to:
    "playerctl pause-play --player=spotify" more documentation can be found here:
    https://github.com/altdesktop/playerctl
 8) Repeat steps 5-7 for each media key & modify the command accordingly (see Github link)
 9) Create a new keyboard shortcut called deleteMe 1.0
 10) Bind this to whatever you chose earlier (Ctrl+shift+E is what I used)
 11) Now delete it! Ha, bet you didn't see that one coming! Anyways now all the media keys above
     should be set to disabled, now use your newly invigorated keybindings with ease! ;)

Revision history for this message
Tyler M Slaughter (techtiger255) wrote :

well that's funny... I did 2x 1's... well that shows how tired I am!

Revision history for this message
Salih114 (salih-aad) wrote :

Hello together,

I am running Ubuntu 18.04 with the Unity DE. In my case only the keyboard shortcut for changing the input-language is affected. Changing input-method to "none" solves the problem only until waking from the next suspend. The keyboard shortcut stops working after that.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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