SUMMARY Adding a layout functions and persists when logged out/logged back in, but upon a restart, the layouts are reset to a default state. The SDDM appears to still use the correct layout, but it is reset upon login STEPS TO REPRODUCE 1. Remove all layouts 2. Add English (Dvorak) as a layout 3. Add English (US) as another layout 3. Save and apply 4. Restart computer 5. Log in 6. Layout is reset to default OBSERVED RESULT Upon first login on bootup, the applied layout is English (classic Dvorak) instead of the expected English (Dvorak). Also, any additional layouts - i.e. English (US) - are not available and have to be re-added in the settings. EXPECTED RESULT The saved keyboard layouts should persist across restarts SOFTWARE/OS VERSIONS Windows: macOS: (available in the Info Center app, or by running `kinfo` in a terminal window) Linux/KDE Plasma: Kubuntu 24.10 KDE Plasma Version: 6.1.5 KDE Frameworks Version: 6.6.0 Qt Version: 6.6.2 ADDITIONAL INFORMATION
Update: this appears to be due to some unexpected interaction between Fcitx and the KDE keyboard layouts. Fcitx seems to override KDE's options, which explains why the layouts don't persist. This should be made more clear to the user
Here’s a step-by-step guide to add Persian(in my case) and English keyboard layouts in Kubuntu and make sure they persist after reboot: --- Step 1: Open System Settings 1. Open System Settings from the application menu. 2. Navigate to Input Devices > Keyboard. --- Step 2: Enable Layout Configuration 1. In the Layouts tab, check the box "Configure layouts". 2. Click the Add button to add keyboard layouts. --- Step 3: Add Persian and English Layouts 1. In the pop-up window: Select English (US) (or your preferred English variant) from the list and click OK. Repeat the process to add Persian. 2. Once both layouts are added, ensure English is set as the default layout: Select English in the list and click the Up arrow to move it to the top. --- Step 4: Configure Layout Switching Shortcut 1. In the same Layouts tab, look for the Switching Policy section. 2. Set a shortcut to toggle between layouts. For example: Click on the shortcut field. Press a combination like Alt+Shift or Ctrl+Space. --- Step 5: Apply Changes 1. Click Apply at the bottom of the window to save your settings. 2. Close the System Settings window. --- Step 6: Ensure Persistence After Reboot 1. Open a terminal and edit the system-wide keyboard configuration file: sudo nano /etc/default/keyboard 2. Modify the file to look like this: XKBMODEL="pc105" XKBLAYOUT="us,ir" XKBVARIANT="," XKBOPTIONS="grp:alt_shift_toggle" .change layout maps however you want XKBLAYOUT: Lists the layouts (us for English, ir for Persian). XKBOPTIONS: Specifies the layout toggle shortcut (e.g., alt_shift_toggle). 3. Save and exit (Ctrl+O, Enter, Ctrl+X). --- Step 7: Apply the New Settings Run the following commands to apply the new configuration: sudo dpkg-reconfigure keyboard-configuration sudo service keyboard-setup restart --- Step 8: Reboot and Test 1. Reboot your system to ensure the changes persist. 2. Test switching between Persian and English layouts using the shortcut you set. --- Let me know if you need further assistance!