# Upgraded from 8.0 to 8.1. Mouse does not work in X



## prushik (Aug 7, 2010)

I recently upgraded from 8.0 to 8.1. The upgrade went without problems. I then attempted to upgrade all my pkgs (installed with pkg_add), which did not go so well. In the end I used pkg_info and cut to determine the packages names of the installed packages, then pkg_delete to remove every single one of them, and then pkg_add to re-install them all. After rebooting my computer, my USB mouse does not work. It works in the console, which is nice, but X will not listen to it. X complains about the "mouse" driver not existing. I am using the exact same Xorg.conf file that I used with 8.0. Hal is also installed and running, as well as dbus.


----------



## wblock@ (Aug 7, 2010)

Please show your xorg.conf and /var/log/Xorg.0.log.

I also recommend running pkg_libchk from sysutils/bsdadminscripts to make sure all your libraries are okay.


----------



## prushik (Aug 7, 2010)

```
Section "ServerLayout"
    Identifier     "XFree86 Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Mouse1" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerFlags"
        Option         "AutoAddDevices" "On"
	Option	       "AutoEnableDevices" "On"
	Option		"IgnoreABI" "On"
EndSection

Section "Files"
    ModulePath      "/usr/local/lib"
    ModulePath      "/usr/local/lib/xorg/modules"
    FontPath        "/usr/local/lib/X11/fonts/cyrillic/"
    FontPath        "/usr/local/lib/X11/fonts/TrueType/"
    FontPath        "/usr/local/lib/X11/fonts/webfonts/"
    FontPath        "/usr/local/lib/X11/fonts/misc/"
    FontPath        "/usr/local/lib/X11/fonts/TTF/"
    FontPath        "/usr/local/lib/X11/fonts/Type1/"
    FontPath        "/usr/local/lib/X11/fonts/CID/"
    FontPath        "/usr/local/lib/X11/fonts/75dpi/"
    FontPath        "/usr/local/lib/X11/fonts/100dpi/"
    FontPath        "/usr/local/lib/X11/fonts/dejavu/"
    FontPath        "/usr/local/lib/X11/fonts/local/"
EndSection

Section "Module"
       Load  "record"
    Load           "ddc"
    Load           "dbe"
    Load           "extmod"
    Load           "glx"
    Load           "glx2"
	Load		"mouse_"
	Load		"nv"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "keyboard"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "us"
EndSection

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

Section "InputDevice"
    Identifier     "Mouse1"
    Driver         "mouse_drv"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "Emulate3Buttons"
EndSection

Section "InputDevice"
    Identifier     "Mouse2"
    Driver         "/dev/sysmouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "Buttons" "6"
    Option         "ZAxisMapping" "4 5"
    Option         "Emulate3Buttons"
EndSection

Section "Monitor"

        #DisplaySize      340   270# mm
 ### Comment all HorizSync and VertSync values to use DDC:
    Identifier     "Monitor0"
    VendorName     "VSC"
    ModelName      "VA712-2SERIES"
    HorizSync       30.0 - 80.0
    VertRefresh     50.0 - 80.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     "SWcursor"              # [<bool>]
    Option     "HWcursor"       "True"  # [<bool>]
        #Option     "NoAccel"               # [<bool>]
        #Option     "ShadowFB"              # [<bool>]
        #Option     "UseFBDev"              # [<bool>]
        #Option     "Rotate"                # [<str>]
        #Option     "VideoKey"              # <i>
        #Option     "FlatPanel"             # [<bool>]
        #Option     "FPDither"              # [<bool>]
        #Option     "CrtcNumber"            # <i>
        #Option     "FPScale"               # [<bool>]
        #Option     "FPTweak"               # <i>
    Identifier     "Card0"
    Driver         "vesa"
    VendorName     "nVidia Corporation"
    BoardName      "NV34 [GeForce FX 5500]"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Card0"
    Monitor        "Monitor0"
    DefaultDepth   24
    SubSection     "Display"
        Depth       1
        Modes      "640x480"
    EndSubSection
    SubSection     "Display"
        Depth       4
        Modes      "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Depth       8
        Modes      "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Depth       15
        Modes      "1024x768" "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Depth       16
        Modes      "1024x768" "800x600" "640x480"
    EndSubSection
    SubSection     "Display"
        Depth       24
        Modes      "1024x768" "800x600" "640x480"
    EndSubSection
EndSection
```

That is my xorg.conf.
I kinda messed with it a little, so it may not be pretty


----------



## prushik (Aug 8, 2010)

```
(II) VESA(0): Total Memory: 127 64KB banks (8128kB)
(II) VESA(0): Monitor0: Using hsync range of 30.00-80.00 kHz
(II) VESA(0): Monitor0: Using vrefresh range of 50.00-80.00 Hz
(II) VESA(0): Not using mode "1024x768" (no mode of this name)
(II) VESA(0): Not using built-in mode "800x600" (no mode of this name)
(II) VESA(0): Not using built-in mode "640x480" (no mode of this name)
(WW) VESA(0): No valid modes left. Trying less strict filter...
(II) VESA(0): Monitor0: Using hsync range of 30.00-80.00 kHz
(II) VESA(0): Monitor0: Using vrefresh range of 50.00-80.00 Hz
(II) VESA(0): Not using mode "1024x768" (no mode of this name)
(--) VESA(0): Virtual size is 800x600 (pitch 800)
(**) VESA(0): *Built-in mode "800x600"
(**) VESA(0): *Built-in mode "640x480"
(**) VESA(0): Display dimensions: (220, 130) mm
(**) VESA(0): DPI set to (92, 117)
(II) VESA(0): Attempting to use 72Hz refresh for mode "800x600" (115)
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(II) VESA(0): Attempting to use 73Hz refresh for mode "640x480" (112)
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(**) VESA(0): Using "Shadow Framebuffer"
(II) Loading sub module "shadow"
(II) LoadModule: "shadow"
(II) Loading /usr/local/lib/xorg/modules/libshadow.so
(II) Module shadow: vendor="X.Org Foundation"
	compiled for 1.7.5, module version = 1.1.0
	ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/local/lib/xorg/modules/libfb.so
(II) Module fb: vendor="X.Org Foundation"
	compiled for 1.7.5, module version = 1.0.0
	ABI class: X.Org ANSI C Emulation, version 0.4
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(II) UnloadModule: "nv"
(II) Unloading /usr/local/lib/xorg/modules/drivers/nv_drv.so
(==) Depth 24 pixmap format is 32 bpp
(II) Loading sub module "int10"
(II) LoadModule: "int10"
(II) Reloading /usr/local/lib/xorg/modules/libint10.so
(II) VESA(0): initializing int10
(==) VESA(0): Write-combining range (0xa0000,0x20000) was already clear
(II) VESA(0): Bad V_BIOS checksum
(II) VESA(0): Primary V_BIOS segment is: 0xc000
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(II) VESA(0): VESA BIOS detected
(II) VESA(0): VESA VBE Version 3.0
(II) VESA(0): VESA VBE Total Mem: 8128 kB
(II) VESA(0): VESA VBE OEM: Intel(r)PineView Graphics Chip Accelerated VGA BIOS
(II) VESA(0): VESA VBE OEM Software Rev: 1.0
(II) VESA(0): VESA VBE OEM Vendor: Intel Corporation
(II) VESA(0): VESA VBE OEM Product: Intel(r)PineView Graphics Controller
(II) VESA(0): VESA VBE OEM Product Rev: Hardware Version 0.0
(II) VESA(0): virtual address = 0x29400000,
	physical address = 0xd0000000, size = 8323072
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(II) VESA(0): Setting up VESA Mode 0x115 (800x600)
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
(==) VESA(0): Default visual is TrueColor
(==) VESA(0): Backing store disabled
(**) VESA(0): DPMS enabled
(WW) VESA(0): Option "HWcursor" is not used
(==) RandR enabled
(II) Initializing built-in extension Generic Event Extension
(II) Initializing built-in extension SHAPE
(II) Initializing built-in extension MIT-SHM
(II) Initializing built-in extension XInputExtension
(II) Initializing built-in extension XTEST
(II) Initializing built-in extension BIG-REQUESTS
(II) Initializing built-in extension SYNC
(II) Initializing built-in extension XKEYBOARD
(II) Initializing built-in extension XC-MISC
(II) Initializing built-in extension XINERAMA
(II) Initializing built-in extension XFIXES
(II) Initializing built-in extension RENDER
(II) Initializing built-in extension RANDR
(II) Initializing built-in extension COMPOSITE
(II) Initializing built-in extension DAMAGE
record: RECORD extension enabled at configure time.
record: This extension is known to be broken, disabling extension now..
record: http://bugs.freedesktop.org/show_bug.cgi?id=20500
(II) AIGLX: Loaded and initialized /usr/local/lib/dri/swrast_dri.so
(II) GLX: Initialized DRISWRAST GL provider for screen 0
(II) LoadModule: "mousedrv"
(WW) Warning, couldn't open module mousedrv
(II) UnloadModule: "mousedrv"
(EE) Failed to load module "mousedrv" (module does not exist, 0)
(EE) No input driver matching `mouse_drv'
(II) config/hal: Adding input device USB OPTICAL MOUSE
(II) LoadModule: "mouse"
(II) Loading /usr/local/lib/gnome-settings-daemon-2.0/libmouse.so
(EE) LoadModule: Module mouse does not have a mouseModuleData data object.
(II) UnloadModule: "mouse"
(II) Unloading /usr/local/lib/gnome-settings-daemon-2.0/libmouse.so
(EE) Failed to load module "mouse" (invalid module, 0)
(EE) No input driver matching `mouse'
(EE) config/hal: NewInputDeviceRequest failed (15)
(II) config/hal: Adding input device AT Keyboard
(II) LoadModule: "kbd"
(II) Loading /usr/local/lib/xorg/modules/drivers/kbd_drv.so
(II) Module kbd: vendor="X.Org Foundation"
	compiled for 1.7.5, module version = 1.4.0
	Module class: X.Org XInput Driver
	ABI class: X.Org XInput driver, version 7.0
(**) AT Keyboard: always reports core events
(**) Option "Protocol" "standard"
(**) AT Keyboard: Protocol: standard
(**) Option "XkbRules" "base"
(**) AT Keyboard: XkbRules: "base"
(**) Option "XkbModel" "pc105"
(**) AT Keyboard: XkbModel: "pc105"
(**) Option "XkbLayout" "us"
(**) AT Keyboard: XkbLayout: "us"
(**) Option "CustomKeycodes" "off"
(**) AT Keyboard: CustomKeycodes disabled
(II) XINPUT: Adding extended input device "AT Keyboard" (type: KEYBOARD)
(II) config/hal: Adding input device PS/2 Mouse
(II) LoadModule: "mouse"
(II) Loading /usr/local/lib/gnome-settings-daemon-2.0/libmouse.so
(EE) LoadModule: Module mouse does not have a mouseModuleData data object.
(II) UnloadModule: "mouse"
(II) Unloading /usr/local/lib/gnome-settings-daemon-2.0/libmouse.so
(EE) Failed to load module "mouse" (invalid module, 0)
(EE) No input driver matching `mouse'
(EE) config/hal: NewInputDeviceRequest failed (15)
(==) VESA(0): Write-combining range (0x0,0x1000) was already clear
```

Here's my log


----------



## prushik (Aug 8, 2010)

```
(II) LoadModule: "mouse"
(II) Loading /usr/local/lib/gnome-settings-daemon-2.0/libmouse.so
(EE) LoadModule: Module mouse does not have a mouseModuleData data object.
```

This looks a little odd. Shouldn't it be loading /usr/local/lib/xorg/modules/drivers/mouse_drv.so instead?
How do I tell it to do that?


----------



## prushik (Aug 8, 2010)

prushik said:
			
		

> This looks a little odd. Shouldn't it be loading /usr/local/lib/xorg/modules/drivers/mouse_drv.so instead?
> How do I tell it to do that?



Ok. I was right. I just renamed libmouse.so and started X and it worked fine. Maybe a better solution exists, but I do not use gnome, so I assume that nothing important is using that library.
My mouse works now, all is good.


----------



## wblock@ (Aug 8, 2010)

prushik said:
			
		

> ```
> Section "ServerFlags"
> Option         "AutoAddDevices" "On"
> Option	       "AutoEnableDevices" "On"
> ...


----------



## adamk (Aug 8, 2010)

Why in the world are you including /usr/local/lib in your ModulePath?

Adam


----------



## prushik (Aug 8, 2010)

wblock said:
			
		

> prushik said:
> 
> 
> 
> ...



I added IgnoreABI because I thought maybe it was failing to load the module from the previous version of X. "Not Good" is an opinion.
When I ran X -configure, AutoAddDevices was set to Off, So I changed it and added AutoEnableDevices in case that was the problem.
I tried loading "mouse_" because when I loaded just mouse, I saw a message that said "could not load mousedrv" and the module I wanted was called mouse_drv. So I tried loading mouse_ to see if it would just tack a drv on the end and load it, didnt happen that way and I never removed that line, it just generates and error and continues parsing.
I have three different mouse sections so I could try three different things at once.


----------



## prushik (Aug 8, 2010)

adamk said:
			
		

> Why in the world are you including /usr/local/lib in your ModulePath?
> 
> Adam



I never told it to do that. Its just something that happened after the upgrade.


----------



## adamk (Aug 8, 2010)

prushik said:
			
		

> I never told it to do that. Its just something that happened after the upgrade.



Uh huh....  The upgrade doesn't touch your xorg.conf file, and /usr/local/lib is not part of the ModulePath used by the Xorg built-in configuration.

Honestly, your xorg.conf file is such an incredible mess, I'd start from scratch by creating a new one with 'Xorg -configure'.  Or just not using one at all, if you can get away with it.

Adam


----------



## prushik (Aug 8, 2010)

adamk said:
			
		

> Uh huh....  The upgrade doesn't touch your xorg.conf file, and /usr/local/lib is not part of the ModulePath used by the Xorg built-in configuration.
> 
> Honestly, your xorg.conf file is such an incredible mess, I'd start from scratch by creating a new one with 'Xorg -configure'.  Or just not using one at all, if you can get away with it.
> 
> Adam



I can't get away without one. I had a lot of trouble getting X running on this machine. X -configure sets it up to use the nv driver, which locks up my computer (MSI Wind-U135). I had to use X -configure from PCBSD, and copy it over via lynx and gmail. I did not touch it after that until after the upgrade, and the mouse stopped.
So anyway, I did not add that to the module path, it must have been there the whole time, and just had no effect until I did the upgrade and some other package added the libmouse.so file.


----------



## adamk (Aug 8, 2010)

Well I still suggest starting from a clean xorg.conf file.  nv should not be in the Module section...  mouse_ is not valid in any section.  There is no glx2 module, either.

Specifying AutoEnableDevices and AutoAddDevices in an xorg.conf file where you are defining your input devices will also cause problems.

Adam


----------



## carlton_draught (Nov 19, 2010)

prushik said:
			
		

> Ok. I was right. I just renamed libmouse.so and started X and it worked fine. Maybe a better solution exists, but I do not use gnome, so I assume that nothing important is using that library.
> My mouse works now, all is good.


For what it's worth I am having this same problem with the package from 8-stable. I'm not getting why renaming the libmouse.so (to what?) is going to help. I do use gnome. I think I'm going to try using ports rather than packages.


----------



## wblock@ (Nov 19, 2010)

carlton_draught said:
			
		

> For what it's worth I am having this same problem with the package from 8-stable. I'm not getting why renaming the libmouse.so (to what?) is going to help.



It's a double negative: not(not working).  Don't use a broken ModulePath, and don't load "mouse_", and it's not a problem anyway.



> I do use gnome. I think I'm going to try using ports rather than packages.



That's what I do, although I've heard good things about pkg_upgrade from sysutils/bsdadminscripts.


----------



## ahavatar (Nov 19, 2010)

My FreeBSD runs Xorg without xorg.conf automagically. If you have a recent Xorg, it's likely that you don't need xorg.conf at all.


----------



## carlton_draught (Nov 19, 2010)

ahavatar said:
			
		

> My FreeBSD runs Xorg without xorg.conf automagically. If you have a recent Xorg, it's likely that you don't need xorg.conf at all.


I think that might depend on how many monitors you use.


----------



## wblock@ (Nov 19, 2010)

carlton_draught said:
			
		

> I think that might depend on how many monitors you use.



Just tested this: without xorg.conf, both monitors will show the same part of the root window, aka "clone mode".  xrandr(1) could be used either manually or from .xinitrc to set them to show different areas of the root window.

Setting things up beforehand in xorg.conf is often more convenient.  Also nice when the defaults are not what you want.


----------



## carlton_draught (Nov 19, 2010)

wblock said:
			
		

> Setting things up beforehand in xorg.conf is often more convenient.  Also nice when the defaults are not what you want.


Yes it is. When it takes you several days to get xorg.conf working the way you want, it is worth saving and holding on to.

BTW I've just tested the ports version, and now it works great. Ports it is. Thanks for your suggestions.


----------



## carlton_draught (May 8, 2011)

adamk said:
			
		

> Why in the world are you including /usr/local/lib in your ModulePath?
> 
> Adam


Thanks for this. I had this problem after a restore, and removing that line from the xorg.conf made it work.


----------

