Home Manager causing service to fail: SettingsDaemon MediaKeys

I’ve got a home manager setup that builds successfully, but there’s one issue that I’m having trouble tracking down.

Even though home-manager switch succeeds, it shows this message:

The user systemd session is degraded:
  UNIT                                       LOAD   ACTIVE SUB    DESCRIPTION
● org.gnome.SettingsDaemon.MediaKeys.service loaded failed failed GNOME keyboard shortcuts service

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
1 loaded units listed.
Attempting to reload services anyway...

And so unsurprisingly, my media keys don’t work, such as volume up / down.

Any suggestions? This happens on both my NixOS machine and Ubuntu machine which share the same home-manager config.

Running journalctl --user -u org.gnome.SettingsDaemon.MediaKeys.service shows a really long stack trace. Here is the beginning and end of it:


Jan 25 08:59:51 tux systemd[3346]: Starting GNOME keyboard shortcuts service...
Jan 25 08:59:52 tux systemd[3346]: Started GNOME keyboard shortcuts service.
Jan 25 08:59:52 tux .gsd-media-keys[3633]: g_settings_new_with_path: assertion 'path_is_valid (path)' failed
Jan 25 08:59:52 tux .gsd-media-keys[3633]: invalid (NULL) pointer instance
Jan 25 08:59:52 tux .gsd-media-keys[3633]: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Jan 25 08:59:52 tux .gsd-media-keys[3633]: g_settings_get_value: assertion 'G_IS_SETTINGS (settings)' failed
Jan 25 08:59:52 tux .gsd-media-keys[3633]: g_variant_get_string: assertion 'value != NULL' failed
Jan 25 08:59:52 tux .gsd-media-keys[3633]: g_variant_unref: assertion 'value != NULL' failed
Jan 25 08:59:52 tux .gsd-media-keys[3633]: g_settings_get_value: assertion 'G_IS_SETTINGS (settings)' failed
Jan 25 08:59:52 tux .gsd-media-keys[3633]: g_variant_get_string: assertion 'value != NULL' failed
Jan 25 08:59:52 tux .gsd-media-keys[3633]: g_variant_unref: assertion 'value != NULL' failed
Jan 25 08:59:53 tux systemd-coredump[4344]: Process 3633 (.gsd-media-keys) of user 1000 dumped core.
                                            
                                            Module libdconfsettings.so without build-id.
                                            Module libmp3lame.so.0 without build-id.
#########################################################################################

############## middle section truncated due to length of stack trace  ###################

#########################################################################################
Jan 25 08:59:56 tux systemd[3346]: Starting GNOME keyboard shortcuts service...
Jan 25 08:59:56 tux systemd[3346]: Started GNOME keyboard shortcuts service.
Jan 25 08:59:56 tux .gsd-media-keys[5655]: g_settings_new_with_path: assertion 'path_is_valid (path)' failed
Jan 25 08:59:56 tux .gsd-media-keys[5655]: invalid (NULL) pointer instance
Jan 25 08:59:56 tux .gsd-media-keys[5655]: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Jan 25 08:59:56 tux .gsd-media-keys[5655]: g_settings_get_value: assertion 'G_IS_SETTINGS (settings)' failed
Jan 25 08:59:56 tux .gsd-media-keys[5655]: g_variant_get_string: assertion 'value != NULL' failed
Jan 25 08:59:56 tux .gsd-media-keys[5655]: g_variant_unref: assertion 'value != NULL' failed
Jan 25 08:59:56 tux .gsd-media-keys[5655]: g_settings_get_value: assertion 'G_IS_SETTINGS (settings)' failed
Jan 25 08:59:56 tux .gsd-media-keys[5655]: g_variant_get_string: assertion 'value != NULL' failed
Jan 25 08:59:56 tux .gsd-media-keys[5655]: g_variant_unref: assertion 'value != NULL' failed
Jan 25 08:59:56 tux systemd-coredump[5676]: Process 5655 (.gsd-media-keys) of user 1000 dumped core.
                                            
                                            Module libdconfsettings.so without build-id.
                                            #6  0x00007fc4f8a5a60c __clone3 (libc.so.6 + 0x10d60c)
                                            ELF object binary architecture: AMD x86-64
Jan 25 08:59:56 tux systemd[3346]: org.gnome.SettingsDaemon.MediaKeys.service: Main process exited, code=dumped, status=11/SEGV
Jan 25 08:59:56 tux systemd[3346]: org.gnome.SettingsDaemon.MediaKeys.service: Failed with result 'core-dump'.
Jan 25 08:59:57 tux systemd[3346]: org.gnome.SettingsDaemon.MediaKeys.service: Scheduled restart job, restart counter is at 5.
Jan 25 08:59:57 tux systemd[3346]: org.gnome.SettingsDaemon.MediaKeys.service: Start request repeated too quickly.
Jan 25 08:59:57 tux systemd[3346]: org.gnome.SettingsDaemon.MediaKeys.service: Failed with result 'core-dump'.
Jan 25 08:59:57 tux systemd[3346]: Failed to start GNOME keyboard shortcuts service.