# The mouse seems to leave the screen when hitting the left border



## polletfa (Dec 22, 2012)

Hello,
I've just installed FreeBSD (I've been a Linux user for over 10 years), and I'm having some trouble configuring the X server.
At first glance it works, except that there is a strange problem: when I move the mouse to the left border of the screen, it reacts as if the mouse was moving outside the screen (the longer I move left, the longer I need to move right until I see the pointer again). No problem for the three other borders.

Also, window managers detect the left border correctly:
- With TWM, when moving a window, the window correctly stops at the border
- With WindowMaker, when moving a window, it appears on the other side (as it should) but the mouse doesn't! And I have to move right if I want to find the pointer again.

Login managers on the other hand (I've tried XDM and GDM) don't work properly:
- With XDM, all I see is a black screen, but the program seems to respond to keyboard input somewhat (I've tried typing my username and passort and when I hit Enter, X restarts as if it failed to launch the window manager).
- With GDM, same thing, except that I have a background picture.

So much for the symptoms. What I did so far:
- I used the config file generated with Xorg -configure without changes (apart from adding font paths). The resolution seems reasonable (1280x800, depth=24). Ive check with xev and it confirms me that the top-left corner has coordinate 0x0 and the bottom-right 1280x800. 
- I've tried disabling auto-detect and configuring the input devices myself but the result is the same.
- I've tried using gnome-control-center (I haven't installed GNOME however, only gdm and gnome-control-center + dependencies) to change the resolution and I get the exact same problem in all available resolutions.

A few other info:
- The mouse works properly in the console. 
- Xorg.0.log doesn't report any error and the hardware seems to be detected correctly.
- Video card is Radeon HD 3200, I have a USB mouse and a touchpad (both works correctly apart from this problem). The monitor is a widescreen (16:10).
- I'm using FreeBSD 9.0 amd64 and X 1.7.7
- config and log files attached

Thanks a lot for your help, because I'm really starting to loose my hair on this one...


----------



## wblock@ (Dec 22, 2012)

xorg.conf is usually short enough to include in the message in 
	
	



```
tags.  Speaking of [file]xorg.conf[/file], the first step in debugging is to try without an [file]xorg.conf[/file] at all.  X can usually autoconfig.

[file]Xorg.0.log[/file] should be put on [url]pastebin.com[/url] or somewhere else where it can be read directly instead of requiring the user to download, extract, examine, then remove the leftovers.
```


----------



## polletfa (Dec 22, 2012)

wblock@ said:
			
		

> Speaking of xorg.conf, the first step in debugging is to try without an xorg.conf at all.  X can usually autoconfig.



Right, I forgot to mention it. As specified in the handbook I started with that and got the error "No screen found."

And here the files in the proper way:

Xorg.0.log: http://pastebin.com/CV6h163Z

xorg.conf:

```
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	Screen      1  "Screen1" RightOf "Screen0"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
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/"
	FontPath     "/usr/local/lib/X11/fonts/URW/"
	FontPath     "/usr/local/lib/X11/fonts/truetype/"
EndSection

Section "Module"
	Load  "extmod"
	Load  "record"
	Load  "dbe"
	Load  "glx"
	Load  "dri"
	Load  "dri2"
	Load  "freetype"
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	  330   210	# mm
	Identifier   "Monitor0"
	VendorName   "LPL"
	ModelName    "3b01"
EndSection

Section "Monitor"
	#DisplaySize	  330   210	# mm
	Identifier   "Monitor1"
	VendorName   "LPL"
	ModelName    "3b01"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "radeon"
	VendorName  "ATI Technologies Inc"
	BoardName   "RS780M/RS780MN [Mobility Radeon HD 3200 Graphics]"
	BusID       "PCI:1:5:0"
EndSection

Section "Device"
	Identifier  "Card1"
	Driver      "radeon"
	VendorName  "ATI Technologies Inc"
	BoardName   "Mobility Radeon HD 3400 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
		Modes	  "1280x800"
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor    "Monitor1"
	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
```


----------



## wblock@ (Dec 23, 2012)

You have two video cards and two monitors?  Remove the Monitor1, Card1, and Screen1 sections from xorg.conf.


----------



## polletfa (Dec 23, 2012)

Yes, that was it (except that I had to remove Card0 instead of Card1). I didn't think this was the problem because gnome-control-center showed me only one monitor.

Thanks a lot for you quick help.


----------

