# kill xorg test yields unusable system



## wfredk (Mar 28, 2011)

I've built a new system:
Gigabyte X58A-UDR3 motherboard
i7 980X CPU
24 GB RAM
XFXforce Radeon 5870 video card
I-INC 28" 1920x1200 LCD monitor
1KW CoolerMaster power supply
Drives:
ad0 - 2TB partitioned for FreeBSD-stable, FreeBSD-current, Linux
ad4 - 1TB winDoze 7 (yuk!) tried in previous machine
ad5 - 2TB partitioned 144GB swap, remainder for backups​
I installed "everything" from FreeeBSD-8.2-RELEASE-amd64.iso downloaded on March 1.  There were a number of conflicts, primarily due to unixODBD and libiodbc.

I followed the X11 configuration instructions in section 5.4 of the FreeBSD Handbook.  When I tried the *Xorg -config xorg.conf.new -retro* command, I got a course gray screen with the X mouse cursor, which responded to mouse movement.  I tried the Ctrl-Alt-F1 + Ctrl-c key sequence.  The screen went dark, and presently the monitor said there was no video input, and I couldn't get the system to respond except to Ctrl-Alt-Del (reboot).

I set up a hald configuration file so Ctrl-Alt-Backspace would do the same thing - and it did (another reboot).

I went on to the Advanced Configuration Topics and added a ModeLine for the monitor to the xorg.conf.new file.  Same behavior.

I turned the page in the Handbook, and went on to setting up the TrueType fonts I have installed on my w2K system.  I skipped setting up *xdm* because I don't want a graphical login when I'm bringing the system up.

I set up GNOME per the manual.  I tried to set up KDE, and ran into the unixODBC conflict again.  I did some research, found how to edit the ports/devel/ptlib26/Makefile to solve the problem, and got KDE and Xfce installed.

At this point, I was able to run */usr/local/bin/kdm* and have the KDE Display Manager come up.  I logged into KDE to verify it worked, then found there wasn't an option to terminate the X Window system, only to shut down or reboot.

After rebooting again, and re-starting kdm, I tried Ctrl-Alt-Backspace.  The graphical display went away, the screen went dark - and the monitor said there was no input - again.

YArB

I had not copied the xorg.conf.new file to /etc/X11/xorg.conf or /usr/local/etc/X11/xorg.conf so I'm guessing X figured out the video configuration on its own to bring up KDM.

Knowing that the X Window system will run on this machine, I went back to try the *Xorg -config xorg.conf.new -retro* command - and got exactly the same results:  Mouse cursor on a mottled gray background, Ctrl-Alt-F1 + Ctrl-c yielding a "dead" video output.

I'm guessing the video card is not being set back to "text mode" when X closes.  Any suggestions on how I can fix this problem?

Here's the xorg.conf.new file, as edited:


```
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	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/TrueType"
EndSection

Section "Module"
	Load  "dbe"
	Load  "dri"
	Load  "dri2"
	Load  "extmod"
	Load  "glx"
	Load  "record"
	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 590   370	# mm
	Identifier   "Monitor0"
	VendorName   "HSD"
	ModelName    "iH282"
	ModeLine     "1920x1200" 154.0 1920 1968 2000 2080 1200 1203 1209 1235
	HorizSync    24.0 - 80.0
	VertRefresh  56.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     "CustomEDID"         	# [<str>]
        #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     "ClockGating"        	# [<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>]
        #Option     "ForceLowPowerMode"  	# [<bool>]
        #Option     "DynamicPM"          	# [<bool>]
        #Option     "NewPLL"             	# [<bool>]
        #Option     "ZaphodHeads"        	# <str>
	Identifier  "Card0"
	Driver      "radeon"
	VendorName  "ATI Technologies Inc"
	BoardName   "Radeon HD 5870 (Cypress)"
	BusID       "PCI:3: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
		Depth     24
	EndSubSection
EndSection
```

The latest Xorg.0.log file (ZIPped) is attached.


----------



## jb_fvwm2 (Mar 28, 2011)

Not qualified to help, but maybe the following two CLI may be of use in your testing:

```
killall -HUP Xorg
```
 ... instead of cntl-alt-backspace;

```
xinit /usr/local/lib/X11/xinit/xinitrc -- /usr/local/bin/Xorg -ignoreABI -retro -nolisten TCP -dpi (insert number)
```
 to start gnome or kde or  even the default twm after maybe editing xinitrc accordingly.


----------



## adamk (Mar 28, 2011)

Unfortunately there's probably not much (or anything) you can do.  The support for your GPU is limited to just basic modesetting on FreeBSD and is in a very tenuous state. 

You could *try* the vesa driver, but you will be limited to vesa resolutions, and there's no guarantee your console will act any better when switching back from X.

Adam


----------



## wblock@ (Mar 28, 2011)

wfredk said:
			
		

> I installed "everything" from FreeeBSD-8.2-RELEASE-amd64.iso downloaded on March 1.



8.2-RELEASE is frozen; you get the packages and ports tree as it was at that time of release.

xorg has been updated since then, and there's a new radeon (ati) driver that has better support for newer Radeon cards.  It's not full support, but it may fix this mode reset problem.

So add 
	
	



```
WITHOUT_NOUVEAU=yes
```
 to /etc/make.conf, update your ports tree, follow /usr/ports/UPDATING from 20110224 onwards, and update installed ports.


----------



## wfredk (Mar 29, 2011)

@jb_fvwm2 - I was able to use 
	
	



```
ps ax
```
 to identify kde and X related processes and to get 
	
	



```
kill -9 {process-id-list}
```
 to terminate them all from an ssh login.  When I went back to the "console" window, I had the X mouse cursor in the middle of a frozen screen - so I rebooted from the remote shell.

@adamk - The incomplete support for this card is what inspired me to start the "kernel modesetting - where do I start?" thread in Forums>Development>FreeBSD Development.  In my "copious" (LOL) spare time, I'm reading _The Design and Implementation of the FreeBSD Operating System_ and researching what I can do to help get the card better supported - but in the mean time, I'd like to use what functionality is available.  If all else fails, I can (for now) use the graphical interface as far as it goes, and reboot when I need to get back to a real command line...

@wblock - I don't have time tonight to use your advice (day job in the way), but I will certainly get the updates within a day or so.  Thanks again!


----------

