Bug 331398 - Wrong keyboard layout after login
Summary: Wrong keyboard layout after login
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.8.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Andriy Rysin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-21 21:33 UTC by Alex
Modified: 2021-03-21 04:08 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
startkde console log (206.55 KB, application/octet-stream)
2014-04-22 17:22 UTC, Jeremy Whiting
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2014-02-21 21:33:00 UTC
After login, the keyboard layout is wrong. opening settings and you cannot change to the default layout, clicking an arbitrary setting (click a radio button, which is active anyway) and then applying the "changed" settings, it loads the right map.

Reproducible: Always

Steps to Reproduce:
1. configure three layout
2. activate the indicator applet
3. log out, log in
Actual Results:  
the indicator shows the second layout
changing to the first does not work
saving unchanged settings sets the right (default) layout

Expected Results:  
the right layout should be loaded
Comment 1 Alex 2014-02-21 21:50:05 UTC
If it matters:
first: English (US international with dead keys)
second: German (US keyboard with German letters)
third: German (eleminate dead keys)
Comment 2 Alex 2014-04-17 11:23:25 UTC
another issue (debian testing): The keymap is wrong after suspend and needs to be fixed in a similiar way or by using setxkbmap (which updates the kde setting too, according to the tray icon).
Comment 3 Jeremy Whiting 2014-04-22 00:21:05 UTC
I have hit this same issue and tried to work around it by setting my keyboard layout in xorg.conf.d file only (or using localectl). Looking at the code it seems the keyboard daemon always runs setxkbmap when it is started with whatever information is in the config file. I nuked my kxkbrc file thinking it would let the xorg settings stay in effect, but that's not the case. Somehow I'm unable to get the keyboard layout to be my preference (dvorak) on login to kde.

My first try was to only set dvorak layout in the keyboard layout kcm, but after login it goes to us somehow until I do configure, change any setting and hit apply as the bug reporter said.

Is localectl too new to use instead of setxkbmap to set the keyboard layout? also should I add some key that's on by default to leave the keyboard layout alone completely?
Comment 4 Andriy Rysin 2014-04-22 01:15:32 UTC
Could you please provide your kde version?

Could you please attach your kxkbrc file?

Also could you please also run kdebugdlg check the box in front of kded4 and after this problem happens again attach your ~/.xsession-errors?
Comment 5 Jeremy Whiting 2014-04-22 04:24:20 UTC
Andriy, I'm using master built with kdesrc-build. The rest of my machine is from archlinux packages (no kde packages, just Qt4, etc.)

My kxkbrc file with everything disabled that switches my xorg layout from dvorak back to us/querty looks like this:
[Layout]
DisplayNames=
LayoutList=
LayoutLoopCount=-1
Model=pc101
ResetOldOptions=false
ShowFlag=false
ShowLabel=true
ShowLayoutIndicator=false
ShowSingle=false
SwitchMode=Global
Use=false

When I log in I don't get any .xsession-errors as everything is going to journalctl, but I'll turn that on tomorrow and see what shows up in the journal and post that here also.
Comment 6 Jeremy Whiting 2014-04-22 16:47:01 UTC
Andriy,

Thanks for taking a look into this, let me know if there's anything I can do to help.  Just now I tried rebooting and logging in from sddm as I usually do. I also tried running startx and then startkde from  the xterm on a second tty, but neither produced any startkde or kded messages in journalctl or created a .xsession-errors. I did enable kded4 and kded in kdebugdialog. not sure where debug messages are going currently tbh, but I'll try to find out.
Comment 7 Jeremy Whiting 2014-04-22 17:22:27 UTC
Created attachment 86214 [details]
startkde console log

I don't see anything in here about setxkbmap but here's the output of startkde that does change the keyboard layout that I set in /etc/X11/xorg.conf.d/00-keyboard.conf (dvorak) to qwerty
Comment 8 Jeremy Whiting 2014-04-24 00:54:32 UTC
Andriy,

In order to get eclipse to work correctly, I removed my ibus setup that I had in order to type in other languages. It seems ibus was the culprit on my system that was changing the keyboard layout back to qwerty.

Alexander,

Are you using ibus by chance? Maybe it needs to be configured so it wont change the keyboard layout?
Comment 9 Andriy Rysin 2014-04-24 01:10:07 UTC
Jeremy, I am not using ibus, but I've seen some problems it was causing before. I actually was planning to mentor a project for GSoC 2014 to integrate IM (ibus) into KDE keyboard module and had some interest from students but unfortunately had to cancel it (see http://lists.kde.org/?l=kde-devel&m=139373129517974&w=1).
Comment 10 Alex 2014-04-24 09:46:15 UTC
To my problem after suspend: When i select in the screensaver the correct keyboard layout (it is reset before/during/after suspend), i have the layout after login. But selecting "de" still is another variant than the configured one (101 vs. 102 keys layout or something like this, the | key (lower left on german keyboards) is not configured right).
Comment 11 Alex 2014-04-26 11:58:04 UTC
I noticed, after screen locking, the screensaver does not have an keyboard layout switch. After suspend it has one, which is set to the wrong layout.
Comment 12 Soukyuu 2015-08-24 17:42:19 UTC
This is still happening randomlz on KDE5.3.2 as well. Mz xkbrc>
[Layout]
DisplayNames=
LayoutList=de(deadgraveacute)
LayoutLoopCount=-1
Model=pc101
ResetOldOptions=false
ShowFlag=false
ShowLabel=true
ShowLayoutIndicator=false
ShowSingle=false
SwitchMode=Global
Use=false

As zou see, there is onlz one lazout configured. Still, as zou also see, the lazout is stuck at en/US. Going to systemsettings->input devices->keyboard and toggling "configure layouts" makes it work again. Nearly as annoying as reading what I typed with the stuck layout.
Comment 13 moncomptedepub 2018-10-14 21:31:16 UTC
Alright, I'm having the exact same problem on recent plasma on Archlinux.

I fixed the problem by removing fcitx, which was causing the problem by hijacking the plasma settings.

Maybe it will help someone.
Comment 14 Nate Graham 2021-03-20 04:41:17 UTC
Those last two comments seem to be describing different issues. Please file new bug reports for different issues. Thanks!

Alexander, is this still happening in Plasma 5.21?
Comment 15 Alex 2021-03-20 09:25:59 UTC
I currently only have two layouts, us and de, and had no problems since a long time.
I am not sure if this applies to all problems the others in this bug confirmed or if only my current configuration has less problems.
Comment 16 Nate Graham 2021-03-21 04:08:45 UTC
It's working for me too FWIW. Let's call it fixed.