PDA

View Full Version : [ubuntu] USB Keyboard problem after upgrading to 8.04



muted
May 3rd, 2008, 11:26 AM
I plug a USB keyboard into my laptop when using it. After upgrading to Ubuntu 8.04, the USB keyboard stops working after logging in. It should be mentioned that my keyboard is an apple keyboard, while my laptop is a Dell, allthough i do not imagine this could be the problem. I think the keyboard layout is wrong somehow, since few keys like "I","O" and "P" give "7","8","9". Any ideas?

xorg.conf:

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
FontPath "/usr/share/X11/fonts/misc"
FontPath "/usr/share/X11/fonts/cyrillic"
FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
FontPath "/usr/share/X11/fonts/Type1"
FontPath "/usr/share/X11/fonts/100dpi"
FontPath "/usr/share/X11/fonts/75dpi"
FontPath "/usr/share/fonts/X11/misc"
# path to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "type1"
Load "vbe"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "dk"
Option "XkbOptions" "lv3:ralt_switch"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizScrollDelta" "0"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/wacom" # Change to
# /dev/input/event
# for USB
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "Device"
Identifier "Intel Corporation Mobile Integrated Graphics Controller"
Driver "i810"
BusID "PCI:0:2:0"
EndSection

Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Intel Corporation Mobile Integrated Graphics Controller"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1400x1050"
EndSubSection
SubSection "Display"
Depth 4
Modes "1400x1050"
EndSubSection
SubSection "Display"
Depth 8
Modes "1400x1050"
EndSubSection
SubSection "Display"
Depth 15
Modes "1400x1050"
EndSubSection
SubSection "Display"
Depth 16
Modes "1400x1050"
EndSubSection
SubSection "Display"
Depth 24
Modes "1400x1050"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
EndSection

Section "DRI"
Mode 0666
EndSection

My "System --> Preferences --> Keyboard" settings has been set to "apple" and the generic standard keyboard, none of which worked or changen anything at all.

Zorael
May 3rd, 2008, 11:30 AM
If this happens *after* logging in, it is likely a user-specific setting. If you (temporarily) create a new user and log him in, does the keyboard work?

Else it's likely system-wide. The X version in 8.04 auto-detects a whole lot more than 7.10 did, which wanted stuff to be explicitly defined in its settings file (xorg.conf), so we could try letting 8.04 create a new one. Try this.

$ sudo mv /etc/X11/xorg.conf /etc/X11/xorg.backup0805
$ sudo dpkg-reconfigure xserver-xorg
Then restart X with Ctrl+Alt+Backspace. See if it helps.

muted
May 3rd, 2008, 11:43 AM
If this happens *after* logging in, it is likely a user-specific setting. If you (temporarily) create a new user and log him in, does the keyboard work?

Else it's likely system-wide. The X version in 8.04 auto-detects a whole lot more than 7.10 did, which wanted stuff to be explicitly defined in its settings file (xorg.conf), so we could try letting 8.04 create a new one. Try this.

$ sudo mv /etc/X11/xorg.conf /etc/X11/xorg.backup0805
$ sudo dpkg-reconfigure xserver-xorg
Then restart X with Ctrl+Alt+Backspace. See if it helps.Actually, you were right. My new test-user worked flawless!

Where do i go from here?

Zorael
May 3rd, 2008, 11:51 AM
I'd review any keyboard settings you may have set up in Gnome; I'm a kubuntuling so I can't go into details. Go through everything even rhyming with keyboards or input devices.

The alternative surefire way would be to remove your Gnome settings, but then you'd have to redo any extra menu settings, etc. Try saving any work and then do this in a terminal.

$ cd
$ mkdir gnome-backup
$ mv .gnome* .gconf* gnome-backup
Then hit Ctrl+Alt+Backspace to restart X, instead of logging out first.

If it works, you can remove that gnome-backup directory we created in your home. If things got completely and utterly borked, we can restore them by doing this.

$ cd
$ mkdir gnome-borked
$ mv gnome-backup/* .
Then, again, Ctrl+Alt+Backspace.


The alternative extra-super-surefire way would be to migrate to your test user. :>

muted
May 3rd, 2008, 12:09 PM
I'd review any keyboard settings you may have set up in Gnome; I'm a kubuntuling so I can't go into details. Go through everything even rhyming with keyboards or input devices.

The alternative surefire way would be to remove your Gnome settings, but then you'd have to redo any extra menu settings, etc. Try saving any work and then do this in a terminal.

$ cd
$ mkdir gnome-backup
$ mv .gnome* .gconf* gnome-backup
Then hit Ctrl+Alt+Backspace to restart X, instead of logging out first.

If it works, you can remove that gnome-backup directory we created in your home. If things got completely and utterly borked, we can restore them by doing this.

$ cd
$ mkdir gnome-borked
$ mv gnome-backup/* .
Then, again, Ctrl+Alt+Backspace.


The alternative extra-super-surefire way would be to migrate to your test user. :>I'm considering the last option, as this is not working. Thanks for your help though, all i need is my bookmarks taken with me :D

Zorael
May 3rd, 2008, 12:18 PM
I'm considering the last option, as this is not working. Thanks for your help though, all i need is my bookmarks taken with me :D
Mozilla/Firefox settings are kept in ~/.mozilla/firefox, along with all extensions and settings.

Actually, just pop up Nautilus and go through the settings and enable showing of hidden files. You should now see a whole bunch of hidden folders in your home dir. Make backups of everything you want, like .azureus, .compiz, etc. Just not gnomey stuff, or else you'll transfer your borked keyboard settings to the fresh user. :>

natos
May 10th, 2008, 06:10 PM
I had this exact same problem. (and Apple keyboard, too) The keyboard worked fine at the login screen, but after logging in the mapping was all screwed up.

I did fix it without migrating to a new user account. Not sure whether all these steps are necessary, but this is how I did it:

Left X to get to a terminal login screen. The mappings were screwed up, but I managed to do this by holding down pretty much all the shift, control, alt, command keys and trying the F keys one by one -- not sure what combination worked.

Logged into the terminal, (the keyboard mapping was fine outside of X) then removed these two files:

rm ~/.gconf/desktop/gnome/accessibility/keyboard/%gconf.xml
rm ~/.gconfd/saved_state

Then I rebooted the machine. (without going back to X first -- thought maybe it would rewrite one of those two files if I rebooted the machine from there)

sudo reboot

When the system came back up, I logged in and the keyboard mapping was fixed.

I hope this helps.

Ryszu
May 11th, 2008, 10:19 AM
In my experience it's F6 that gets the keyboard back into the right state, when you find the numpad appearing on the main keyboard section.