LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices

Reply
 
Search this Thread
Old 07-31-2009, 07:35 PM   #1
Secant
LQ Newbie
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 18

Rep: Reputation: 0
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?

Thanks in advance for any responses.
 
Old 08-01-2009, 05:19 PM   #2
NathanZachary
Gentoo support team
 
Registered: May 2009
Posts: 21

Rep: Reputation: 17
Hi there!

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.
 
Old 08-02-2009, 01:04 AM   #3
Secant
LQ Newbie
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 18

Original Poster
Rep: Reputation: 0
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.

Here is the output of 'emerge --info':
Code:
Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.29-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.29-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-1.12.11.1
Timestamp of tree: Fri, 31 Jul 2009 23:45:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.4-r3, 2.6.2-r1
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.mcs.anl.gov/pub/gentoo/ ftp://mirror.mcs.anl.gov/pub/gentoo/ "
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 automount berkdb bzip2 cli cracklib crypt cups dri emerald file-roller flac fortran gdbm glitz gnome gpm gtk hal iconv ipv6 isdnlog jpeg midi mmx mp3 mudflap multilib ncurses nls nptl nptlonly nvidia ogg openmp pam pcre perl pppd python readline reflection session spl sse sse2 ssl svg sysfs tcpd truetype unicode xcb xorg xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
I was able to complete the revdep-rebuild, and the problem persists. If HAL might be the source, what should I try?
 
Old 08-02-2009, 02:28 AM   #4
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 08-02-2009, 07:05 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Moved: This thread is more suitable in <Gentoo> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 08-02-2009, 08:24 PM   #6
Secant
LQ Newbie
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 18

Original Poster
Rep: Reputation: 0
@Electro:

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.
 
Old 08-03-2009, 03:46 AM   #7
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 54
You will need a line in /etc/make.conf like
Code:
INPUT_DEVICES="evdev"
This should help;
http://www.gentoo.org/proj/en/deskto...rade-guide.xml
and
http://forums.gentoo.org/viewtopic-t...+keyboard.html

Last edited by comprookie2000; 08-04-2009 at 08:23 PM.
 
Old 08-03-2009, 10:40 AM   #8
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,036

Rep: Reputation: 372Reputation: 372Reputation: 372Reputation: 372
Quote:
Originally Posted by Secant View Post
@Electro:

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.

Last edited by i92guboj; 08-03-2009 at 10:41 AM.
 
Old 08-03-2009, 11:14 AM   #9
d2_racing
Gentoo support team
 
Registered: May 2009
Location: Ste-Foy,Québec,Canada
Distribution: Gentoo
Posts: 115

Rep: Reputation: 17
To use evdev, you need add the use flag hal dans dbus inside your /etc/make.conf

After that, you should run this :

Code:
# emerge -auDNv world
 
Old 08-03-2009, 11:39 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,036

Rep: Reputation: 372Reputation: 372Reputation: 372Reputation: 372
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.
 
Old 08-04-2009, 03:08 PM   #11
Secant
LQ Newbie
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 18

Original Poster
Rep: Reputation: 0
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?
 
Old 08-04-2009, 03:24 PM   #12
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,036

Rep: Reputation: 372Reputation: 372Reputation: 372Reputation: 372
That's most of it.

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).

The last step will -hopefully- be this:

Code:
cp /usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi /etc/hal/fdi/policy/
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.
 
Old 08-04-2009, 07:12 PM   #13
Secant
LQ Newbie
 
Registered: Jan 2006
Distribution: Gentoo
Posts: 18

Original Poster
Rep: Reputation: 0
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!

Thank you all so much for your time!
 
Old 08-05-2009, 06:49 AM   #14
d2_racing
Gentoo support team
 
Registered: May 2009
Location: Ste-Foy,Québec,Canada
Distribution: Gentoo
Posts: 115

Rep: Reputation: 17
In fact, since evdev can handle any input device, my /etc/X11/xorg.conf is almost empty nowadays.
 
Old 09-28-2009, 12:54 PM   #15
hosler
Member
 
Registered: Mar 2005
Distribution: Gentoo
Posts: 181

Rep: Reputation: 30
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
keyboard and touchpad unresponsive on boot itchy8me Linux - Laptop and Netbook 2 07-06-2009 03:06 PM
Unresponsive keyboard bazz Linux - Newbie 3 07-13-2007 06:23 AM
/dev/mouse Gone after Keyboard layout change in Gentoo worldgnat Linux - Hardware 5 01-20-2006 03:46 PM
Mouse and keyboard problem when X starts! romasport Linux - General 1 03-22-2004 01:05 PM
no mouse and keyboard in gentoo. raylpc Linux - General 5 08-08-2003 07:42 AM


All times are GMT -5. The time now is 01:45 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration