Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[fixed] USB mouse and keyboard not detected when starting X
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
japtar10101
Tux's lil' helper
Tux's lil' helper


Joined: 12 Apr 2009
Posts: 103

PostPosted: Sun May 10, 2009 2:36 am    Post subject: [fixed] USB mouse and keyboard not detected when starting X Reply with quote

After battling with my kernel for 3 days, I've finally made it to this X handbook page:
http://www.gentoo.org/doc/en/xorg-config.xml

Yet, after I run "Xorg -configure", then "X -config /root/xorg.conf.new", neither my mouse nor my keyboard works. I've googled the problem, but to no avail. What may be the problem? The terminal detects the keyboard fine, and it seems like it recognizes the mouse as well.

Here's what /etc/make.conf looks like:
Code:
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-O2 -march=i686 -pipe"
CXXFLAGS="-O2 -march=i686 -pipe"

# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="i686-pc-linux-gnu"

# 2 processors
MAKEOPTS='-j3'

GENTOO_MIRRORS="ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://lug.mtu.edu/gentoo/ ftp://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ "

SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"

# Hardware stuff
INPUT_DEVICES="keyboard mouse evdev"

VIDEO_CARDS="radeon"

USE="X aac aalib acl acpi afs aim alsa apache2 audiofile bash-completion bidi branding bzip2 cairo calendar canna caps \
cdr cgi cjk clamav cracklib crypt cscope css ctype cups curl curlwrappers cvs cxx dbus dbx dga djvu dri dvd dvdr \
encode enscript esd -evo examples expat fastcgi ffmpeg firefox flac fontconfig fortran freewnn ftp gcj gd gdbm gif gimp \
glut gnome gnuplot gphoto2 graphviz gzip gstreamer gtk gtkhtml guile hal hardened hddtemp htmlhandbook icq icu idn \
ieee1394 imagemagick imap imlib inifile innodb ipod ipv6 jabber jack -java5 java6 javascript jbig jingle jpeg jpeg2k \
kontact kde latex lcms libcaca libnotify libwww lua mad maildir matroska matrox mbox migemo mikmod milter mime mmap mng \
modplug mozilla mp3 mpeg mplayer -mpi msn musepack musicbrainz mysql mysqli nas networkmanager nls nptl nsplugin ogg openal \
opengl openmp osc oss pcre pda pdf perl php plasma plotutils png posix postgres profile pulseaudio python -qt3 qt4 \
quicktime raw rss ruby samba savedconfig scanner sdl session sharedext sharedmem simplexml skey snmp sockets source spell \
spl ssl startup-notification subversion svg syslog tcl theora tidy tiff timidity tk tokenizer truetype unicode usb -v4l \
v4l2 vcd videos vim-syntax vorbis wavpack win32codecs wmf xcomposite xine -xinerama xml xscreensaver xv xvid yahoo \
jadetex networking"


And my /root/xorg.conf.new:
Code:
Section "ServerLayout"
   Identifier     "X.org Configured"
   Screen      0  "Screen0" 0 0
   InputDevice    "Mouse0" "CorePointer"
   InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
   ModulePath   "/usr/lib/xorg/modules"
   FontPath     "/usr/share/fonts/misc/"
   FontPath     "/usr/share/fonts/TTF/"
   FontPath     "/usr/share/fonts/OTF"
   FontPath     "/usr/share/fonts/Type1/"
   FontPath     "/usr/share/fonts/100dpi/"
   FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
   Load  "extmod"
   Load  "record"
   Load  "dbe"
   Load  "xtrap"
   Load  "dri"
   Load  "glx"
EndSection

Section "InputDevice"
   Identifier  "Keyboard0"
   Driver      "/dev/input/by-id/usb-Logitech_Logitech_USB_Keyboard-event-kbd"
#   Driver      "kbd"
EndSection

Section "InputDevice"
   Identifier  "Mouse0"
   Driver      "mouse"
   Option       "Protocol" "auto"
   Option       "Device" "/dev/input/by-id/usb-Microsoft_Microsoft_Intellimouse_optical-mouse"
#   Option       "Device" "/dev/input/mice"
   Option       "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
   #DisplaySize     410   260   # mm
   Identifier   "Monitor0"
   VendorName   "VSC"
   ModelName    "VA1930wm"
   HorizSync    30.0 - 82.0
   VertRefresh  50.0 - 75.0
   Option       "DPMS"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"               # [<bool>]
        #Option     "SWcursor"              # [<bool>]
        #Option     "Dac6Bit"               # [<bool>]
        #Option     "Dac8Bit"               # [<bool>]
        #Option     "BusType"               # [<str>]
        #Option     "CPPIOMode"             # [<bool>]
        #Option     "CPusecTimeout"         # <i>
        #Option     "AGPMode"               # <i>
        #Option     "AGPFastWrite"          # [<bool>]
        #Option     "AGPSize"               # <i>
        #Option     "GARTSize"              # <i>
        #Option     "RingSize"              # <i>
        #Option     "BufferSize"            # <i>
        #Option     "EnableDepthMoves"      # [<bool>]
        #Option     "EnablePageFlip"        # [<bool>]
        #Option     "NoBackBuffer"          # [<bool>]
        #Option     "DMAForXv"              # [<bool>]
        #Option     "FBTexPercent"          # <i>
        #Option     "DepthBits"             # <i>
        #Option     "PCIAPERSize"           # <i>
        #Option     "AccelDFS"              # [<bool>]
        #Option     "IgnoreEDID"            # [<bool>]
        #Option     "DisplayPriority"       # [<str>]
        #Option     "PanelSize"             # [<str>]
        #Option     "ForceMinDotClock"      # <freq>
        #Option     "ColorTiling"           # [<bool>]
        #Option     "VideoKey"              # <i>
        #Option     "RageTheatreCrystal"    # <i>
        #Option     "RageTheatreTunerPort"    # <i>
        #Option     "RageTheatreCompositePort"    # <i>
        #Option     "RageTheatreSVideoPort"    # <i>
        #Option     "TunerType"             # <i>
        #Option     "RageTheatreMicrocPath"    # <str>
        #Option     "RageTheatreMicrocType"    # <str>
        #Option     "ScalerWidth"           # <i>
        #Option     "RenderAccel"           # [<bool>]
        #Option     "SubPixelOrder"         # [<str>]
        #Option     "ShowCache"             # [<bool>]
        #Option     "DynamicClocks"         # [<bool>]
        #Option     "VGAAccess"             # [<bool>]
        #Option     "ReverseDDC"            # [<bool>]
        #Option     "LVDSProbePLL"          # [<bool>]
        #Option     "AccelMethod"           # <str>
        #Option     "DRI"                   # [<bool>]
        #Option     "ConnectorTable"        # <str>
        #Option     "DefaultConnectorTable"    # [<bool>]
        #Option     "DefaultTMDSPLL"        # [<bool>]
        #Option     "TVDACLoadDetect"       # [<bool>]
        #Option     "ForceTVOut"            # [<bool>]
        #Option     "TVStandard"            # <str>
        #Option     "IgnoreLidStatus"       # [<bool>]
        #Option     "DefaultTVDACAdj"       # [<bool>]
        #Option     "Int10"                 # [<bool>]
        #Option     "EXAVSync"              # [<bool>]
        #Option     "ATOMTVOut"             # [<bool>]
        #Option     "R4xxATOM"              # [<bool>]
   Identifier  "Card0"
   Driver      "radeon"
   VendorName  "ATI Technologies Inc"
   BoardName   "RV516 [Radeon X1300/X1550 Series]"
   BusID       "PCI:2:0:0"
EndSection

Section "Screen"
   Identifier "Screen0"
   Device     "Card0"
   Monitor    "Monitor0"
   SubSection "Display"
      Viewport   0 0
      Depth     1
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     4
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     8
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     15
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     16
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     24
   EndSubSection
EndSection


I've also tested, for mouse, "/dev/mouse" and "/dev/input/mouse", where neither worked.

Edit: Finally got it working. It's simply hal not working. Solution is to run:
Code:
/etc/init.d/hald start
rc-update add hald default


Last edited by japtar10101 on Sun May 10, 2009 5:09 pm; edited 2 times in total
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Sun May 10, 2009 2:43 am    Post subject: Reply with quote

That guide is not fully correct with xorg-server 1.5,
read the upgrade guide.

As for the problem: read the logs, check if hal is running,
make sure you've reemerged the drivers after server upgrade
and you really have evdev driver emerged.
Back to top
View user's profile Send private message
Ch00k
n00b
n00b


Joined: 02 May 2009
Posts: 55

PostPosted: Sun May 10, 2009 3:11 am    Post subject: Reply with quote

Add this to xorg.conf:
Code:
Section "ServerFlags"
    Option "AllowEmptyInput" "False"
EndSeciotn
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Sun May 10, 2009 1:51 pm    Post subject: Reply with quote

Ch00k wrote:
Add this to xorg.conf:
Code:
Section "ServerFlags"
    Option "AllowEmptyInput" "False"
EndSeciotn

Don't do that. It's incorrect for several reasons.
Back to top
View user's profile Send private message
japtar10101
Tux's lil' helper
Tux's lil' helper


Joined: 12 Apr 2009
Posts: 103

PostPosted: Sun May 10, 2009 1:54 pm    Post subject: Reply with quote

I just tested /dev/input/mice, and able to confirm that I got some input out of it. It seems Xorg specifically cannot detect the keyboard and mouse...

I also added the "Don't allow Empty input" flag in both /etc/X11/xorg.conf and xorg.conf.new, but nothing happened.

VoidMage wrote:
As for the problem: read the logs, check if hal is running,

I'm checking out /var/log, but I see no log labeled for hal. Xorg.0.log is empty, and Xorg.0.log.old contained settings after running "Xorg -configure".

Anyway, I was aware that they had an update on Xorg:
http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-1.5-upgrade-guide.xml

I'm reading the hal part, and as an example, it says to copy usr/share/doc/hal-*/use-estonian-layout.fdi.bz2 to /etc/hal/fdi/policy/10-xinput-configuration.fdi. Since in my case, I'm using a standard English keyboard, I should copy the use-kbd-driver.fdi.bz2 instead. However, 10-xinput-configuration.fdi itself doesn't exist yet, making bzcat pretty unusable. Should I just run "touch 10-xinput-configuration.fdi"?

Finally, This is my output when I run lshal:
Code:
error: dbus_bus_get: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory


If you need more output, I'll happily post it.
Back to top
View user's profile Send private message
EzInKy
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1742
Location: Kentucky

PostPosted: Sun May 10, 2009 2:24 pm    Post subject: Reply with quote

VoidMage wrote:
Ch00k wrote:
Add this to xorg.conf:
Code:
Section "ServerFlags"
    Option "AllowEmptyInput" "False"
EndSeciotn

Don't do that. It's incorrect for several reasons.


So what do you recommend, the only other option not to use hal is to rebuild xorg-server without it.
_________________
Time is what keeps everything from happening all at once.
Back to top
View user's profile Send private message
EzInKy
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1742
Location: Kentucky

PostPosted: Sun May 10, 2009 2:26 pm    Post subject: Reply with quote

japtar10101 wrote:

Finally, This is my output when I run lshal:
Code:
error: dbus_bus_get: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory



Is hald being started when you boot?
_________________
Time is what keeps everything from happening all at once.
Back to top
View user's profile Send private message
Nihiliste
n00b
n00b


Joined: 22 Jul 2007
Posts: 7
Location: Québec

PostPosted: Sun May 10, 2009 2:38 pm    Post subject: Reply with quote

Unless you configure it another way, Xorg use hald + evdev drivers for mouse and keyboard.

So emerge x11-drivers/xf86-input-evdev and make sure that hald is running.

Everything should work fine...
_________________
Eternity is a very long time, especially towards the end -- Woody Allen
Back to top
View user's profile Send private message
balderForseti
n00b
n00b


Joined: 10 May 2009
Posts: 2

PostPosted: Sun May 10, 2009 4:00 pm    Post subject: Reply with quote

I have this same problem. I'm not trying to hijack here, but my problem seems to be damn near the same.

hald is not appearing to be running on my machine, since
Code:
ps -e | grep hald
produces no results. On a different *nix box it has about 7 entries. How would I start hald on system start-up?

But since the keyboard is working in prior to the launch of x, would that really be the problem?
Back to top
View user's profile Send private message
EzInKy
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1742
Location: Kentucky

PostPosted: Sun May 10, 2009 4:08 pm    Post subject: Reply with quote

balderForseti wrote:
I have this same problem. I'm not trying to hijack here, but my problem seems to be damn near the same.

hald is not appearing to be running on my machine, since
Code:
ps -e | grep hald
produces no results. On a different *nix box it has about 7 entries. How would I start hald on system start-up?

But since the keyboard is working in prior to the launch of x, would that really be the problem?


"rc-update add hald default" worked for me.
_________________
Time is what keeps everything from happening all at once.
Back to top
View user's profile Send private message
japtar10101
Tux's lil' helper
Tux's lil' helper


Joined: 12 Apr 2009
Posts: 103

PostPosted: Sun May 10, 2009 4:46 pm    Post subject: Reply with quote

EzInKy wrote:
balderForseti wrote:
I have this same problem. I'm not trying to hijack here, but my problem seems to be damn near the same.

hald is not appearing to be running on my machine, since
Code:
ps -e | grep hald
produces no results. On a different *nix box it has about 7 entries. How would I start hald on system start-up?

But since the keyboard is working in prior to the launch of x, would that really be the problem?


"rc-update add hald default" worked for me.
*slaps forehead*
Of course. THIS has to be it.

Edit: Bingo, now it works. Yup, Hal was simply not working. It makes perfect sense, now.
Back to top
View user's profile Send private message
EzInKy
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1742
Location: Kentucky

PostPosted: Sun May 10, 2009 5:27 pm    Post subject: Reply with quote

japtar10101 wrote:
EzInKy wrote:

"rc-update add hald default" worked for me.



japtar10101 wrote:

*slaps forehead*
Of course. THIS has to be it.

Edit: Bingo, now it works. Yup, Hal was simply not working. It makes perfect sense, now.


Simple fixes are the best B-)
_________________
Time is what keeps everything from happening all at once.
Back to top
View user's profile Send private message
balderForseti
n00b
n00b


Joined: 10 May 2009
Posts: 2

PostPosted: Sun May 10, 2009 5:35 pm    Post subject: Reply with quote

Aww man that's awesome. You guys are great.
Back to top
View user's profile Send private message
coolniit
n00b
n00b


Joined: 01 Jul 2005
Posts: 55
Location: Mumbai ,India

PostPosted: Tue May 12, 2009 4:58 am    Post subject: Reply with quote

Thanks guys.
This was a life saver
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum