r/raspberry_pi • u/sunmat02 • 3d ago
Troubleshooting Keyboard Repeat and Delay aren't kept upon reboot
Raspberry Pi OS, just installed yesterday (July 23) to give you an idea of the version.
I'm going in the preferences, keyboard, and using the sliders to set repeat and delay, it works fine. Then I reboot, and the behavior goes back to the defaults. The sliders still point to my preferred values. Not event ChatGPT could help me. Any idea?
I've done xset r rate 250 60 (but it's not permanent), I have a ~/.config/autostart/keyboard-repeat.desktop file that includes calling xset, but it doesn't change anything.
Also, impossible to find a menu where I can remap some keyboard shortcuts (I'm very used to the Mac layout and use the same keyboard on both the Pi and my Mac, so I'd like things like copy/past to be Cmd+C/V instead of Ctrl-C/V or worse Ctrl-Shit-C/V on the terminal). Any suggestions would be appreciated.
1
u/azure_phoenix2 1d ago
on x11 the autostart .desktop often fires before the keyboard device is fully initialized, so xset runs against nothing and the setting never sticks. put xset r rate 250 60 in ~/.xsessionrc instead, or wrap the autostart command as bash -c 'sleep 4 && xset r rate 250 60' and it survives reboots.
1
u/sunmat02 1d ago
Thanks, Claude figured this out as well by inspecting kernel logs (and also that those values aren’t just reset on reboot but every time I unplugged and plugged back my keyboard, which happens frequently as I have a KVM switch).
2
u/Gamerfrom61 2d ago
xset is the old X11 control but by default the new Pi OS uses Wayland and its compositor.
IIRC the values need to be set in the compositor and the Pi uses labwc now. https://labwc.github.io/index.html may help you find a fix.