# iMac 11.1: Xorg - black screen



## fernandel (Oct 1, 2013)

Installation of FreeBSD 9.2-RELEASE was successful on an iMac 11,1 with a Radeon HD 4850 GPU and I installed Xorg with


```
WITH_NEW_XORG=yes
```


```
xorg.conf.new

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     "${prefix}/share/fonts/X11/misc/"
	FontPath     "${prefix}/share/fonts/X11/TTF/"
	FontPath     "${prefix}/share/fonts/X11/OTF/"
	FontPath     "${prefix}/share/fonts/X11/Type1/"
	FontPath     "${prefix}/share/fonts/X11/100dpi/"
	FontPath     "${prefix}/share/fonts/X11/75dpi/"
EndSection

Section "Module"
	Load  "extmod"
	Load  "record"
	Load  "dbe"
	Load  "dri"
	Load  "dri2"
	Load  "glx"
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	  600   340	# mm
	Identifier   "Monitor0"
	VendorName   "APP"
	ModelName    "Color LCD"
	Option	    "DPMS"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [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"
	BusID       "PCI:1: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
	EndSubSection
EndSection
```

When I run `Xorg -config xorg.conf.new -retro` I got a black screen. Ctrl-ALt-F* doesn't work it stays a black screen. I built Xorg without hal but I had devd enabled.
Please check attached file.

Thanks in advance.


----------



## wblock@ (Oct 1, 2013)

I have not tried the new devd autoconfig option.  Unless you add or remove keyboards or mice while X is running, it is not really needed, and maybe not then.

The ${prefix} lines are unusual.  xorg.conf is not executed as a shell script, those will probably not work.

As far as the black screen, there are many possible causes.

How is X being started?  What are the contents of ~/.xinitrc and ~/.xsession?


----------



## mzperx (Oct 1, 2013)

I have installed 9.2 today too and had the same issue (with Intel HD 4000). Running `Xorg -configure` in the console broke the system (so X was not started yet). However after a restart I realized that the `xorg.conf.new` file was created after all. I simply copied and edited `xorg.conf` and apparently X is running well.


----------



## fernandel (Oct 1, 2013)

wblock@ said:
			
		

> I have not tried the new devd autoconfig option.  Unless you add or remove keyboards or mice while X is running, it is not really needed, and maybe not then.
> 
> The ${prefix} lines are unusual.  xorg.conf is not executed as a shell script, those will probably not work.
> 
> ...



I did install FreeBSD again. In .xinitrc I have:

```
exec fluxbox
```

And now I build Xorg without 'new'...in make.conf.
xorg.conf.new looks like:

```
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/"
EndSection

Section "Module"
	Load  "extmod"
	Load  "record"
	Load  "dbe"
	Load  "dri"
	Load  "dri2"
	Load  "glx"
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	  600   340	# mm
	Identifier   "Monitor0"
	VendorName   "APP"
	ModelName    "Color LCD"
	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  "Advanced Micro Devices, Inc. [AMD/ATI]"
	BoardName   "RV770/M98L [Mobility Radeon HD 4850]"
	BusID       "PCI:1: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
	EndSubSection
EndSection
```

And I got a black screen again. Please check attached log.

Thank you.
        #Option


----------



## Beastie (Oct 1, 2013)

mzperx said:
			
		

> Running Xorg -configure in console broke the system (so X was not started yet). However after restart I realized that xorg.conf.new file was created after all. I simply copied and edited xorg.conf and apparently X is running well.


It probably didn't "break the system" then (for you at least). A black screen is a perfectly normal test screen.
If you want the old chain mail pattern you need to use the *-retro* switch.


----------



## wblock@ (Oct 1, 2013)

Please put log files on the web, someplace like pastebin.com, so they can be easily read.

There did not appear to be any problems in yours.  Please remove or rename both xorg.conf and .xinitrc, then run `startx`.  Do you see a mouse pointer?


----------



## fernandel (Oct 1, 2013)

wblock@ said:
			
		

> Please put log files on the web, someplace like pastebin.com, so they can be easily read.
> 
> There did not appear to be any problems in yours.  Please remove or rename both xorg.conf and .xinitrc, then run `startx`.  Do you see a mouse pointer?



I did but I didn't saw a mouse pointer.


----------



## fernandel (Oct 1, 2013)

wblock@ said:
			
		

> Please put log files on the web, someplace like pastebin.com, so they can be easily read.
> 
> There did not appear to be any problems in yours.  Please remove or rename both xorg.conf and .xinitrc, then run `startx`.  Do you see a mouse pointer?



I forgot a link:

http://pastebin.com/BKzzpKHQ


----------



## wblock@ (Oct 1, 2013)

All right, the next thing to try.  Remove or rename all copies of xorg.conf.  Put this one in /usr/local/etc/X11/xorg.conf.

xorg.conf

```
Section "ServerLayout"
        Identifier   "X.org Configured"
        Screen       0  "Screen0" 0 0
        Option       "AIGLX" "On"
        Option       "AutoAddDevices" "Off"
        #Option       "Log" "sync"
EndSection

Section "DRI"
        Group 0
        Mode  0660
EndSection

Section "Module"
#       Disable "record"
EndSection

Section "Extensions"
        Option       "Composite" "Enable"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "radeon"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
EndSection
```


----------



## fernandel (Oct 1, 2013)

wblock@ said:
			
		

> All right, the next thing to try.  Remove or rename all copies of xorg.conf.  Put this one in /usr/local/etc/X11/xorg.conf.
> 
> 
> [/code]



It doesn't work:

http://pastebin.com/HSCUWGq1


----------



## wblock@ (Oct 1, 2013)

All right, you have an "eDP" port.  This is Apple hardware, and as such may need something weird to work.  There is nothing obvious in the logs to indicate a problem, except maybe 
	
	



```
(EE) RADEON(0): clock recovery failed
```


----------



## fernandel (Oct 1, 2013)

wblock@ said:
			
		

> All right, you have an "eDP" port.  This is Apple hardware, and as such may need something weird to work.  There is nothing obvious in the logs to indicate a problem, except maybe
> 
> 
> 
> ...



Thank you very much. I didn't have a problem on FreeBSD 10.0-ALPHA1 with the KMS driver but I had a problem with sound settings which looks like on FreeBSD 9.2 will work . Do you have any suggestion, please?


----------



## wblock@ (Oct 1, 2013)

Maybe one of the Mac types can suggest something more definite.  If the KMS driver worked under 10.0, I would stick with that and work on the sound settings, which are generally easier to deal with than video support.


----------



## fernandel (Oct 1, 2013)

wblock@ said:
			
		

> Maybe one of the Mac types can suggest something more definite.  If the KMS driver worked under 10.0, I would stick with that and work on the sound settings, which are generally easier to deal with than video support.



Thank you. I am not lucky because sound settings were a big problem too.

Have a good one.


----------

