This how-to will use an example /etc/X11/xorg.conf file. This file may or may not work for you. Please use it only as a guide. Also note, that there are different parts of the file that need to be commented out. Please check, double check and even triple check your personal /etc/X11/xorg.conf file to make sure you have commented everything out concerning wacom tablet stuff. If you miss something, it's possible that X will NOT start. Again, the /etc/X11/xorg.conf FILE PASTED BELOW IS MERELY AN EXAMPLE!!!
Seems a lot of users are getting the below errors when running applications from the console:
X Error: BadDevice, invalid or uninitialized input device 168 Major opcode: 148 Minor opcode: 3 Resource id: 0x0 Failed to open device X Error: BadDevice, invalid or uninitialized input device 168 Major opcode: 148 Minor opcode: 3 Resource id: 0x0 Failed to open device
First thing we will do is make a backup copy of our /etc/X11/xorg.conf file incase for some reason things don't work as planned after making the changes below to the file. To do this, perform the following command:
sudo cp -a /etc/X11/xorg.conf /etc/X11/xorg.conf-old
To fix this we need to comment out some lines in our /etc/X11/xorg.conf file. Below is a SAMPLE of an xorg.conf file. This file MAY NOT WORK FOR YOU! It is merely an example:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder3)
# /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 "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen" 0 0
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
EndSection
Section "Files"
# path to defoma fonts
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 "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Section "Module"
Load "bitmap"
Load "ddc"
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" "pc104"
Option "XkbLayout" "us"
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"
# /dev/input/event
# for USB
Identifier "stylus"
Driver "wacom"
Option "Device" "/dev/wacom" # Change to
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
# /dev/input/event
# for USB
Identifier "eraser"
Driver "wacom"
Option "Device" "/dev/wacom" # Change to
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
# /dev/input/event
# for USB
Identifier "cursor"
Driver "wacom"
Option "Device" "/dev/wacom" # Change to
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "Monitor"
Identifier "AOC Spectrum"
HorizSync 28.0 - 49.0
VertRefresh 43.0 - 72.0
Option "DPMS"
EndSection
Section "Device"
Identifier "NVIDIA Corporation NV18 [GeForce4 MX 4000 AGP 8x]"
Driver "nvidia"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "NVIDIA Corporation NV18 [GeForce4 MX 4000 AGP 8x]"
Monitor "AOC Spectrum"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Here is what it should look like after you have commented out the correct stuff. Again, this xorg.conf MAY NOT WORK FOR YOUR!! It is merely an example:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder3)
# /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 "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen" 0 0
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
#InputDevice "stylus" "SendCoreEvents"
#InputDevice "cursor" "SendCoreEvents"
#InputDevice "eraser" "SendCoreEvents"
EndSection
Section "Files"
# path to defoma fonts
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 "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Section "Module"
Load "bitmap"
Load "ddc"
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" "pc104"
Option "XkbLayout" "us"
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"
# /dev/input/event
# for USB
#Identifier "stylus"
#Driver "wacom"
#Option "Device" "/dev/wacom" # Change to
#Option "Type" "stylus"
#Option "ForceDevice" "ISDV4" # Tablet PC ONLY
#EndSection
#Section "InputDevice"
# /dev/input/event
# for USB
#Identifier "eraser"
#Driver "wacom"
#Option "Device" "/dev/wacom" # Change to
#Option "Type" "eraser"
#Option "ForceDevice" "ISDV4" # Tablet PC ONLY
#EndSection
#Section "InputDevice"
# /dev/input/event
# for USB
#Identifier "cursor"
#Driver "wacom"
#Option "Device" "/dev/wacom" # Change to
#Option "Type" "cursor"
#Option "ForceDevice" "ISDV4" # Tablet PC ONLY
#EndSection
Section "Monitor"
Identifier "AOC Spectrum"
HorizSync 28.0 - 49.0
VertRefresh 43.0 - 72.0
Option "DPMS"
EndSection
Section "Device"
Identifier "NVIDIA Corporation NV18 [GeForce4 MX 4000 AGP 8x]"
Driver "nvidia"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "NVIDIA Corporation NV18 [GeForce4 MX 4000 AGP 8x]"
Monitor "AOC Spectrum"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Once you comment those things out then a restart of X is needed. Once X is back up and running again you shouldn't see those errors anymore.
If for some reason you just can't edit the file appropriately and X keeps failing to start you can revert back to your original xorg.conf since we made a backup copy of it before we started any editing. To revert back to the original, perform this command:
sudo cp -a /etc/X11/xorg.conf-old /etc/X11/xorg.conf
If it asks you if you want to overwrite the current xorg.conf file, then say Y or YES and hit enter. Then starting X again should get you back up and running. You will however still have the errors from before. You could then ask someone on the #Kubuntu channel to help you modify your file.
