Volume and Mute buttons on keyboard not doing anything in Unity after upgrade to 17.10

Bug #1727842 reported by Markus Birth on 2017-10-26
132
This bug affects 26 people
Affects Status Importance Assigned to Milestone
unity-settings-daemon (Ubuntu)
Undecided
Unassigned

Bug Description

After upgrade to 17.10, my volume up/down and mute buttons/keys don't change anything.

They keys get recognised in keyboard configuration as "Audio lower volume" and "Audio raise volume" and "Audio mute". But pressing them doesn't do anything.

Inside applications, the other media keys ("Play/Pause", "rewind", "forward") work fine.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: unity 7.5.0+17.10.20171010-0ubuntu1
ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
Uname: Linux 4.13.0-16-generic x86_64
.tmp.unity_support_test.0:

ApportVersion: 2.20.7-0ubuntu3.1
Architecture: amd64
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,place,regex,move,session,gnomecompat,imgpng,resize,mousepoll,animation,unitymtgrabhandles,vpswitch,wall,grid,snap,expo,ezoom,fade,workarounds,scale,unityshell]
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
CurrentDesktop: Unity:Unity7:ubuntu
Date: Thu Oct 26 21:40:09 2017
DistUpgraded: 2017-10-12 22:36:20,416 DEBUG Running PostInstallScript: './xorg_fix_proprietary.py'
DistroCodename: artful
DistroVariant: ubuntu
EcryptfsInUse: Yes
GraphicsCard:
 Advanced Micro Devices, Inc. [AMD/ATI] RV730 XT [Radeon HD 4670] [1002:9490] (prog-if 00 [VGA controller])
   Subsystem: Hightech Information System Ltd. RV730 XT [Radeon HD 4670] [1787:2003]
MachineType: MICRO-STAR INTERNATIONAL CO.,LTD MS-7512
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-16-generic root=UUID=2f7f02c3-629a-404f-bc90-4771dd3019cf ro verbose nosplash
SourcePackage: unity
UpgradeStatus: Upgraded to artful on 2017-10-12 (13 days ago)
dmi.bios.date: 09/24/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: V1.7B14
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P45 Platinum (MS-7512)
dmi.board.vendor: MICRO-STAR INTERNATIONAL CO.,LTD
dmi.board.version: 1.0
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: MICRO-STAR INTERNATIONAL CO.,LTD
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrV1.7B14:bd09/24/2010:svnMICRO-STARINTERNATIONALCO.,LTD:pnMS-7512:pvr1.0:rvnMICRO-STARINTERNATIONALCO.,LTD:rnP45Platinum(MS-7512):rvr1.0:cvnMICRO-STARINTERNATIONALCO.,LTD:ct3:cvr1.0:
dmi.product.family: To Be Filled By O.E.M.
dmi.product.name: MS-7512
dmi.product.version: 1.0
dmi.sys.vendor: MICRO-STAR INTERNATIONAL CO.,LTD
version.compiz: compiz 1:0.9.13.1+17.10.20170901-0ubuntu1
version.libdrm2: libdrm2 2.4.83-1
version.libgl1-mesa-dri: libgl1-mesa-dri 17.2.2-0ubuntu1
version.libgl1-mesa-glx: libgl1-mesa-glx 17.2.2-0ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.19.5-0ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.10.5-1ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.10.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20170309-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.15-2
xserver.bootTime: Thu Oct 12 20:13:53 2017
xserver.configfile: default
xserver.errors:

xserver.logfile: /var/log/Xorg.0.log
xserver.version: 2:1.19.3-1ubuntu1.1
xserver.video_driver: radeon

Related branches

Markus Birth (mbirth) wrote :
Launchpad Janitor (janitor) wrote :

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

Changed in unity (Ubuntu):
status: New → Confirmed
md_5 (md-5) wrote :

I'd like to generalise this to "all keyboard shortcuts".
Setting a customised shortcut at all does not work, seems users other than me have the issue as well.
https://askubuntu.com/questions/972940/keyboard-shortcuts-stop-working-after-upgrading-to-ubuntu-17-10
https://askubuntu.com/questions/970617/compiz-shortcuts-not-working-on-ubuntu-17-10

Very annoying issue, 17.10 as a whole has not been so good :(

Khurshid Alam (khurshid-alam) wrote :

It's a issue with keyboard layout and machines which have dedicated volume keys. There are also some issues with gsd/usd. I use third level key (and you have to use proper keyboard layout to make it work) Fn + F10/F11 to make volume changes. And it works fine for. We need to find the actual root cause for this.

TomaszChmielewski (mangoo-wpkg) wrote :

Also media keys stopped working for me after switching from Gnome to Unity on Ubuntu 17.04.

Anton Keks (anton-azib) wrote :

Interestingly, rfkill shortcut works.
Seems like a problem in some particular modules of gnome-settings-daemon, e.g. gsd-media-keys

Jan Rathmann (kaiserclaudius) wrote :

I'm seeing this problem too.

What's really confusing for me is:

1. I have two fresh installs of Ubuntu 17.10 on different partitions

2. This bug occurs only on one of those installations; all keybindings work fine on the other one!

3. On the affected installation, the bug also occurs on freshly created, pristine user accounts.

4. I tried to reproduce the bug by making those two installations as similar as possible. E.g. I installed the same packages on the unaffected installation that I had installed on the affected installation - but still the bug did not appear there!

5. The main difference between those installations is that the affected one uses an exitisting home partition where all those application/desktop envirement configuration files of my main user account are existing since a long number of previous Ubuntu releases. While the unaffected installation doesn't use that home partition and a completely fresh home directory was created for the main user account. Well, one could think the bug is caused by some sort of faulty/"rotten" configuration file - but that doesn't explain, why freshly created user accounts on this installation are also affected from this bug (as described in 3. )...

The affected keybindings for me are (at least) application shortcuts (e.g. Ctrl + Alt + t), Volume keys and the Print-Button (which normally would make a screenshot).

Kind regards,
Jan

Jan Rathmann (kaiserclaudius) wrote :

I did another test: I mounted my home partition which I normally use only on my primary Ubuntu installation (the one affected by the bug, see comment #8) on my secondary installation (the one _not_ affected by the bug).

The result was interesting: The bug did not appear when booting this secondary installation with my "primary" home partition mounted as /home. The volume keys and other hotkeys still worked as exspected.

So this seemes to narrow down the problem cause a bit. Apparently, the bug has nothing to do with anything contained in the /home-directory. And, like described in #8, it seems to have nothing to do with certain packages installed, because I couldn't reproduce the bug by installing the same package selection on both systems.

So the cause of the bug seems to be "something system-wide" - like a different configuration option somewhere where I have no idea what had introduced it. I tried to spot some configuration differences by comparing /etc directories of both installations via diff - but none of the few differences seemes to be related to the problem.

Markus Birth (mbirth) wrote :

I don't know what happened, but yesterday, all hotkeys worked for some reason. After shutting down the PC over night and booting it up today with no changes made - they DON'T work again.

Markus Birth (mbirth) wrote :

I think I found a pattern: When I login immediately after GDM comes up, the hotkeys seem to work. When I wait a bit at the user selection and THEN login, the hotkeys DON'T work.

Khurshid Alam (khurshid-alam) wrote :

@Markus So gdm doing something? Please try with lightdm if you can reproduce. You can also from live usb using ubuntu-unity-ppa-amd64.iso (bionic).
http://people.ubuntu.com/~twocamels/archive/ubuntu-unity-ppa-amd64.iso

Khurshid Alam (khurshid-alam) wrote :

@Marcus

After logging to unity, Open terminal and run

unity-settings-daemon --debug -r

Check if you can still reproduce and report back terminal output to pastebin.ubuntu.com.

Markus Birth (mbirth) wrote :

This is after waiting a few minutes at the GDM logon screen. I also tested the media keys in GDM and they worked. But they DON'T work in Unity.

https://pastebin.ubuntu.com/26222796/

Jan Rathmann (kaiserclaudius) wrote :

I did some testing during the last days, and still this bug remains really strange.. I could not find a way to really reliable reproduce it or make it disappear.

I did several clean test installations of Ubuntu 17.10 and made the following steps after installation:
- First boot, log in (Gnome desktop starts)
- Install Unity: apt install unity-session, reboot
- Second boot, select Unity at GDM login
- Test if media keys, power button etc. work. Usually, it seems that the bug does _not_ appear on this second boot.
- Do nothing else, reboot.
- Third boot: Log in to Unity, test again, if keys work. Usually, the bug appears this time.
- On further reboots of the system, the bug may appear or not.

Then I did some testing with running 'unity-session-daemon --debug -r', and found out that it is possible to make the bug randomly appear or disappear by restarting unity-session-daemon.
The first briefly tests were run on my clean test installation, and afterwards I did some more exhaustive testing on my "main" Ubuntu installation, where the bug had appeared permanently so far.

During this "exhaustive testing" I repeatedly restarted u-s-d and checked every time if the keys were working. I had to do this approximately 15 times, until the bug disappeared for the first time and the keys worked!

I am attaching two log files:
- One containing a log of unity-settings-daemon where media keys etc. _did_ work
- Another one with a log of u-s-d where the bug appeared and they didn't work

Kind regards,
Jan

Markus Birth (mbirth) wrote :

Ah, I gave up after about 8 attempts without any luck - wanted to try some more today. Glad you did it first. :)

After cleaning up different port numbers and IDs, the only obvious difference between your logs seems to be something about the color-plugin.

I've attached the cleaned logs.

Markus Birth (mbirth) wrote :

Today I was able to get media keys working about every 3rd restart of unity-settings-daemon. I've saved 2 logs of each state. I suspect it has to do with the order the plugins are loaded.

I had this issue too after upgrading from 16.04 -> 17.04 and then 17.10 and changing from Gnome to Unity. I managed to restore media key functionality by disabling the commands plugin via CCSM. https://askubuntu.com/a/983914/170380

Markus Birth (mbirth) wrote :

My Commands plugin was already disabled and the media keys still don't work.

Markus Birth (mbirth) wrote :

After enabling it and disabling it again, the media keys work now for some reason.

Markus Birth (mbirth) wrote :

After a reboot, with nothing else changed, media keys are no worky again. So it's NOT the Commands plugin.

Same thing here, but the media keys do work again after toggling them either on or off. Does anyone know a way to script those commands as a post-login command as a short-term workaround?

Jan Rathmann (kaiserclaudius) wrote :

I can also confirm that toggling the Commands-plugin in CCSM is a temporary workaround for the bug on my system.

md_5 (md-5) wrote :

Confirming toggle workaround also

Dane Jensen (dorvin) wrote :

CCSM toggle workaround functions for me as well.

Dimitrij Mijoski (dimztimz) wrote :

I have problems not with media keys but with some keyboard shortcuts, the shortcut for changing input language for me.

I noticed the bug happens only with lightdm login manager. Lets say I lock or suspend the PC. After I unlock it the keyboard shortcut does not work.

If I set lightdm as the startup login, instead of gdm3, the shortcut does not work from the start.

Basically:

1. Login from gdm3 after boot - OK
2. Login from lightdm after boot - BAD
3. Wake up from lightdm after suspend - BAD

Khurshid Alam (khurshid-alam) wrote :

@Dimitrij

Your bug is this: bug #1683383

It's a xorg bug.

Dimitrij Mijoski (dimztimz) wrote :

What makes you think it is that bug? I see that is an old bug since years ago. I got this bug only after I updated to Ubuntu 17.10.

aproposnix (rimez) wrote :

After a recent (the last since posting this) update of Ubuntu 18.04, this issue has appeared. When I try to use the keyboard to change the volume, nothing happens.

I logged into Ubuntu Desktop and it works.

I have uninstalled gnome shell + Ubuntu dekstop, leaving only Unity Desktop but the problem is still there.

Any clues?

Achim Behrens (k1l) wrote :

I am running 18.04 with unity and just tested some other Desktops that are installed long time also: LXQt, Budgie, gnome (wayland and xorg). Gnome crashed on both. After relogin to unity the keys didnt work while "sudo showkey" shows that the buttons are working. They even get the function in the Shortcut dialog in the systemsettings.

Turns out it was the "commands" plugin in ccsm that was activated. Installed ccsm, deactivated commands: Buttons work again.

Khurshid Alam (khurshid-alam) wrote :

@@Dimitrij Ubuntu removed 5 years old xorg patch and the updated xorg version went into 17.10 later. That's why you are you are facing the issue after updating to 17.10.

Achim Behrens (k1l) wrote :

so after some reboots i need to change my last comment:

right now i need to toggle the commands plugin every time i login for the mediakeys to work. :/

One more datapoint: running unity/lightdm 18.04 on Dell XPS 13. At first my media keys didn't work, along with KB layout switch, ctrl+alt+T for terminal, etc. Installing ccsm and disabling commands plugin helped with most.

Keyboard layout switch using alt+shift/ctrl+shift works fine after first login. However, after locking/logging out and logging back in, alt+shift stops responding, requiring toggling ccsm/commands to make it switch layouts again.
KB layout switch using ctrl+shift works at all times (but bug #1683383 rears it's ugly head whenever I'm trying to copy/paste from/to terminal using ctrl+shift+[CV]).
KB layout switch using super+space never works for me.
No keyboard shortcuts at all work on lightdm login screen.

Weird stuff.

Dimitrij Mijoski (dimztimz) wrote :

I can confirm that keyboard layout switching

1. stops working after lightdm/unity lock screen appears
2. continues to work if I toggle the Commands plugin in ccsm. Does not matter if I'm disabling or enabling, any toggle does the trick.

Moreover, toggling any other plugin makes keyboard layout switching work, not just commands. E.g. try with Color filter. Seems like toggling a plugin restarts compiz.

I guess the bug is somewhere in compiz. Bisecting compiz between 17.04 and 17.10 may help tracking this bug.

Dimitrij Mijoski (dimztimz) wrote :

Or maybe it is a bug in Unity because Unity is a plugin of Compiz and when Compiz restarts, probably Unity also restarts, right?

Dimitrij Mijoski (dimztimz) wrote :

Just tested Ubuntu MATE with Compiz and had no issues switching keyboard layout, so probably the problem lies within Unity code.

nvrmndr (nvrmndr) wrote :

Same as @dimztimz - toggling Commands plugin (doesn't matter on or off) in ccsm seems to make media keys work again.

tristanf (tristanf) wrote :

I've been having the same issue since 17.10 and now on 18.04 with Unity same problem again. As mentioned above toggling 'Commands' plugin in CCSM (enabled, then disabled) works for me also.

Whilst it isn't a perfect solution, but with the help of this post: https://askubuntu.com/questions/936644/configuring-compiz-window-manager-using-command-line-utilities

I managed to put together a couple of command lines (one to enable, followed by one to disable 'Commands') that can be added to startup applications which works ok for me as a workaround.

for my system (yours may vary, see later) the command lines in terminal are:

(enable)
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ active-plugins "['core', 'composite', 'opengl', 'place', 'regex', 'resize', 'session', 'snap', 'vpswitch', 'wall', 'animation', 'commands', 'compiztoolbox', 'fade', 'grid', 'imgpng', 'mousepoll', 'move', 'scale', 'workarounds', 'expo', 'ezoom', 'switcher', 'unityshell']"

(disable)
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ active-plugins "['core', 'composite', 'opengl', 'place', 'regex', 'resize', 'session', 'snap', 'vpswitch', 'wall', 'animation', 'compiztoolbox', 'fade', 'grid', 'imgpng', 'mousepoll', 'move', 'scale', 'workarounds', 'expo', 'ezoom', 'switcher', 'unityshell']"

As i say above, your active plugins list may be different, if you issue the following command (with 'Command' enabled and then disabled in CCSM you will get the lists you need. Basically both lists are the same, just the enable includes 'commands' and the disable excludes 'commands':

#dconf dump /org/compiz/profiles/unity/plugins/core/ | grep active-plugins

So add an ENABLE command to startup applications and a DISABLE command to startup applications.

I did have a go a putting both commands into a bash script but with no luck, it isn't something i'm well versed with. Having the two commands as individual startup applications has worked for me though with multiple reboots and volume keys working everytime.

This is my first post on these forums so i hope it helps someone!

Roland Sommer (rsommer) wrote :

I can confirm a very strange behaviour of media keys after release-upgrade from 16.04 to 18.04 (unity-desktop). At first, media keys seemed to have stopped working at all, but that is not the case. If I press for example the "mute" key, it takes about 25 seconds before the muting succeeds. At the same time, the syslog says:

May 9 09:43:29 bionic unity-settings-[7849]: Failed to connect to proxy

Switching 'commands' on/off via ccsm does not help.
On the loging screen when using gdm3, all keys work as expected.
On the loging screen when using lightdm, the bevahiour is as described above.

Roland Sommer (rsommer) wrote :

A clean ee-install of ubuntu 18.04 (with netinstall / ubuntu-unity-desktop) fixed this for me.

What events you get when running `xev -root -event keyboard`

Here's my output for Alt+Tab: I get the same result no matter if it's responsive (first login, toggled a CCSM plugin) or not:

17:28:21 ~$ xev -root -event keyboard

KeymapNotify event, serial 17, synthetic NO, window 0x0,
    keys: 78 0 0 0 0 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

KeymapNotify event, serial 17, synthetic NO, window 0x0,
    keys: 78 0 0 0 0 0 4 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

Maarten Sijm (mpsijm) wrote :

Using my HP ZBook Studio G3 and Xubuntu 18.04 (upgraded from 16.04), I've got all Fn-keys working except volume, mute and brightness.
Using an external keyboard with media keys, the volume up/down/mute keys don't work either.
I have never had the "Commands" Compiz plugin enabled.

Krzysztof Ostaszewski (mdfrg) wrote :

I've noticed media keys (volume up, down, mute) stop working after screen is locked (with lightdm). SO for me it is not the case of suspend, but the scrrenlock after waking from suspend. Ubuntu 18.04 with Unity 7.5 installed

Krzysztof Ostaszewski (mdfrg) wrote :

The bug only affects those three shortcuts and ONLY if they are custom (changed from defaults): volume up, down and mute. If I stick to defaults everything (including other custom shortcuts) works even after screen lock / suspend. I suspect it is connected with lightdm / unity greeter.

Khurshid Alam (khurshid-alam) wrote :

@Krzysztof Ostaszewski

Media keys doesn't work within lock-screen or when you unlock and within the session ?

Maarten Sijm (mpsijm) wrote :

Had to re-install my OS, and the volume keys now work for me again. Still using Xubuntu 18.04, though this time a fresh install.

Dimitrij Mijoski (dimztimz) wrote :

I did a fresh install of vanilla Ubuntu 18.10, later updated to 19.04, and I installed Unity via `apt install unity`. The bug with keyboard shortcuts not working after locking screen disappeared. Hooray. I'm not sure what got changed. Big thanks to @khurshid-alam for maintaining Unity.

Changed in unity (Ubuntu):
status: Confirmed → Fix Released
affects: unity (Ubuntu) → unity-settings-daemon (Ubuntu)
To post a comment you must log in.