I have caps-lock key remapped to control, which usually works fine, but after some uptime and one/more suspend/awake cycles* this mapping breaks, and caps-lock reverts back to the default behavior -- i.e. turning on the led and capitalizing whatever I type. (Even though the Tweaks UI still shows it as being mapped to Ctrl -- see picture below.)
Questions:
- Is this a known issue (with maybe a known fix)? (Could not find anything relevant with a quick search.)
- Is there a way to debug the problem, preferably from the command line?
*Remark: I'm not sure it is the suspend/awake cycle that causes the problem, but I can't connect it to anything else...
Remark2: removing and readding the mapping (or rebooting) solves the problem, but it would be nice to find a more permanent solution.
As a workaround when the mapping breaks, restart gnome shell via:
r
so it works again until it breaks again.
It's bug #1899206. There is this PPA with the assumed fix, and if you want to fix it for yourself before the bug gets fixed in 20.04 officially, you can install the mutter packages from the PPA and reboot.
As I kept encountering the same behavior, I too had gone to seek manual manners which this issue could be corrected. I found solutions, one of which I incorporated into a script which can 1) be invoked upon login via .profile; and 2) Invoked from the tty; which will do the work, and correct the problem at any time:
Oh yeah, and in order to have this work to do the remappings via the cmdLn use: '. $HOME/.uxSwapCapsLock-and-Ctrl', for instance.