Media, brightness and volume keys don't work with GNOME 3.15.90

Bug #1427877 reported by Fran Diéguez
168
This bug affects 31 people
Affects Status Importance Assigned to Milestone
GNOME Settings Daemon
Unknown
Medium
GNOME Shell
Invalid
Medium
Ubuntu GNOME
Fix Released
Undecided
Unassigned
gnome-settings-daemon (Ubuntu)
Fix Released
High
Unassigned
Nominated for Wily by Alberto Salvia Novella

Bug Description

After upgrading Ubuntu 15.04 Vivid to use GNOME 3.15.90 (by using gnome3-team/gnome3, gnome3-team/gnome3-staging ppas) media, brightness and volume keys from my laptop keyboard stop to work after working some time in a session or after suspending the computer.

If I restart my computer media keys work again.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: gnome-settings-daemon 3.15.90-0ubuntu1~vivid1 [origin: LP-PPA-gnome3-team-gnome3-staging]
ProcVersionSignature: Ubuntu 3.19.0-7.7-generic 3.19.0
Uname: Linux 3.19.0-7-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.16.2-0ubuntu1
Architecture: amd64
CurrentDesktop: GNOME
Date: Tue Mar 3 23:07:33 2015
InstallationDate: Installed on 2014-10-22 (132 days ago)
InstallationMedia: Ubuntu-GNOME 14.10 "Utopic Unicorn" - Alpha amd64 (20140923)
SourcePackage: gnome-settings-daemon
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Fran Diéguez (frandieguez) wrote :
Revision history for this message
Tim Lunn (darkxst) wrote :

did you logout/login after upgrading? if so please attach logs (~/.cache/upstart/gnome-settings-daemon.log)

Revision history for this message
Fran Diéguez (frandieguez) wrote :

Hi Tim,

I have to improve the bug description because I don't get this error evertime. If I restart my computer media keys work again but I spend some time working in a session or after suspending the computer they stop working.

It's quite weird.

description: updated
Revision history for this message
Fran Diéguez (frandieguez) wrote :

To increase the weirdness of the issue:
 - Volume slider in g-s top left menu works but the brightness slider doesn't work
 - If I go to Settings->Power the UI got frozen and it takes almost 20 seconds to show the panel. Find below the error output

(gnome-control-center.real:7317): GLib-CRITICAL **: g_variant_get_type: assertion 'value != NULL' failed

(gnome-control-center.real:7317): GLib-CRITICAL **: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed

(gnome-control-center.real:7317): GLib-CRITICAL **: g_variant_get_boolean: assertion 'g_variant_is_of_type (value, G_VARIANT_TYPE_BOOLEAN)' failed

(gnome-control-center.real:7317): GLib-CRITICAL **: g_variant_unref: assertion 'value != NULL' failed

Again if I reboot my computer those errors got fixed until some time passes.

Revision history for this message
Tim Lunn (darkxst) wrote :

does restarting g-s-d (gnome-settings-daemon -r ) fix this also?

Changed in ubuntu-gnome:
milestone: none → trusty.2
milestone: trusty.2 → none
milestone: none → ww
Revision history for this message
Tim Lunn (darkxst) wrote :

and/or gnome-shell (alt+f2 r)?

Revision history for this message
Fran Diéguez (frandieguez) wrote :

Tim, I've restarted g-s-d and g-s and that doesn't fix the problem. I have figured out that this problem is only reproducible after resume from suspend.

The only solution for this is restart my computer.

Find below output from restarting g-s-d:

$ gnome-settings-daemon -r 127 ↵

** (gnome-settings-daemon:31910): WARNING **: You can only run one xsettings manager at a time; exiting

** (gnome-settings-daemon:31910): WARNING **: Unable to start gnome_xsettings manager: Could not initialize xsettings manager.

(gnome-settings-daemon:31910): clipboard-plugin-WARNING **: Clipboard manager is already running.

(gnome-settings-daemon:31910): GLib-GObject-WARNING **: cannot register existing type 'GsdDeviceManager'

(gnome-settings-daemon:31910): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(gnome-settings-daemon:31910): common-plugin-CRITICAL **: gsd_device_manager_list_devices: assertion 'GSD_IS_DEVICE_MANAGER (manager)' failed

(gnome-settings-daemon:31910): media-keys-plugin-WARNING **: Failed to set new screen percentage: Timeout was reached

(gnome-settings-daemon:31910): media-keys-plugin-WARNING **: Failed to set new screen percentage: Timeout was reached

(gnome-settings-daemon:31910): media-keys-plugin-WARNING **: Failed to set new screen percentage: Timeout was reached

Revision history for this message
Fran Diéguez (frandieguez) wrote :

Latest updates gave new results:

Now after Alt-F2, 'r' in gnome-shell and executing from a terminal 'gnome-settings-daemon -r &' volume, media and brightness keys work again. but keyboard backlight keys don't work yet.

Changed in gnome-shell:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Joe Barnett (thejoe) wrote :

Seeing this here as well, it seems to also affect configured launcher hotkeys (eg ctrl+alt+w mapped to web browser in keyboard shortcuts control panel). I also see it happen before suspending, not sure what triggers it, but some amount of time after the session starts something does...

also closing the laptop lid does not result in suspend anymore -- not sure if that's related?

Revision history for this message
Tim Lunn (darkxst) wrote :

anyone seen this recently, I hit it a few times earlier, but not since 3.16.0 afaict

Revision history for this message
Joe Barnett (thejoe) wrote :

I'm still seeing this on 3.16.0 -- it may be triggered by adding/removing a monitor, but not entirely sure

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Installed 3.16, rebooted, got this bug after less than an hour of usage. Didn't suspend/resume.

I can reproduce this bug by performing a VT switch:
- Ctrl-Alt-F1 to go away
- Ctrl-Alt-F2 to go back (BTW Ctrl-Alt-F7 gives me a _different_ gdm login screen)
- now keys (I was testing Ctrl+Alt+T, the terminal shortcut) don't work until I apply the workaround from comment 8.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

If I run 'journalctl -f' in a terminal and do Ctrl-Alt-F1, Ctrl-Alt-F2, I see this:

Bal 24 11:03:36 platonas gnome-session[2521]: (gnome-settings-daemon:10125): GLib-GObject-WARNING **: cannot register existing type 'GsdDevice'
Bal 24 11:03:36 platonas gnome-session[2521]: (gnome-settings-daemon:10125): GLib-GObject-WARNING **: cannot add private field to invalid (non-instantiatable) type '<invalid>'
Bal 24 11:03:36 platonas gnome-session[2521]: (gnome-settings-daemon:10125): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
Bal 24 11:03:36 platonas gnome-session[2521]: (gnome-settings-daemon:10125): common-plugin-CRITICAL **: gsd_device_get_device_type: assertion 'GSD_IS_DEVICE (device)' failed

Revision history for this message
Marius Gedminas (mgedmin) wrote :

I now have 7 copies of gnome-settings-daemon running, because each time I do the workaround, I get a new one.

(Note: if I run gnome-settings-daemon -r when it's not hung, the number of running copies does not increase.)

Revision history for this message
Marius Gedminas (mgedmin) wrote :

strace shows socket communication (poll, read, write, recvmsg), then when a VT switch happens I see

write(2, "\n(gnome-settings-daemon:15210): "..., 99) = 99
write(2, "\n(gnome-settings-daemon:15210): "..., 131) = 131
write(2, "\n(gnome-settings-daemon:15210): "..., 100) = 100
write(2, "\n(gnome-settings-daemon:15210): "..., 129) = 129

(the assertion error messages), and then some more poll/read/recvmsg and finally

futex(0x7fa34a6ed568, FUTEX_WAIT_PRIVATE, 497, NULL <detached ...>

which never returns ever. Deadlock.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

If I run gnome-settings-daemon --debug --replace, then I see these messages after VT switch

(gnome-settings-daemon:16403): wacom-plugin-DEBUG: Removing device 'Power Button' from known devices list

(gnome-settings-daemon:16403): GLib-GObject-WARNING **: cannot register existing type 'GsdDevice'

(gnome-settings-daemon:16403): GLib-GObject-WARNING **: cannot add private field to invalid (non-instantiatable) type '<invalid>'

(gnome-settings-daemon:16403): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(gnome-settings-daemon:16403): common-plugin-CRITICAL **: gsd_device_get_device_type: assertion 'GSD_IS_DEVICE (device)' failed
(gnome-settings-daemon:16403): wacom-plugin-DEBUG: Removing device 'Video Bus' from known devices list

Changed in gnome-shell:
status: Confirmed → Incomplete
Revision history for this message
MDCore (mdcore) wrote :

I can confirm this bug. It can be triggered by as little as a VT switch. But I find that restarting g-s-d *does* restore functionality.

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

I can confirm bug as well. VT switch or screen lock can trigger the bug. Workaround is to restart shell and g-s-d.

Revision history for this message
garrettgoss (garrettgoss) wrote :

I can also confirm the above for a fresh ubuntu gnome 15.04 (x64) install. Happens after only a few minutes.

Revision history for this message
Fran Diéguez (frandieguez) wrote :

Recently moved to ArchLinux and this bug doesn't happens.

Revision history for this message
Leo Francisco (georgeowell) wrote :

I'm also experiencing this. Quite frustrating.

I'm on 15.04 and GNOME 3.16 with the gnome3-team and gnome3-staging PPA's.

Only thing to add this message in terminal every time I hit the non functional brightness keys:

(gnome-settings-daemon:13855): media-keys-plugin-WARNING **: No existing D-Bus connection trying to handle power keys

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

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

Changed in gnome-settings-daemon (Ubuntu):
status: New → Confirmed
Revision history for this message
Tim Lunn (darkxst) wrote :

Its not entirely clear from the comments, but has anyone hit this on stock 15.04 (i.e. without gnome3-staging PPA)

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Sorry, we don't support fixing bugs from PPAs.

Changed in gnome-settings-daemon (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Tim Lunn (darkxst) wrote :

Alberto, please don't do that, the gnome3-team PPA's are the official staging area for the Ubuntu GNOME team, These packages will soon enough be in Wily and the bug will only follow if not fixed. Reopening...

Changed in gnome-settings-daemon (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Okay, but then tag it as affecting the Wily Wonka.

tags: added: wily
removed: vivid
Changed in gnome-settings-daemon (Ubuntu):
importance: Undecided → High
Revision history for this message
Yuri (linux-colombi) wrote :

Same issue since my Ubuntu 15.04 restarded from suspended mode. It disappeared after shutdown and a restart.

Revision history for this message
Makinit (makinit) wrote :

This does not seem to occur in GNOME on Wayland, only in the default shell.

Revision history for this message
Simon Law (sfllaw) wrote :

Bastien Nocera was able to track this down to the same problem in https://bugzilla.gnome.org/show_bug.cgi?id=747745 affecting gnome-settings-daemon 3.16.2-0ubuntu1~vivid1.

Changed in gnome-settings-daemon:
importance: Unknown → Medium
status: Unknown → Incomplete
Revision history for this message
Joe Barnett (thejoe) wrote :

I tried rebuilding gnome-settings-daemon from the ppa sources, but deleted all the debian/patches files. then restarted gnome-settings-daemon and gnome-shell, but still had the same problem with keyboard shortcuts not working (and actually it didn't fix itself with a gsd/gnome-shell restart until i reinstalled the ppa package directly). I may not be doing things correctly though.

Revision history for this message
Anders Kaseorg (andersk) wrote :

Every time I press one of these keys, I get the message

(gnome-settings-daemon:7822): GLib-GIO-WARNING **: Dropping signal AcceleratorActivated of type (ua{sv}) since the type from the expected interface is (uuu)

This is probably the same thing that happened in LP: #1217196 and LP: #1376471.

Revision history for this message
Anders Kaseorg (andersk) wrote :
Revision history for this message
Anders Kaseorg (andersk) wrote :

Here’s a tested patch that reverts the relevant gnome-shell changes to make it work with gnome-settings-daemon 3.14.x.

tags: added: patch
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "gnome-shell_3.16.2-1ubuntu1_lp1427877.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

Revision history for this message
Ubuntu GNOME (ug-bot) wrote :

Anders, thanks for the patch, I'll upload it even though we should get g-s-d/g-c-c updated in the next week or so.

However just to note that issue is not the same as this bug, which is related to media keys stop working after suspend of VT switch, that itself seems to be caused by g-s-d 3.16, but havent yet tracked down the cause.

Revision history for this message
Iain Lane (laney) wrote :

I think Tim is taking care of this - unsubscribing the main Ubuntu sponsors but add us back if necessary.

Revision history for this message
Hubert Hesse (hubx) wrote :

"I tried rebuilding gnome-settings-daemon from the ppa sources, but deleted all the debian/patches files. then restarted gnome-settings-daemon and gnome-shell, but still had the same problem with keyboard shortcuts not working"

I did the same thing, but no luck. Maybe we have to rebuilt other packages without Debian related patches as well? Any hints or suggestions are appreciated.

Revision history for this message
Hubert Hesse (hubx) wrote :

Please see the updated conversation in the gnome Bugtracker. I looks like this a thing related to compilation and/or linking flags in Ubuntu, since in a vanilla gsd I cannot reproduce the issue.

Revision history for this message
Hubert Hesse (hubx) wrote :

Please see the updated conversation in the gnome Bugtracker.

For me I looks like this a thing related to (d/p/revert-gsettings-removals.patch: Refreshed), because if I disable the wacom plugin..

sudo mv /usr/lib/gnome-settings-daemon-3.0/wacom.gnome-settings-plugin /usr/lib/gnome-settings-daemon-3.0/.wacom.gnome-settings-plugin.bak

gsd works as expected again. (yay!)

@Joe can you confirm?

I don't why we didn't catch that earlier. Is it the case the patches are already applied in the source I download with `apt-get source gnome-settings-daemon` and I have to revert the manually? I thought it would suffice to delete all patches in debian/patches directory.

Also in the patch there is a reference to (" plugins/power/gsd-power-manager.c | 32 +++++++++++++++++"), but the actual change is not there.

Revision history for this message
Joe Barnett (thejoe) wrote :

my initial tests show that disbling the wacom plugin fixes the issue with hotkeys, volume keys, and even brightness keys (previously even the restart didn't fix brightness keys for me even though it fixed hotkeys and volume keys).

Revision history for this message
Tim Lunn (darkxst) wrote : Re: [Bug 1427877] Re: Media, brightness and volume keys don't work with GNOME 3.15.90

Hubert, thanks for digging into this.

On 26/06/15 22:35, Hubert Hesse wrote:
> Please see the updated conversation in the gnome Bugtracker.
>
> For me I looks like this a thing related to (d/p/revert-gsettings-
> removals.patch: Refreshed), because if I disable the wacom plugin..
The g-s-d schemas are shared with unity-settings-daemon, this patch just brings back keys that are needed by u-s-d, they will simply be unused
in g-s-d and won't cause any problem.
>
>
> sudo mv /usr/lib/gnome-settings-daemon-3.0/wacom.gnome-settings-plugin /usr/lib/gnome-settings-daemon-3.0/.wacom.gnome-settings-plugin.bak
>
>
> gsd works as expected again. (yay!)
input device management moved into mutter for 3.16, perhaps mutter is supposed to handle the device removal?
>
>
> I don't why we didn't catch that earlier. Is it the case the patches are already applied in the source I download with `apt-get source gnome-settings-daemon` and I have to revert the manually? I thought it would suffice to delete all patches in debian/patches directory.
yes they will be applied via quilt. you just need to do:
quilt pop -a
rm debian/patches
debuild -S
>
> Also in the patch there is a reference to (" plugins/power/gsd-power-
> manager.c | 32 +++++++++++++++++"), but the actual
> change is not there.
thats harmless its just patch headers don't get updated when doing a `quilt refresh` to rebase patches

Revision history for this message
Tim Lunn (darkxst) wrote :

Hubert, Also I wonder if you are looking in the wrong place, might be better to try and track down the GsdDeviceManager error first:
(gnome-settings-daemon:13665): GLib-GObject-WARNING **: cannot register existing type 'GsdDeviceManager'

Both xrandr and wacom use this device manager, the first call to gsd_device_manager_get() should create the object and subsequent calls should return the existing object, however it appears to try and create it a second time.

disabling the wacom plugin just avoids that second (attemted) invocation.

Changed in gnome-settings-daemon:
status: Incomplete → Unknown
Revision history for this message
Tim Lunn (darkxst) wrote :

I had a poke around in gdb, for some reason type info doesn't seem to be shared between plugins, so the second plugin to load will try and reregister the types.

This was caused by linking with -Wl, -BSymbolic-functions, I think its ok to just strip this linker flag, afaik no other distro's even use it.

Revision history for this message
Tim Lunn (darkxst) wrote :

Should be fixed with gnome-settings-daemon_3.16.2-0ubuntu1~vivid2, just uploaded to gnome3-staging

Changed in ubuntu-gnome:
status: New → Confirmed
Changed in gnome-settings-daemon (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Simon Law (sfllaw) wrote :

gnome-settings-daemon_3.16.2-0ubuntu1~vivid2 fixed the bug for me. Tested attaching attaching/detaching a monitor, lock/unlocking the screen, and suspend/resume cases.

Revision history for this message
Hubert Hesse (hubx) wrote :

Hey there Tim

thanks for the fix.
1) Was that a regression and you saw some kind a delta to the previous version? Is that possible?
Thats one think I wished for while I was debugging
2) Since this is runtime, there should be some kind of integration test, correct? If so how do write one so similar incidents happen again

Revision history for this message
Tim Lunn (darkxst) wrote :

Hi Hubert,

1) no not really, its just that gnome-settings-daemon never had any shared objects previously, so the link flags never caused a problem. I just poked around in gdb to find the problem. You obviously can get diffs to the previous versions via git, but that wouldn't have helped much in this case!

2) I have no idea, its a pretty tricky case to test for, however I suppose you could check that the pointers for the Gtypes match up between modules, however thats all kind of wrapped up in glib ( I had to cross into glib to code to work that out) so may not work in a test case.

3) if you want to work on some more Ubuntu GNOME stuff, I can point you in that direction, ping me on IRC or email.

Joe Barnett (thejoe)
Changed in ubuntu-gnome:
status: Confirmed → Fix Released
Changed in gnome-settings-daemon (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Maurits Lamers (mauritslamers) wrote :

Just leaving a comment that I am still suffering from this problem described in the title under Gnome-shell 3.16.4. After a while the sound buttons (and only the sound buttons) stop working. None of the other issues that are described as related above (Light not working from the menu, or the delay in loading the Power settings) apply, just the sound buttons.
Doing Alt-F2 + r fixes the problem (at least for a while).

Changed in gnome-shell:
status: Incomplete → Invalid
Revision history for this message
DooMMasteR (winrootkit-w) wrote :

als also still experiencing this behaviour

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.