Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Yesterday, I upgraded my kernel (to 3.5.0-19-generic), rebooted, and had to reinstall my video drivers to get full resolution. (After upgrading the kernel, the resolution always goes to 640x480, until I reinstall the drivers in Console Login).

Now that I'm back in KDE (I didn't notice if it had changed in the Console Login), my keyboard layout has changed to the US format, so, for example Shift+2 prints @ instead of ".

In KDE's System Settings -> Input Devices -> Keyboard -> Layouts, it seems to show the correct settings:

Map=gb, Layout="English (UK)", Variant="English (UK, extended WinKeys), Label="gb".

That's fine. I changed it and changed it back, and nothing has changed; it's still using the US layout.

After a little googling, I found that there are X server settings, which I've found in /etc/default/keyboard. I've never edited this file before and its last modification (according to ls -l) was a month ago. But in there, XKBLAYOUT="us". It also says:-

# If you change any of the following variables and X is configured to
# use this file, then the changes will become visible to X only if udev
# is restarted.  You may need to reboot the system.

I need to reboot? Seriously?

Any idea what changed my keyboard layout, and/or how can I prevent this from happening again? Why don't the KDE settings take precedence?

UPDATE: This must have been some sort of freak occurrence. Some of KDE's keyboard shortcuts I had configured, weren't working either. Changing XKBLAYOUT to "uk", and rebooting changed everything back to normal.

share|improve this question
    
They take precedence here. In fact, I recently installed Arch Linux setting the keyboard to “es”, and since KDE has its own system, the keyboard layout for KDE was still “us” since I had to configure it in System Settings. You don’t know if your XKBLAYOUT has ever had a value other than “us”, so… No idea. Anyway, (if it happens again) I would ask in the Kubuntu forums. –  Gallaecio Nov 18 '12 at 13:40
    
Check /etc/X11 for a suspiciously new xorg.conf. AMD's drivers will overwrite this file and any keyboard config made therein on installation. –  Ulrich Schwarz Nov 18 '12 at 13:48
    
@Gallaecio XKBLAYOUT must have been uk originally. When installing the OS in the first place, there were a set of questions asking about my keyboard, which I think would have set XKBLAYOUT, correctly. I've never seen those questions outside of the OS installer, though.. –  Alex Leach Nov 18 '12 at 14:05
    
@UlrichSchwarz Yes, I do get a new /etc/X11/xorg.conf file every time I install the NVIDIA drivers. It's never affected the keyboard layout before though, and it always backs up the previous xorg.conf file. A diff shows that nothing has changed. There are no other files in /etc/X11 with the same modification time, although don't know about subfolders.. –  Alex Leach Nov 18 '12 at 14:11
add comment

1 Answer

The KDE keyboard layouts seemed to not work when kded was not running. Restarting the kdm service got it back up and running, but I'm not sure why it wasn't running in the first place... To kick-start kded without rebooting the whole system, log out of KDE, and log in to a Console Session. Then run:-

sudo service kdm restart

This can be done when logged into KDE, but you'll be automatically and abruptly logged out.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.