Bug 442804

Summary: Keyboard layout not remembered after logout
Product: [Applications] systemsettings Reporter: Yosuke Matsumura <yosukematsumura>
Component: kcm_keyboardAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal CC: butirsky
Priority: NOR Keywords: wayland
Version: 5.22.4   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=412101
https://bugs.kde.org/show_bug.cgi?id=442942
Latest Commit: Version Fixed In:

Description Yosuke Matsumura 2021-09-22 13:05:18 UTC
SUMMARY
Same as bug 412101, which is marked resolved with a fix in 5.20. However, I am experiencing the same bug in 5.22.4.

https://bugs.kde.org/show_bug.cgi?id=412101

STEPS TO REPRODUCE
1. Set up 2 keyboard layouts (set to Global switching policy).
2. Select the non-primary layout using the keyboard layout tray icon.
3. Log out.
4. Log in.

OBSERVED RESULT
The primary layout is selected upon login.

EXPECTED RESULT
The last selected layout (in this case, the non-primary), to be selected upon login.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 35 Kinoite
(available in About System)
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Andrey 2021-09-22 13:52:18 UTC
Is it X11 or Wayland? Can you try both?

> Note that for some reason (see the merge request) this only saves if session
> restore is on.
> 
https://bugs.kde.org/show_bug.cgi?id=412101#c7
Comment 2 Yosuke Matsumura 2021-09-22 13:54:04 UTC
Sorry, I should have mentioned it in the original report. It only occurs in Wayland. The layout is preserved as expected in X11.
Comment 3 Andrey 2021-09-22 13:56:09 UTC
Then, please note the comment above.
Comment 4 Yosuke Matsumura 2021-09-22 14:31:00 UTC
(In reply to Andrey from comment #3)
> Then, please note the comment above.

Thanks. It seems that setting session restore 'on' does maintain the setting. 

I prefer to not have to restore a session, and that's not the same behavior as X11, but I'll accept that if it is the intended solution.
Comment 5 Andrey 2021-09-22 14:47:24 UTC
Yes, it's intentional for Wayland but still contradistinction solution, see
https://bugs.kde.org/show_bug.cgi?id=412101#c29

On the other hand, on X11 we have no way to not remember last used layout, right?
That's what I tried to avoid, maybe not so successfully..

Anyway, please don't forget to close the issue if you find that acceptable.