# no keyboard or mouse in xorg



## skypher (Apr 12, 2009)

Well, recently I was having trouble with updated installed outdated packages. I solved the solution by re-installing FreeBSD :stud , opting to not install any packages at install time. Little did I know, I could have just done a portmanager -u, but it's all resolved now.

I built xorg from scratch, a simple make install clean, I did not modify any config files or anything. xorg built fine, so I installed the Fluxbox WM, which also built and installed without a problem.

Now, it seems that xorg is not recognizing neither my keyboard or mouse. I'm assuming the problem has something to do with drivers, but I don't know how to troubleshoot this, because once I do startx I'm basically left to hitting the power switch on machine to manually power it off (this is all that I can do, I can't even properly restart FreeBSD, I can't do anything without a keyboard).

I'm literately lost as to how to resolve this problem. I once before used a utility called "xorgconfig" to configure xorg (which I actually used to break xorg, since I could not find an appropriate image depth for my computer, none of them seemed to work), but it seems that this utility no longer exists in the new version of xorg, I get "xorgconfig: Command not found.".

The keyboard and mouse was working before when the FreeBSD sysinstall installed an outdated version of xorg (during FreeBSD install). 

I know this probably isn't an uncommon problem among xorg users, and the solution is probably simple. Could anyone please point me in the right direction here? Thanks in advance.


----------



## skypher (Apr 12, 2009)

argh, starting to get really frustrated by this bug.

followed directions in /usr/ports/UPDATING, and some directions given by SirDice here:

http://forums.freebsd.org/showthread.php?t=2804

and now xorg won't even start. I added the "AllowEmptyInput" "off" option to xorg.conf, and the following to rc.conf:


```
dbus_enable="YES"
hald_enable="YES"
```

now this is the message that startx gives me:


```
amnesiac# startx
xauth:  creating new authority file /root/.serverauth.927


X.Org X Server 1.6.0
Release Date: 2009-2-25
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 7.1-RELEASE i386
Current Operating System: FreeBSD amnesiac.localhost 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 14:37:25 UTC 2009     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
Build Date: 11 April 2009  04:03:35PM

        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Apr 12 01:13:20 2009
(==) Using config file: "/etc/X11/xorg.conf"
(EE) Failed to load module "savage" (module does not exist, 0)
(EE) No drivers available.

Fatal server error:
no screens found

Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.

giving up.
xinit:  No such file or directory (errno 2):  unable to connect to X server
xinit:  No such process (errno 3):  Server error.
amnesiac#
```

I am going to remove the additions I added to xorg.conf and rc.conf and keep searching for a solution.


----------



## SirDice (Apr 12, 2009)

skypher said:
			
		

> ```
> (EE) Failed to load module "savage" (module does not exist, 0)
> (EE) No drivers available.
> ```


It's not related to the mouse/keyboard issues. The wrong video driver perhaps? Or the savage driver isn't installed.


----------



## skypher (Apr 12, 2009)

I don't get that error without the changes made to xorg.conf and rc.conf. xorg starts and appears, but the keyboard and mouse are completely dead.

I think I read somewhere in /usr/ports/UPDATING mouse/keyboard problem has been "fixed", so its possible that by making those changes to xorg.conf and rc.conf I am introducing a totally different problem into the scenario. I reversed the changes I made to xorg.conf, and rc.conf, and I no longer get that error.

xorg worked fine when the FreeBSD installer installed an outdated version (keyboard and mouse, with moused enabled), so the problem is most definately being caused by the new version of xorg. My mouse never worked in xorg on its own, but enabling moused seemed to be an acceptable remedy.


----------



## skypher (Apr 12, 2009)

installed savage and still no mouse or keyboard. -_-

I don't know if the problem is the hald issue, but it seems to be. Like I said, the mouse and keyboard worked fine when sysinstall installed an outdated version of xorg, so unless it does something differently (and I doubt it), the problem is being caused by the new version.

I'd try re-installing FreeBSD and selecting to only install xorg with sysinstall, so then I could use portmanager to update the outdated version. But for some reason I feel as though it will not help, as soon as portmanager builds and installs the newer version of xorg I'll probably be right back to where I started.


----------



## jb_fvwm2 (Apr 12, 2009)

did you recently update /xinit/ which overwrote your xinitrc?
other threads point out stuff to put in xorg.conf manually
and/or your rc.conf needs to be edited.
what type keyboard and mouse?
you can search the web for "xorg.conf" for that mouse specific
name and etc


----------



## Lu_cas (Apr 13, 2009)

*No mouse and keyboard*

I had the same problem (no mouse and keyboard) but in Arch Linux, I fallowed http://wiki.archlinux.org/index.php/Xorg_input_hotplugging#Configuration and everything is working now.


----------



## SirDice (Apr 13, 2009)

Do you have a PS/2 or a USB mouse?

Post your rc.conf and xorg.conf.


----------



## Lu_cas (Apr 13, 2009)

SirDice said:
			
		

> Do you have a PS/2 or a USB mouse?
> 
> Post your rc.conf and xorg.conf.


Both are PS/2.

When I upgraded to xorg-server 1.5.3, I disabled hotplugging because it wasn't configuring my keyboard correctly.
Now in xorg 1.6.0 it seems don't be enough, in Xorg.0.log I have:

```
[...]
(II) Cannot locate a core pointer device.
(II) Cannot locate a core keyboard device.
[...]
```

To solve this problem I enabled hotplugging and created /etc/hal/fdi/policy/10-keymap.fdi, who tells hotplugging how to configure my keyboard (my mouse is configured properly by default).

xorg.conf:

```
Section "ServerLayout"
    Identifier     "Xorg Configured"
    Screen      0  "Screen0" 0 0
#    InputDevice    "Keyboard0" "CoreKeyboard"
#    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "ServerFlags"
#    Option "AllowMouseOpenFail" "true"
#    Option "AutoAddDevices" "False"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "freetype"
    Load           "glx"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "true"
    Option         "Emulate3Timeout" "70"
    Option         "SendCoreEvents" "true"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "abnt2"
    Option         "XkbLayout" "br"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Samsung"
    ModelName      "SyncMaster 940B Plus"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "GeForce 7600GT"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "GeForce 7600GT"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "NoLogo" "True"
    Option         "RenderAccel" "True"
    Option         "TripleBuffer" "True"
    Option         "BackinStore" "True"
    Option         "PixmapCacheSize" "300000"
    Option         "OnDemandVBlackInterrupts" "True"
    Option         "EnablePageFlip" "True"
    Option         "AddARGBGLXVisuals" "True"
    SubSection     "Display"
        Depth       24
        Modes      "1280x1024" "1024x768" "800x640"
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "Enable"
EndSection
```

10-keymap.fdi (based on xorg.conf's "keyboard0"):

```
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
	    <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.xkb.rules" type="string">base</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.xkb.model" type="string">abnt2</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.xkb.model" type="string">abnt2</merge>
      </match>

      <merge key="input.xkb.layout" type="string">br</merge>
      <merge key="input.xkb.variant" type="string" />
    </match>
  </device>
</deviceinfo>
```

rc.conf (remember, it's arch linux):

```
LOCALE="pt_BR.utf8"
HARDWARECLOCK="UTC"
USEDIRECTISA="no"
TIMEZONE="Brazil/East"
KEYMAP="br-abnt2"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

MOD_AUTOLOAD="yes"
MODULES=(atl2 fuse)
USELVM="no"

HOSTNAME="rerigueri"

eth1="dhcp"
INTERFACES=(eth1)

gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

DAEMONS=(syslog-ng network @openntpd netfs crond dbus hal @avahi-daemon @avahi-dnsconfd !alsa @oss @httpd @mysqld @cups @samba gdm stbd)
```


----------



## SirDice (Apr 13, 2009)

Lu_cas said:
			
		

> rc.conf (remember, it's arch linux):


Are you having problems with Freebsd or Arch linux? 

Pasting an Arch linux config file doesn't really help anyone IMO...

For FreeBSD, with PS/2 mouse:

Add to rc.conf:

```
hald_enable="YES"
dbus_enable="YES"
moused_enable="YES"
```

If you have an USB mouse the moused_enable isn't needed.


Make sure Device in the InputDevice section for the mouse in xorg.conf is:

```
Option "Device" "/dev/sysmouse"
```


----------



## kb6rxe (Apr 13, 2009)

Everytime I change change something in X windows, I have to reinstall
/usr/ports/x11-drivers/xf86-input-mouse and keyboard. Usually I reinstall the video driver also. The I reboot everything works ok after that.


----------



## SirDice (Apr 13, 2009)

kb6rxe said:
			
		

> Everytime I change change something in X windows, I have to reinstall
> /usr/ports/x11-drivers/xf86-input-mouse and keyboard. Usually I reinstall the video driver also. The I reboot everything works ok after that.


Why?!? I never had any issues...


----------



## kb6rxe (Apr 13, 2009)

I reinstall the drivers because the mouse and keyboard stop working and if I reinstall them, the mouse and keyboard work again. I don't know why I have to do it but it fixes
MY problem, usually.


----------



## skypher (Apr 13, 2009)

jb_fvwm2 said:
			
		

> did you recently update /xinit/ which overwrote your xinitrc?
> other threads point out stuff to put in xorg.conf manually
> and/or your rc.conf needs to be edited.
> what type keyboard and mouse?
> ...



I didn't touch /xinit/ or anything like that, I just did a make install clean on xorg.
It's a logitech PS/2 mouse and a search on the net for drivers using its model name din't find me anything.



> Do you have a PS/2 or a USB mouse?
> 
> Post your rc.conf and xorg.conf.



I no longer have a xorg.conf in /etc/X11, because since I removed the "AllowEmptyInput" "off" option the file was empty. Instead of editing out the option, I just chose to rm the file, since it did not seem to exist there before I added the option. I don't know where the default xorg.conf that an xorg install creates is stored, otherwise I would post it.

rc.conf:


```
# -- sysinstall generated deltas -- # Fri Apr 10 20:20:01 2009
# Created: Fri Apr 10 20:20:01 2009
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
defaultrouter="192.168.2.1"
hostname="amnesiac.localhost"
ifconfig_vr0="inet 192.168.2.136  netmask 255.255.255.0"
keymap="us.iso"
linux_enable="YES"
sshd_enable="YES"
# -- sysinstall generated deltas -- # Sun Apr 12 01:29:56 2009
moused_port="/dev/psm0"
moused_type="logitech"
moused_enable="NO"
```

hald_enable="YES" and dbus_enable="YES" were in there, but I edited them out when I found that they may have been causing the (probably unrelated) xorg fatal server error.

I attempted to enable FreeBSD to recognize my mouse by later entering more detailed info into sysinstall, where I also disabled moused temporarily to see if it would fix my keyboard/mouse issues (one entry in /usr/ports/UPDATING suggested to turn moused off to fix the keyboard/mouse issues). But it didn't help and I guess I should now enable moused again.

kb6rxe: I tried reinstalling those keyboard and mouse drivers but it didn't help.


----------



## SirDice (Apr 13, 2009)

Remove moused_port and moused_type and set moused_enable="YES". Start moused with */etc/rc.d/moused start*. It should pick up the mouse in the console if it's a PS/2.

If it works in the console xorg will find it.

You must enable both dbus and hald for xorg.

Oh.. And set a proper hostname


----------



## skypher (Apr 15, 2009)

I did that but I still do not have any keyboard or mouse input in X. Enabling/disabling moused does not seem to affect the problem at all. When I enable dbus and hald I get a new error "DRI is not enabled" but X still loads without any keyboard or mouse input.


----------



## tangram (Apr 15, 2009)

Go through this thread if you haven't before: http://forums.freebsd.org/showthread.php?t=1721.


----------



## skypher (Apr 16, 2009)

Thanks for the link tangram, I tried a suggestion there (portupgrade -rf xfce) and now the keyboard and mouse are working fine in X. Now finally I can move on.


----------



## herykaw (Apr 27, 2009)

*keyboard and mouse don't work*

I have installed the 7.2-RC2 and instalation works well, but when loggin screen starts keyboard and mouse don't work,i can't write anything on loggin tabs,any suggestions ? thanks for advance and sorry for my poor english


----------



## DutchDaemon (Apr 27, 2009)

Are you talking about logging in on X, or on the console?


----------



## herykaw (Apr 27, 2009)

ohh sorry on X with kdm


----------



## herykaw (Apr 27, 2009)

I'd tried to configure X like handbook says but still don't works, i don't know what it happend,the instalation of other versions works well everytime


----------



## DutchDaemon (Apr 27, 2009)

Threads merged. Please search the forums before posting.


----------



## Criosphinx (Apr 27, 2009)

Its probably because of X using hal

Add:

Option "AllowEmptyInput" "Off" 

to the server section in xorg.conf


----------



## herykaw (Apr 27, 2009)

ok !!! now its all working fine thanks again


----------



## dantavious (Apr 29, 2009)

*I am lost*

I have tried all teh suggestions on the forum yet I can not seem to get my keyboard and mouse working in X. They works fine without X.

SNIP of /etc/rc.conf

```
hald_enable="YES"
dbus_enable="YES"
```


XORG.CONF

```
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection


Section "ServerFlags"
    Option "AllowEmptyInput" "off"
    Option "AutoAddDevices" "False"
EndSection

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

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

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/sysmouse"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        #DisplaySize      380   300     # mm
        Identifier   "Monitor0"
        VendorName   "SPT"
        ModelName    "KOMODO II*"
        HorizSync    30.0 - 80.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   "RV610 LE AGP [Radeon HD 2400 PRO AGP]"
        BusID       "PCI:1: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
```
Any help please.


----------



## tangram (Apr 29, 2009)

Was xorg-server compiled with or without hal? If you've compiled it with hal you need to setup fdi policies.

Also take a look at this thread http://forums.freebsd.org/showthread.php?t=1721.

And next time use 
	
	



```
tags to wrap files content and commands ;)
```


----------



## SterlingCamden (Jun 17, 2012)

Thanks, kb6rxe.  My keyboard and mouse quit working when the new Xorg came out, but reinstalling xf86-input-(mouse,keyboard) did the trick.


----------

