!XQQVyIbcAcHFvzmcTl:nixos.org

NixOS GNOME

403 Members
A room for maintainers of GNOME & GNOME-Related desktop environments (xfce, cinnamon, pantheon...)92 Servers

Load older messages


SenderMessageTime
5 Jul 2023
@silasdavis:one.ems.host@silasdavis:one.ems.host *

I use home-manager to configure my keyboard shortcuts via dconf. This used to work fine but since a recent update on unstable I am seeing my keyboard shortcuts forgotten when I restart my machine (doesn't happen on just a log out, will check a restart of just gnome shortly...)

If I diff using the dconf2nix2 tool before and after I get:

❯ diff dconf-before.nix dconf-after.nix
110,111c110,111
<       sources = [ (mkTuple [ "xkb" "gb" ]) ];
<       xkb-options = [ "terminate:ctrl_alt_bksp" ];
---
>       sources = [ (mkTuple [ "xkb" "gb" ]) (mkTuple [ "xkb" "es" ]) ];
>       xkb-options = [ "terminate:ctrl_alt_bksp" "compose:ralt" "lv3:rwin_switch" ];
460a461
>       screensaver = [ "<Super>Escape" ];
553a555,556
>       toggle-message-tray = [ "<Super>v" ];
>       toggle-overview = [];

I use <Super>s and <Super>m for tiling window manager shortcuts which is what notice.

They are each mapped by default to one of toggle-message-tray, toggle-overview (forget which way around) so I remove each from the list to override.

Does anyone have any idea why my dconf settings are not persisting?

16:52:57
@silasdavis:one.ems.host@silasdavis:one.ems.host this does not happen after just restarting gnome with pkill -3 gnome-shell 16:54:54
@ashvith:matrix.org@ashvith:matrix.org Silas Davis: you might want to try the not-working settings in services.xserver.desktopManager.gnome.extraGSettingsOverrides 17:36:30
@ashvith:matrix.org@ashvith:matrix.org * Silas Davis: you might want to try the "not-working" settings in services.xserver.desktopManager.gnome.extraGSettingsOverrides 17:36:48
@jtojnar:matrix.orgJan Tojnar
In reply to @silasdavis:one.ems.host

I use home-manager to configure my keyboard shortcuts via dconf. This used to work fine but since a recent update on unstable I am seeing my keyboard shortcuts forgotten when I restart my machine (doesn't happen on just a log out, will check a restart of just gnome shortly...)

If I diff using the dconf2nix2 tool before and after I get:

❯ diff dconf-before.nix dconf-after.nix
110,111c110,111
<       sources = [ (mkTuple [ "xkb" "gb" ]) ];
<       xkb-options = [ "terminate:ctrl_alt_bksp" ];
---
>       sources = [ (mkTuple [ "xkb" "gb" ]) (mkTuple [ "xkb" "es" ]) ];
>       xkb-options = [ "terminate:ctrl_alt_bksp" "compose:ralt" "lv3:rwin_switch" ];
460a461
>       screensaver = [ "<Super>Escape" ];
553a555,556
>       toggle-message-tray = [ "<Super>v" ];
>       toggle-overview = [];

I use <Super>s and <Super>m for tiling window manager shortcuts which is what notice.

They are each mapped by default to one of toggle-message-tray, toggle-overview (forget which way around) so I remove each from the list to override.

Does anyone have any idea why my dconf settings are not persisting?

do you mean the output of dconf dump / | dconf2nix before and after restart?
21:09:04
@jtojnar:matrix.orgJan Tojnar“so I remove each from the list to override” what list? How are you doing that? If you want to unset the keybinding, you will need to explicitly set it to empty list.21:14:58
@jtojnar:matrix.orgJan Tojnar
In reply to @ashvith:matrix.org
Silas Davis: you might want to try the "not-working" settings in services.xserver.desktopManager.gnome.extraGSettingsOverrides
dconf is generally preferred over extraGSettingsOverrides, since gsettings overrides only set defaults and are easily overridden
21:16:51
6 Jul 2023
@diamondburned:matrix.orgdiamond (it/its) changed their profile picture.08:56:15
@silasdavis:one.ems.host@silasdavis:one.ems.host
In reply to @jtojnar:matrix.org
“so I remove each from the list to override” what list? How are you doing that? If you want to unset the keybinding, you will need to explicitly set it to empty list.
Yes that is what I have done, for example with toggle-overview
12:59:14
@silasdavis:one.ems.host@silasdavis:one.ems.hostthis feels like a race conditions that has been introduced12:59:26
@silasdavis:one.ems.host@silasdavis:one.ems.hostRunning a rebuild always fixes it though 13:07:40
@silasdavis:one.ems.host@silasdavis:one.ems.hostAnd the config is good got sure 13:07:57
@silasdavis:one.ems.host@silasdavis:one.ems.hostWas hoping for systemd race but restarting the home manager service didn't fix which I thought it might 13:08:29
@silasdavis:one.ems.host@silasdavis:one.ems.hostProbably is service dependency order I suspect. Just not sure which affects the dconf settings will see if I can figure it out from source when not AFK 13:09:43
@silasdavis:one.ems.host@silasdavis:one.ems.host* And the config is good for sure, it works once applied and was fine before a recent nixos update 13:10:15
@jtojnar:matrix.orgJan Tojnar Silas Davis: nothing should be setting dconf settings other than the home-manager module or user action 13:32:53
@jtojnar:matrix.orgJan Tojnar Silas Davis: do you have anything from .gsd-media-keys in the journal after reboot? 14:00:48
@jtojnar:matrix.orgJan Tojnar gnome-settings-daemon is the component responsible for managing keybindings. For example, I get Failed to grab accelerator for keybinding when I switch to a home-manager config with conflicts. 14:02:35
@jtojnar:matrix.orgJan TojnarI could imagine gsd resetting the conflicting settings14:02:50
@jtojnar:matrix.orgJan Tojnar I tried restarting that with pkill gsd-media-keys; systemctl start --user org.gnome.SettingsDaemon.MediaKeys.target but it did not reset the conflicting dconf key 🤷‍♀️ 14:07:02
@silasdavis:one.ems.host@silasdavis:one.ems.host

so...

I've taken a look at this file: /nix/store/22dzv5x7q98c890f67ilia4vwmhgxjzq-hm-dconf.ini

Which is referenced by /nix/store/rqyhp24x4cha7qx70i71rq0s32sd7hs1-home-manager-generation/activate:

$DRY_RUN_CMD $DCONF_DBUS_RUN_SESSION /nix/store/d9zam93fa4mj43fz3h09cajh81vgpqvn-dconf-0.40.0/bin/dconf load / < /nix/store/22dzv5x7q98c890f67ilia4vwmhgxjzq-hm-dconf.ini

It contains most of my custom settings, but where I have:

      "org/gnome/shell/keybindings" = {
        open-application-menu = [];
        toggle-overview = [];
        # Gnome tries to grab Super+m for this, the bastard
        toggle-message-tray = [ "<Super>v" ];
      };

It has:

$DRY_RUN_CMD $DCONF_DBUS_RUN_SESSION /nix/store/d9zam93fa4mj43fz3h09cajh81vgpqvn-dconf-0.40.0/bin/dconf load / < /nix/store/22dzv5x7q98c890f67ilia4vwmhgxjzq-hm-dconf.ini

14:13:35
@silasdavis:one.ems.host@silasdavis:one.ems.host *

so...

I've taken a look at this file: /nix/store/22dzv5x7q98c890f67ilia4vwmhgxjzq-hm-dconf.ini

Which is referenced by /nix/store/rqyhp24x4cha7qx70i71rq0s32sd7hs1-home-manager-generation/activate:

$DRY_RUN_CMD $DCONF_DBUS_RUN_SESSION /nix/store/d9zam93fa4mj43fz3h09cajh81vgpqvn-dconf-0.40.0/bin/dconf load / < /nix/store/22dzv5x7q98c890f67ilia4vwmhgxjzq-hm-dconf.ini

It contains most of my custom settings, but where I have:

      "org/gnome/shell/keybindings" = {
        open-application-menu = [];
        toggle-overview = [];
        # Gnome tries to grab Super+m for this, the bastard
        toggle-message-tray = [ "<Super>v" ];
      };

It has (in the generated INI file):

[org/gnome/shell/keybindings]
open-application-menu=@as []
14:14:04
@silasdavis:one.ems.host@silasdavis:one.ems.hostSo that would explain why my settings are missing14:14:13
@silasdavis:one.ems.host@silasdavis:one.ems.hostHowever it doesn't explain why they come back after an nixos-rebuild, let's see!14:14:28
@silasdavis:one.ems.host@silasdavis:one.ems.host
In reply to @jtojnar:matrix.org
gnome-settings-daemon is the component responsible for managing keybindings. For example, I get Failed to grab accelerator for keybinding when I switch to a home-manager config with conflicts.
❯ journalctl -b | grep .gsd-media-keys
Jul 06 15:54:14 mifla .gsd-media-keys[1457]: Failed to grab accelerator for keybinding settings:playback-repeat
Jul 06 15:54:14 mifla .gsd-media-keys[1457]: Failed to grab accelerator for keybinding settings:hibernate
Jul 06 15:54:21 mifla .gsd-media-keys[1457]: Unable to get default sink
Jul 06 15:54:21 mifla .gsd-media-keys[1457]: Unable to get default source
Jul 06 15:54:23 mifla .gsd-media-keys[2483]: Failed to grab accelerator for keybinding settings:hibernate
Jul 06 15:54:23 mifla .gsd-media-keys[2483]: Failed to grab accelerator for keybinding settings:playback-repeat
Jul 06 15:54:23 mifla .gsd-media-keys[2483]: Failed to grab accelerator for keybinding settings:screensaver
Jul 06 15:54:23 mifla .gsd-media-keys[2483]: gvc_mixer_card_get_index: assertion 'GVC_IS_MIXER_CARD (card)' failed
Jul 06 15:54:34 mifla systemd[2065]: Started Application launched by gsd-media-keys.
Jul 06 15:59:33 mifla systemd[2065]: Started Application launched by gsd-media-keys.
Jul 06 15:59:43 mifla systemd[2065]: Started Application launched by gsd-media-keys.
Jul 06 16:01:45 mifla systemd[2065]: Started Application launched by gsd-media-keys.
Jul 06 16:08:36 mifla systemd[2065]: Started Application launched by gsd-media-keys.
Jul 06 16:15:02 mifla systemd[2065]: Started Application launched by gsd-media-keys.
14:16:13
@silasdavis:one.ems.host@silasdavis:one.ems.host

Okay so nixos-rebuild --switch as ever restores my keys. Finding activate script:

systemctl show home-manager-silas.service | grep Exec
❯ cat activate | grep dconf
_iNote "Activating %s" "dconfSettings"
  /nix/store/83mizl0zb58zzyby47rk7iafa1mrrrmr-dconf-cleanup \
    "$oldGenPath/state/dconf-keys.json" \
    "$newGenPath/state/dconf-keys.json"
$DRY_RUN_CMD $DCONF_DBUS_RUN_SESSION /nix/store/bll3yc6g3fc6bgxrs97idjxx27qkn9n2-dconf-0.40.0/bin/dconf load / < /nix/store/6676vj0l7kawrqkblqqicyjl3gc99im6-hm-dconf.ini

Now my settings are back:

[org/gnome/shell/keybindings]
open-application-menu=@as []
toggle-message-tray=@as ['<Super>v']
toggle-overview=@as []
14:18:20
@silasdavis:one.ems.host@silasdavis:one.ems.hostwill reboot14:18:30
@silasdavis:one.ems.host@silasdavis:one.ems.hostso now the unit has changed14:21:30
@silasdavis:one.ems.host@silasdavis:one.ems.host

After restart, broken:

❯ systemctl show home-manager-silas.service | grep ExecStart=
ExecStart={ path=/nix/store/fqhlc4pka1a9yx5dfy392abxlkibf9hv-hm-setup-env ; argv[]=/nix/store/fqhlc4pka1a9yx5dfy392abxlkibf9hv-hm-setup-env /nix/store/rqyhp24x4cha7qx70i71rq0s32sd7hs1-home-manager-generation ; ignore_errors=no ; start_time=[Thu 2023-07-06 16:18:51 CEST] ; stop_time=[Thu 2023-07-06 16:18:52 CEST] ; pid=941 ; code=exited ; status=0 }

After nixos-rebuild --switch (working):

❯ systemctl show home-manager-silas.service | grep ExecStart=
ExecStart={ path=/nix/store/dpalk76wpvnyfhnr2byxmhnpxrimbal7-hm-setup-env ; argv[]=/nix/store/dpalk76wpvnyfhnr2byxmhnpxrimbal7-hm-setup-env /nix/store/b4pclvgfkw8q6rvpir9zh28dms149br4-home-manager-generation ; ignore_errors=no ; start_time=[Thu 2023-07-06 16:22:06 CEST] ; stop_time=[Thu 2023-07-06 16:22:07 CEST] ; pid=5368 ; code=exited ; status=0 }
14:22:46
@jtojnar:matrix.orgJan Tojnar Silas Davis: sounds like home-manager bug then 14:26:19

Show newer messages


Back to Room ListRoom Version: 6