Not sure if it is true for GNOME Flashback, but regular GNOME uses gnome-settings-daemon to manage keyboard configuration. And its keyboard manager uses GSettings to store the keyboard configuration, only using the xkb config for initial set up:
Thanks, that indeed fixed the problem! I think that I somehow made it work on my previous linux installation, because I worked with Gnome+i3 before, but this is exactly the problem with other distros - you set something up by hand somewhere and then you forget about it.
I’m having the same issue with “none+i3”.
Possibly related, sway also has a keyboard issue since this started
and i think i18n.consoleKeymap moved to console.keyMap around the same time (the TTY’s are correctly set to dvorak)
i don’t have anything gnome set up setxkbmap dvorak works for me
my configuration as is (minus the i18n change and maybe the services.xserver.displayManager.defaultSession change) used to work
i’ll try adding services.xserver.xkbVariant and removing the whitespace
though combined with the similar timing, i don’t believe this to be a different issue
oh and the first time it presented itself (after a reboot) it went away ~10m after login
If I have a brand new install of NixOS with Gnome Desktop, and I have not modified any dconf settings, should the services.xserver.xkbOptions work? Or do I need to delete that stuff from dconf regardless?
Last question: do I run the gsettings commands with sudo or no?
I just ran the gsettings commands with and without sudo, then it disabled my capslock-as-control setting that I set with tweak tool (good so far, so my capslock key became back to being a capslock key).
Then, I logged out and back in, and my capslock key went back to being control (so far, I thought it was working, yaaaay).
Then I went and checked inside of Gnome tweak tool, and apparently the setting for swapping control with capslock was re-enabled again.
So it seems tweak tool setting is coming back. I tried disabling that setting manually, log out/in, but that setting keeps coming back.
Then I tried logging into Gnome as root, and in that case ctrl is ctrl and caps is caps, which is not what I expected. If the xkbOptions is system-wide, then I thought that when I logged in as root I would have the caps swapped with control, but that wasn’t the case.
So it seems that the option is still not working. Any ideas? Is gnome-tweak-tool giving me false positives because it keeps setting the option within the tool? Any idea why it does not work for root?
Well, as I wrote, gnome-settings-daemon will check if /org/gnome/desktop/input-sources/xkb-options setting is set and if not, it will set it from the value stored by the services.xserver.xkbOptions in /etc/X11/xorg.conf.d/00-keyboard.conf. GNOME Tweaks just show the value of /org/gnome/desktop/input-sources/xkb-options.
Not sure what you mean but the GSetting is the only thing relevant for GNOME after log-in. You can check the value directly using:
gsettings get org.gnome.desktop.input-sources xkb-options
I think sudo gsettings might not work because it would still see your dconf database instead of root’s. If you logged to root before it would still have the setting from the previous login.
It should not really set anything unless you click something. But you will still see the settings set by gnome-settings-daemon.