# X server crashes and freezes upon logging out of desktop environment



## eviljeff (Jan 20, 2012)

Hello.  I do not currently have FreeBSD installed on my machine, but I am about to install it in a few moments.  I used FreeBSD 8.2 a couple of months ago and encountered an X server freeze-up while logging out of GNOME.  After hitting the logout or restart button, a blank screen would come up and the system would freeze up, causing me to have to shut down the computer with the power button.  After this incident, I became discouraged and just defaulted to Arch Linux.  But then FreeBSD 9.0 was released recently and I decided to give it another try, thinking that perhaps the problem I had before would be fixed.  Well, it wasn't.  I became discouraged once again, and went back to Linux.  But here I am today, wanting to give FreeBSD another shot.  So does anyone have any suggestions or even a solution to the problem described above?  It would be very, very appreciated.


----------



## SirDice (Jan 20, 2012)

It would help a lot if you told us what graphics card you have.


----------



## eviljeff (Jan 21, 2012)

Here is the output from the lspci command:


```
00:02.0 VGA compatible controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. Device 8336
	Flags: bus master, fast devsel, latency 0, IRQ 42
	Memory at fe400000 (64-bit, non-prefetchable) [size=4M]
	Memory at d0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at dc00 [size=200]
	Expansion ROM at <unassigned> [disabled]
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915

00:02.1 Display controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03)
	Subsystem: ASUSTeK Computer Inc. Device 8336
	Flags: bus master, fast devsel, latency 0
	Memory at fea00000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: <access denied>
```


----------



## tenq (Jan 22, 2012)

Same for me - after logoff or trying to change to virtual terminal - X hangups all machine ... and ever over ssh it don't respond...


```
uname -rsm 
FreeBSD 8.2-STABLE amd64
```


```
pciconf -lv

vgapci0@pci0:1:0:0:	class=0x030000 card=0x00000000 chip=0x95981002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'ATI RADEON HD 3600 Series (RV630)'
    class      = display
    subclass   = VGA
hdac0@pci0:1:0:1:	class=0x040300 card=0xaa200000 chip=0xaa201002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'ATI Radeon HD 3600 Series (RV630)'
    class      = multimedia
    subclass   = HDA
vgapci1@pci0:2:0:0:	class=0x030000 card=0x00000000 chip=0x95981002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'ATI RADEON HD 3600 Series (RV630)'
    class      = display
    subclass   = VGA
hdac2@pci0:2:0:1:	class=0x040300 card=0xaa200000 chip=0xaa201002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'ATI Radeon HD 3600 Series (RV630)'
    class      = multimedia
    subclass   = HDA
```


```
cat /etc/X11/xorg.conf

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	Screen      1  "Screen1" RightOf "Screen0"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
	Option		"AIGLX"	"on"
EndSection

Section "Files"
        ModulePath   "/usr/local/lib/xorg/modules"
        FontPath     "/usr/local/lib/X11/fonts/URW/"
        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/TrueType"
        FontPath     "/usr/local/share/apps/konsole/fonts"
        FontPath     "/usr/local/lib/X11/fonts/75dpi/"
        FontPath     "/usr/X11R6/lib/X11/fonts/cyrillic/"
        FontPath     "/usr/local/lib/X11/fonts/Droid/"
EndSection

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

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option "AutoRepeat" "500 30" 
	Option "XkbRules" "xorg" 
	Option "XkbLayout" "us_EN,ru(winkeys)"
#	Option "XkbVariant" ",winkeys"
	#     CTRL+SHIFT,
	#    Microsoft Windows 
	Option "XkbOptions" "grp:ctrl_shift_toggle"
EndSection

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

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Monitor"
	Identifier   "Monitor1"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
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     "AccelMethod"        	# [<str>]
        #Option     "offscreensize"      	# [<str>]
        #Option     "SWcursor"           	# [<bool>]
        #Option     "ignoreconnector"    	# [<str>]
        #Option     "forcereduced"       	# [<bool>]
        #Option     "forcedpi"           	# <i>
        #Option     "useconfiguredmonitor" 	# [<bool>]
        #Option     "HPD"                	# <str>
        #Option     "NoRandr"            	# [<bool>]
        #Option     "RROutputOrder"      	# [<str>]
        #Option     "DRI"                	# [<bool>]
        #Option     "TVMode"             	# [<str>]
        #Option     "ScaleType"          	# [<str>]
        #Option     "UseAtomBIOS"        	# [<bool>]
        #Option     "AtomBIOS"           	# [<str>]
        #Option     "UnverifiedFeatures" 	# [<bool>]
        #Option     "Audio"              	# [<bool>]
        #Option     "AudioStreamSilence" 	# [<str>]
        #Option     "HDMI"               	# [<str>]
        #Option     "COHERENT"           	# [<str>]
        #Option     "ForceLowPowerMode"  	# [<bool>]
        #Option     "LowPowerModeEngineClock" 	# <i>
#        Option  "MergedFB"      "true"
#        Option  "MonitorLayout" "LVDS (TMDS), CRT"
#        Option  "CRT2Hsync"     "30-81"
#        Option  "CRT2VRefresh"  "56-75"
#        Option  "OverlayOnCRTC2" "true"
#        Option  "CRT2Position" "RightOf"
#        Option  "MetaModes"     "1280x1024-1280x1024"
        #Option "MergedXineramaCRT2IsScreen0"   "false"
        Option		"AccelMethod"	"EXA"
	Identifier  "Card0"
	Driver      "radeon"
	VendorName  "ATI Technologies Inc"
	BoardName   "Mobility Radeon HD 3600 Series"
	BusID       "PCI:1:0:0"
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     "AccelMethod"        	# [<str>]
        #Option     "offscreensize"      	# [<str>]
        #Option     "SWcursor"           	# [<bool>]
        #Option     "ignoreconnector"    	# [<str>]
        #Option     "forcereduced"       	# [<bool>]
        #Option     "forcedpi"           	# <i>
        #Option     "useconfiguredmonitor" 	# [<bool>]
        #Option     "HPD"                	# <str>
        #Option     "NoRandr"            	# [<bool>]
        #Option     "RROutputOrder"      	# [<str>]
        #Option     "DRI"                	# [<bool>]
        #Option     "TVMode"             	# [<str>]
        #Option     "ScaleType"          	# [<str>]
        #Option     "UseAtomBIOS"        	# [<bool>]
        #Option     "AtomBIOS"           	# [<str>]
        #Option     "UnverifiedFeatures" 	# [<bool>]
        #Option     "Audio"              	# [<bool>]
        #Option     "AudioStreamSilence" 	# [<str>]
        #Option     "HDMI"               	# [<str>]
        #Option     "COHERENT"           	# [<str>]
        #Option     "ForceLowPowerMode"  	# [<bool>]
        #Option     "LowPowerModeEngineClock" 	# <i>
#	Option	"MergedFB"	"true"
#	Option	"MonitorLayout" "LVDS (TMDS), CRT"
#	Option	"CRT2Hsync"	"30-61"
#	Option	"CRT2VRefresh"	"56-75"
#	Option	"OverlayOnCRTC2" "true"
#	Option	"CRT2Position" "RightOf"
#	Option	"MetaModes"	"1280x1024-1280x1024"
	#Option "MergedXineramaCRT2IsScreen0"	"false"
        Option		"AccelMethod"	"EXA"
	Identifier  "Card1"
	Driver      "radeon"
	VendorName  "ATI Technologies Inc"
	BoardName   "Mobility Radeon HD 3600 Series"
	BusID       "PCI:2:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	DefaultDepth 24
	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
		Modes		"1280x1024"
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor    "Monitor1"
	DefaultDepth 24
	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
		Modes		"1680x1050"
		Depth     24
	EndSubSection
EndSection

Section "DRI"
        Group           "video"
        Mode            0660
EndSection
 
Section "Extensions"
    Option  "Composite"     "Enable"
    Option  "RENDER"        "Enable"
    Option  "DAMAGE"	    "Enable"
EndSection
```


```
pkg_info | grep radeon

xf86-video-radeonhd-1.3.0_4 X.Org ati RadeonHD display driver
```

Have 2 video cards and 2 monitors attached to different cards.

17" via DSUB VGA and 20" via DVI.

Any help is welcome.


----------



## wblock@ (Jan 22, 2012)

xorg.conf shows the radeon driver, not radeonhd.  radeonhd is mostly dead now, and radeon is the correct one to use.  (It doesn't show in the grep because it's part of x11-drivers/xf86-video-ati.)

The patches from this thread may help.  (I haven't tried them yet.)


----------

