“UbuntuHelp:BadDeviceError”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
(未显示同一用户的2个中间版本) | |||
第3行: | 第3行: | ||
=== Removing the 'BadDevice' Errors === | === Removing the 'BadDevice' Errors === | ||
This page describes how to get rid of the BadDevice errors when starting a GUI application from a Terminal: | This page describes how to get rid of the BadDevice errors when starting a GUI application from a Terminal: | ||
− | <pre><nowiki>X Error: BadDevice, invalid or uninitialized input device 170 | + | <pre><nowiki> |
+ | X Error: BadDevice, invalid or uninitialized input device 170 | ||
Major opcode: 146 | Major opcode: 146 | ||
Minor opcode: 3 | Minor opcode: 3 | ||
第18行: | 第19行: | ||
First we'll make a backup, just in case. | First we'll make a backup, just in case. | ||
Open the file by pressing Alt+F2 and putting in: | Open the file by pressing Alt+F2 and putting in: | ||
− | <pre><nowiki>gksu gedit /etc/X11/xorg.conf | + | <pre><nowiki> |
+ | gksu gedit /etc/X11/xorg.conf | ||
</nowiki></pre> | </nowiki></pre> | ||
For Ubuntu, or | For Ubuntu, or | ||
− | <pre><nowiki>kdesu kate /etc/X11/xorg.conf | + | <pre><nowiki> |
+ | kdesu kate /etc/X11/xorg.conf | ||
</nowiki></pre> | </nowiki></pre> | ||
For Kubuntu | For Kubuntu | ||
第27行: | 第30行: | ||
Now to change the file, | Now to change the file, | ||
Find this part: | Find this part: | ||
− | <pre><nowiki>Section "InputDevice" | + | <pre><nowiki> |
+ | Section "InputDevice" | ||
Driver "wacom" | Driver "wacom" | ||
Identifier "stylus" | Identifier "stylus" | ||
第64行: | 第68行: | ||
If, after you chose to restart the X server, you don't get the login screen back, then the you may have not competed the steps properly or just made a mistake somewhere, but that's why we created a backup. | If, after you chose to restart the X server, you don't get the login screen back, then the you may have not competed the steps properly or just made a mistake somewhere, but that's why we created a backup. | ||
Login to the console and from there run this command: | Login to the console and from there run this command: | ||
− | <pre><nowiki>sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf | + | <pre><nowiki> |
+ | sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf | ||
</nowiki></pre> | </nowiki></pre> | ||
That will restore your X configuration back to how it was before, then restart the login manager: | That will restore your X configuration back to how it was before, then restart the login manager: | ||
In Ubuntu | In Ubuntu | ||
− | <pre><nowiki>sudo /etc/init.d/gdm restart | + | <pre><nowiki> |
+ | sudo /etc/init.d/gdm restart | ||
</nowiki></pre> | </nowiki></pre> | ||
In Kubuntu | In Kubuntu | ||
− | <pre><nowiki>sudo /etc/init.d/kdm restart | + | <pre><nowiki> |
+ | sudo /etc/init.d/kdm restart | ||
</nowiki></pre> | </nowiki></pre> | ||
Then you can log back in and try again. | Then you can log back in and try again. | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2010年5月19日 (三) 21:40的最新版本
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
Removing the 'BadDevice' Errors
This page describes how to get rid of the BadDevice errors when starting a GUI application from a Terminal:
X Error: BadDevice, invalid or uninitialized input device 170 Major opcode: 146 Minor opcode: 3 Resource id: 0x0 Failed to open device X Error: BadDevice, invalid or uninitialized input device 170 Major opcode: 146 Minor opcode: 3 Resource id: 0x0 Failed to open device
The Fix
To stop these errors from appearing you need to modify your /etc/X11/xorg.conf file and remove the relevant parts. First we'll make a backup, just in case. Open the file by pressing Alt+F2 and putting in:
gksu gedit /etc/X11/xorg.conf
For Ubuntu, or
kdesu kate /etc/X11/xorg.conf
For Kubuntu Then choose File -> Save As and save it as xorg.conf.backup Now to change the file, Find this part:
Section "InputDevice" Driver "wacom" Identifier "stylus" Option "Device" "/dev/input/wacom" Option "Type" "stylus" Option "ForceDevice" "ISDV4" # Tablet PC ONLY EndSection Section "InputDevice" Driver "wacom" Identifier "eraser" Option "Device" "/dev/input/wacom" Option "Type" "eraser" Option "ForceDevice" "ISDV4" # Tablet PC ONLY EndSection Section "InputDevice" Driver "wacom" Identifier "cursor" Option "Device" "/dev/input/wacom" Option "Type" "cursor" Option "ForceDevice" "ISDV4" # Tablet PC ONLY EndSection
and either delete or comment out the lines. (To comment out the lines you put a '#' character at the beginning of each line) Then find the lines:
InputDevice "stylus" "SendCoreEvents" InputDevice "cursor" "SendCoreEvents" InputDevice "eraser" "SendCoreEvents"
In the Section "ServerLayout" section and delete/comment out those too. Once you've done that, choose File -> Save As and save it as xorg.conf to replace the origional. You will then have to restart the X server for the settings to take effect. First save anything you are working on and logout, then from the login screen menu choose "Restart the X server", then you can log back in.
If Something Went Wrong
If, after you chose to restart the X server, you don't get the login screen back, then the you may have not competed the steps properly or just made a mistake somewhere, but that's why we created a backup. Login to the console and from there run this command:
sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf
That will restore your X configuration back to how it was before, then restart the login manager: In Ubuntu
sudo /etc/init.d/gdm restart
In Kubuntu
sudo /etc/init.d/kdm restart
Then you can log back in and try again.