mouse and keyboard unresponsive when X starts (Gentoo)
GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
mouse and keyboard unresponsive when X starts (Gentoo)
Hi all, I've been using Gentoo for the past few weeks and I'm very pleased with it; portage is fantastic. I've run into some trouble, though, after running 'emerge --depclean'. When I start X windows (using 'startx') I get to the GNOME desktop I've been using up until now, but the mouse and keyboard lock up and become unresponsive (the numlock key lights up and cannot be toggled, same with scroll and caps lock though they are unlit). Both input devices work fine when connected to another computer. The keyboard works fine if I boot to a terminal, so I know the problem lies within X. I've already re-emerged xorg-server and nvidia-drivers, that didn't seem to help. My system is up-to-date.
a) Where can I find a log of the packages that were unmerged when I ran the depclean? For reasons of timing, I have a sneaking suspicion that I broke something at this point. Although I did check over the list of packages to be unmerged, I may have missed something crucial.
b) The other possibility is that the problem began when I ran 'revdep-rebuild' after depclean-ing; I had to interrupt the re-emerging of the required packages halfway through. Is there a log of these actions somewhere as well?
Although I think this problem results from my misuse of portage, it should be diagnosable as it stems from X - I have a fully functional system up until X starts. What can I do to try to narrow down the source of the problem?
Firstly, glad to hear that you're using Gentoo. Secondly, I'm going to request that this thread be moved into the Gentoo subforum here on LQ.
Thirdly, the problem is very likely related to either the depclean or the interrupted revdep-rebuild. The first suggestion I would have is to try revdep-rebuild again, and let it finish entirely. After that, I would say that it is probably related to HAL in some way. Your best bet is to boot up a LiveCD (whatever you used to install Gentoo), and chroot back into your installation environment. To do so, boot up the CD and do the following commands:
Code:
# mkdir /mnt/gentoo
# mount /dev/ROOT /mnt/gentoo
# mount /dev/BOOT /mnt/gentoo/boot
# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# export PS1="(chroot) $PS1"
Replace the ROOT and BOOT with the partition designations (most likely sda3 and sda1, respectively). Then you should be able to re-run revdep-rebuild. Also, at that point, please post the output of emerge --info.
Thank you, and with a little time and patience, we'll get your system back up and running smoothly.
Thank you for the helpful reply! My apologies for posting in the wrong forum.
I removed xdm from the default runlevel, so I can boot to a terminal. Should I work from a chrooted environment anyway? I can also work logged in over SSH if X needs to be running to diagnose the problem.
It is not Gentoo. It is Linux or kernel problem. If you are using USB keyboard and USB mouse, it does this. On my setup, I have to disconnect them and reconnect to make them work again. Also you can try to have your input devices be disconnected upon boot and then connect them to provide a better chance or add a file to /etc/modprobe.d to delay loading certain modules (usbhid, usbmouse, and usbkbd). Though if your keyboard and mouse are PS/2 devices, set PS/2 as a module and put psmouse in /etc/modules.autoload.d/kernel-2.6. Then run update-modules.
You can stop the daemons hal and dbus, but I doubt that will fix your issue.
If all else fails, you may have to update the firmware of your BIOS.
The mouse is USB and the keyboard PS/2. Unplugging them before boot, then plugging them in after X startup has no effect (at least, it has no effect on the mouse, I wasn't able to try the keyboard). I stopped both hald and dbus before starting X, and there was no change. My BIOS is already at the latest version.
The keyboard works fine as long as I don't start X, and so does the mouse (tested from within links using gpm). I also noticed that my second monitor isn't displaying properly, indicating that xorg.conf might be out of whack somehow. I'll try rebuilding xorg.conf from scratch.
What else can I try to narrow down the problem? Does X have a debug mode where no display is opened and perhaps error messages can be read? I can't switch back to the initial terminal where I ran startx (to view output before the display is opened), because as soon as X starts, I lose the keyboard.
The mouse is USB and the keyboard PS/2. Unplugging them before boot, then plugging them in after X startup has no effect (at least, it has no effect on the mouse, I wasn't able to try the keyboard). I stopped both hald and dbus before starting X, and there was no change. My BIOS is already at the latest version.
Nowadays it shouldn't be any big problem, but you shouldn't be plugging and unplugging ps2 devices on the fly at all. That's only meant for usb stuff. In the past (486 and below era) motherboards tended to break badly when doing this. I haven't seen that for years though.
Quote:
The keyboard works fine as long as I don't start X, and so does the mouse (tested from within links using gpm). I also noticed that my second monitor isn't displaying properly, indicating that xorg.conf might be out of whack somehow. I'll try rebuilding xorg.conf from scratch.
What else can I try to narrow down the problem? Does X have a debug mode where no display is opened and perhaps error messages can be read? I can't switch back to the initial terminal where I ran startx (to view output before the display is opened), because as soon as X starts, I lose the keyboard.
It's probably X/hal/evdev as said above. To make sure about that, you can paste your /var/log/Xorg.0.log at pastebin.com or a similar site, so we can review it.
You need more than that, unless something has changed lately that I am not aware of. You need USE="hal dbus", you need INPUT_DEVICES="evdev", and you also need to copy the correct .fdi file to the correct place. However, I am not giving any more details unless he posts the log, because as evident as it might seem, it might be a different problem.
Hi all, thanks again for the helpful replies! The problem is definitely related to evdev; checking /var/log/Xorg.0.log (I can't copy/paste from this computer so I'll edit this post to include the full log later) yields some complaints about not being able to find the "evdev" module. Furthermore, my make.conf had "INPUT_DEVICES=mouse keyboard" instead of evdev. So, here is what I think I need to do:
1) Change make.conf and xorg.conf to use "evdev" for both mouse and keyboard. Add 'hal' and 'dbus' to global USE flags.
2) Run 'emerge -uDN world' to rebuild everything to use evdev (as specified in make.conf).
Does this seem like a reasonable course of action? Am I missing anything?
You will also need to remove the keyboard and mouse sections of your xorg.conf (just comment them in case you need to put them back or look for something later).
If you have a non-us or/and use a non-english layout you will also need to edit that file to set up everything. That's the way it is now, instead of putting it on your xorg.conf (don't ask me why anyone thinks that this is "easier" and "automatic", I don't know myself). If everything is ok you can delete all the stuff about keyboard and mouse from your xorg.conf.
Well, it certainly feels strange not having keyboard and mouse definitions in xorg.conf, but now I'm glad it's like that because everything works perfectly!
I had the same problem for a while. There was a post at the gentoo wiki website with a tip to speed up the boot process. It suggested that you add xdm to the boot run level. I did this and half the time my mouse and keyboard did not work. Returning xdm to the default boot level solved the problem. I suppose the Xorg keyboard and mouse modules were not loading correctly. So don't do what I did just to save half a second on boot time
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.