Keyboard Layout not Staying after Reboot

Hello All,

**OS: **OpenSuSE 11.4
Kernel: 2.6.37.6-0.20-default

*I know its on old unsupported Suse version, I’ll update when I have time…

The other day I was in YaST > System Keyboard Layout settings page and I had gone into the Expert Settings section and selected the NumLock key to be active upon boot. Now everytime I reboot my PC and login, my Keyboard layout seems like it’s in the UK layout…
*BTW, I have since changed the NumLock setting from Expert Settings back to its Default setting…

For Example:


      Shift+2  --prints-->  "
      Shift+3  --prints-->  £
      backslash key  --prints-->  #
                   +shift  --prints-->  ~
      etc.......

Now if I go back into YaST and click into System Keyboard Layout, I can see that “US” is already selected as the keyboard layout, which I’ve never changed to anything else, ever… But, if I click OK or even Cancel without changing any setting at all, the layout gets switched back to my normal layout.

Any idea what could be going on here? I added a section to xorg.conf to manually set the layout to “us”, but that didn’t seem to make a difference.

I can see this line in the Xorg.0.log file, quite a few times:

    18.560] (II) XKB: reuse xkmfile /var/lib/xkb/compiled/server-73AC8D4822B76BE375830D90D9DD145B2CBC4E27.xkm

But I believe I remember seeing that line in there even before this started happening, so it might not mean anything. Also, I don’t see any errors in the log file either so I’m at a loss here…

Any thoughts or suggestions would be greatly appreciated!

Thanks in Advance,
Matt

You don’t say what desktop you are using but YaST is concerned with the hardware layout, not the software layout. For example, I have a friend who bought a computer with a US layout in the Middle East; so in YaST the keyboard layout is set to US.

You can change any layout in KDE’s system settings (but that means that some keytops will be wrong!); for example, I change to the AZERTY or QUERTZ keyboards when typing in French or German.

It appears that the hardware layout is set to US but the software layout to GB. So what is controlling the software layout?

Hey John, thanks for the reply!

Sorry about that, should have mentioned that. I’m using GNOME *(2.32 I think)

I think your right…! I just went in and checked in GNOME’s Control Center and went to Keyboard. And under the Layouts tab what do I find… Surprise surprise "GB". Which is currently the ONLY layout in the list… So, I just added a new Layout with United States as the Country and USA as the Variant and removed the GB layout completely from the list. Hopefully that will solve my problem!

This is what it looked like when I opened the GNOME’s Keyboard Preferences Layouts Tab --AND-- YaST’s Keyboard Config:

http://i1326.photobucket.com/albums/u658/mrm5102/GNOME_Control_Center----Keyboard_Preferences_zps9081fafe.png http://i1326.photobucket.com/albums/u658/mrm5102/YaST---Keyboard_Config_zps554cbee9.png

  •    *So going off the 2 screenshots I guess the Desktop software for the keyboard is initiated at boot and NOT YaST's Keyboard Config settings...*
    

Sorry, I never actually changed the keyboard settings from the Desktop’s software before *(i.e. GNOME’s Control Center), always did it from YaST.
Actually, there are ALOT more things you can do with the Keyboard through GNOME’s Keyboard settings, then you can with YaST’s Keyboard-Config Settings. Awesome, thanks for that!

Tomorrow when I boot up my PC I’ll check and see if things are back to normal… I believe they will be though!

Thanks AGAIN for the reply John, very much appreciated!

Thanks,
Matt

On 2014-07-29 23:36, mmartin0926 wrote:

> Actually, there are ALOT more things you can do with the Keyboard
> through GNOME’s Keyboard settings, then you can with YaST’s
> Keyboard-Config Settings. Awesome, thanks for that!

Which only work while inside gnome. They will not apply to KDE with the
same user, to text mode with the same user, or to a different user with
any desktop.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Hey Robin_listas, thanks for the reply…!

Right, but I’m the only one who uses the laptop and GNOME is the only desktop currently
installed, so I won’t have to worry about that. But good point, thanks for the info!

Thanks,
Matt

Ok, so something new this morning when I booted up my laptop…

After I logged into GNOME I noticed down on the Gnome-Panel that there is text showing “GBritain” and when I hover my mouse over it it says “United Kingdom”. And when I went to go type in something the keyboard layout was switched back to UK.

So if I go back into the Keyboard Preferences in the GNOME Control Center I now have 2 keyboard layouts in there… The one I added yesterday USA, and also the one I removed yesterday United Kingdom. So I’m not sure what added the UK layout back into the list of available layouts…

Also, if I click the “Reset to Defaults” button it removes the USA layout and puts ONLY the United Kingdom layout in the list…
So how can I set USA as the Default…? I was going to try and check in something like Gnome-Tweak-Tool or dconf-editor.

This is what I saw after logging in:
http://i1326.photobucket.com/albums/u658/mrm5102/GNOME_KB_Preferences_zpse1280f66.jpg

Any idea why that change yesterday didn’t stick and also how the Keyboard Layout thing is now displaying on my Gnome-Panel? Very confusing…
*
And I just found out that if I only have one layout in the list of layouts then the icon goes away from the Gnome-Panel…

Thanks Again,
Matt

UPDATE:

Ok, so after Googling around a bit more I came across this file located in**:**

**$HOME/.dmrc**

And inside that file was the following data…


# cat .dmrc
[Desktop]
Session=gnome
Language=en_US.utf8
Layout=uk

So I changed the layout to "us",saved the file, then logged-out and back in and the correct KB layout was still active, i.e. the “us” layout…


# cat .dmrc
[Desktop]
Session=gnome
Language=en_US.utf8
Layout=us

And then just to be sure, I rebooted my laptop and when it came back up and logged into my desktop the correct layout was still active.!!!
So hopefully editing the *layout *setting in that file has fixed my issue.

Thanks to everybody for all the help, much appreciated!

Thanks Again,
Matt