Corrupt Xorg configuration

I have corrupted my X setup and have been unable to correct it.

History:
The hardware had been in use for several months as a test bed when I took it for use as my desktop. My previous workstation was FreeBSD 7.? and there were no issues with it in installing X and KDE but it was about four years ago for my last install of X.

uname -a
Code:
FreeBSD sport.xxx.xxx.xxx 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010     
root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

Before starting the X install I updated ports via portsnap fetch update. I initially installed x11/xorg from ports without any problems, X started and ran without any issues. I then installed KDE4 from ports and something got corrupted, KDE would not start and X would no longer start. I attempted to trouble shoot the problem for a few hours but finally I did a make deinstall on KDE and a make deinstall reinstall on X and X again worked correctly. I then decided to try the Gnome port and again would up with a corrupted X system and Gnome unworkable.

Again, after attempting to trouble shoot the problem I did a deinstall on Gnome and a make deintall reinstall on X but this time X would not work.

I have since tried several variations to get X working again. Initially I ran both make deinstall and pkg_cleanup to remove all KDE, Gnome and X packages to attempt to start from scratch. I have made numerous attempts to install X using both make deinstall and pkg_cleanup
to remove X to allow for a fresh start. I have installed X from both ports and using pkg_add several times each.

Currently X -config /root/xorg.conf.new -retro works properly giving me a black/grey cross-hatch screen with a working mouse. startx however gives me a black screen for about 10 seconds then exits with the following screen,

Code:
xauth:  creating new authority file /root/.serverauth.1954
X.Org X Server 1.7.5
Release Date: 2010-02-16
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 8.1-RELEASE amd64 
Current Operating System: FreeBSD  8.1-RELEASE FreeBSD 8.1-RELEASE #0: 
Mon Jul 19 02:36:49 UTC 2010     
root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
Build Date: 07 December 2010  10:41:32AM
 
Current version of pixman: 0.18.4
	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: Tue Dec  7 12:12:08 2010
(==) Using config file: "/etc/X11/xorg.conf"
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

waiting for X server to shut down


The Xorg.0.log shows no errors, only a couple of warnings.

Xorg.0.log errors
Code:
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
(WW) MACH64(0): Cannot shadow an accelerated frame buffer.
(WW) MACH64(0): DRI static buffer allocation failed -- need at least 12800 kB video memory

The current install is via ports and the config file is below.
I am thinking that there may be a file that has not been removed during the pkg_cleanup or make deintstall that is causing the problem but I dont really know where to look. I have been working on this for several days now and am at a loss as what to look for.
Any help?

CONFIG:
Code:
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
	Option		"AllowEmptyInput" "off"
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   "DEL"
	ModelName    "DELL E198FP"
	HorizSync    31.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     "probe_sparse"       	# [<bool>]
        #Option     "accel"              	# [<bool>]
        #Option     "crt_display"        	# [<bool>]
        #Option     "composite_sync"     	# [<bool>]
        #Option     "hw_cursor"          	# [<bool>]
        #Option     "force_pci_mode"     	# [<bool>]
        #Option     "dma_mode"           	# <str>
        #Option     "agp_mode"           	# <i>
        #Option     "agp_size"           	# <i>
        #Option     "local_textures"     	# [<bool>]
        #Option     "buffer_size"        	# <i>
        #Option     "mmio_cache"         	# [<bool>]
        #Option     "test_mmio_cache"    	# [<bool>]
        #Option     "panel_display"      	# [<bool>]
        #Option     "reference_clock"    	# <freq>
        #Option     "shadow_fb"          	# [<bool>]
        #Option     "sw_cursor"          	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "RenderAccel"        	# [<bool>]
	Identifier  "Card0"
	Driver      "mach64"
	VendorName  "ATI Technologies Inc"
	BoardName   "Rage XL"
	BusID       "PCI:6:13: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
 
Sounds to me like X is starting up, but whatever WM/DE you have set in your ~/.xinitrc file is immediately exiting.

What happens if you run [cmd=""]xinit /usr/local/bin/xterm[/cmd] ? Obviously make sure xterm is installed first.

Adam
 
rick- said:
Currently X -config /root/xorg.conf.new -retro works properly giving me a black/grey cross-hatch screen with a working mouse. startx however gives me a black screen for about 10 seconds then exits

Copy your xorg.conf to /usr/local/etc/X11/xorg.conf so it will be used by default.

Code:
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
	Option		"AllowEmptyInput" "off"
EndSection

Ah, my old nemesis AEI. It's been a while since we met last.
 
adamk said:
Sounds to me like X is starting up, but whatever WM/DE you have set in your ~/.xinitrc file is immediately exiting.

What happens if you run [cmd=""]xinit /usr/local/bin/xterm[/cmd] ? Obviously make sure xterm is installed first.

Adam

I get an xterm window in the upper left hand corner.
.xinitrc has all parameters commented out.
What do you suggest next?
 
wblock said:
Copy your xorg.conf to /usr/local/etc/X11/xorg.conf so it will be used by default.



Ah, my old nemesis AEI. It's been a while since we met last.

xorg.conf is aleady in /usr/local/etc/X11/.
Results of startx are identical for root or user.
 
So everything in xinitrc is commented out? What do you expect to happen, then, when typing [cmd=""]startx[/cmd]

:)

xinit launches X, and then launches whatever is in .xinitrc. Since nothing is in there, X immediately exits.

Adam
 
In other words [cmd=]echo "exec /usr/local/kde4/bin/startkde" > ~/.xinitrc[/cmd] :p or any other combination depending on which WM or DE you are using.
 
adamk said:
So everything in xinitrc is commented out? What do you expect to happen, then, when typing [cmd=""]startx[/cmd]

:)

xinit launches X, and then launches whatever is in .xinitrc. Since nothing is in there, X immediately exits.

Adam

Yes, if I add exec xtem to the .xinitrc file xterm starts ok.
If i replace it with exec twm then twm never starts, so maby my problem has been twm all along. I'll reinstall twm and see if that helps.
TWM was my default x choice.
 
Corrupt Xorg configuration [UPDATE]

I did a deinstall reinstall on twm but still was unable to get it to start.
I then installed afterstep and it starts and runs without error. The only issue was the first attempt failed with a message that libgcrypt.so.16 was required. The only version I found in ports was libgcrypt.so.17 which I installed and created a symlink to libgcrypt.so.16. This appears to be ok.

Now afterstep is ok but I wanted either KDE or Gnome again for my workstation so on with more attempts.

A new KDE4 install failed with a great number of 'undefined reference' errors. I decided to abandon the kde install at this time and move to gnome2.
The gnome2 install failed while installing gstreamer plugins. A message requested that I forward a copy of the typescript file, a config.log file from the gstreamer port and information on packages installed on the machine to the maintainers of multimedia @ freebsd.org, this was done.

Currently I am using the afterstep until I have some more time to pursue this.

As a side note, a co-worker is having similar issues with X. He can start xterm without problem but if he trys to start twm the machine crashes and no X log file is created so trouble shooting that machine is going to be difficult. This is new hardware and obviously a fresh install of 8.1 RELEASE. Fortunately this is on a spare/testbed machine so it is not critical.
IF ANYONE has any ideas on how to proceed with this one your thoughts/comments are certainly welcome.

This is sort of a bummer, the last time I installed X and KDE was several years ago on a 7.? system. To the best of my recollection it took a total of a couple of hours from start to finish and it simply worked. A hardware failure caused me to have to start this install and it has really been interesting.

Thanks for all the help so far.
 
rick- said:
The only issue was the first attempt failed with a message that libgcrypt.so.16 was required. The only version I found in ports was libgcrypt.so.17 which I installed and created a symlink to libgcrypt.so.16. This appears to be ok.
No, this is not ok. Find the port that installed the binary that complains about the old version. Then rebuild that port. Never just symlink different library versions because that will come back to haunt you and you will have a hard time trying to figure out what's wrong.
 
rick- said:
I did a deinstall reinstall on twm but still was unable to get it to start.

# make clean deinstall install

(install, not reinstall) is usually a better choice. That makes sure you're not just installing an outdated build.

I then installed afterstep and it starts and runs without error. The only issue was the first attempt failed with a message that libgcrypt.so.16 was required. The only version I found in ports was libgcrypt.so.17 which I installed and created a symlink to libgcrypt.so.16. This appears to be ok.

That's much like making emergency car repairs in the middle of the desert. Anything is okay, as long as it gets you somewhere where you can work on it in safety. But then you need to fix it for real, or it will come back to haunt you later. See the 20100727 entry in /usr/ports/UPDATING. Trying to install new ports from an updated ports tree without updating existing applications often causes problems. See Upgrading FreeBSD Ports.

Now afterstep is ok but I wanted either KDE or Gnome again for my workstation so on with more attempts.

A new KDE4 install failed with a great number of 'undefined reference' errors. I decided to abandon the kde install at this time and move to gnome2.
The gnome2 install failed while installing gstreamer plugins. A message requested that I forward a copy of the typescript file, a config.log file from the gstreamer port and information on packages installed on the machine to the maintainers of multimedia @ freebsd.org, this was done.

20101202 entry in /usr/ports/UPDATING. Always, yes always, check that file before upgrading ports.

As a side note, a co-worker is having similar issues with X. He can start xterm without problem but if he trys to start twm the machine crashes and no X log file is created so trouble shooting that machine is going to be difficult. This is new hardware and obviously a fresh install of 8.1 RELEASE. Fortunately this is on a spare/testbed machine so it is not critical.
IF ANYONE has any ideas on how to proceed with this one your thoughts/comments are certainly welcome.

Read the article above. Unless that computer is identical to your machine, start a new thread, including the xorg.conf and /var/log/Xorg.0.log from when just xterm is used.
 
Back
Top