# Xorg won't turn off display after update



## fmw (May 24, 2011)

Hi everyone,

I just updated the entire system, which included updating Xorg from 7.5 to 7.5.1. I had encountered some problems with vlc crashing the X server. Now the display just turns black after some time, but it doesn't go into power saving mode any more. 

Since this occurs both in Gnome and KDE, my guess is that this has something to do with Xorg. I checked the power management options, everything seems to be correct. Do I need to rerun 
	
	



```
Xorg -configure
```
 after an update?

For the record, the system is 8.1-RELEASE i386 with an ATI graphics card.

Any help is appreciated,
Frank


----------



## SirDice (May 24, 2011)

You shouldn't need to reconfigure Xorg with this update. Check /var/log/Xorg.0.log and see if DPMS is enabled.

Mine is done by the NVidia driver so yours might look different:

```
(==) NVIDIA(0): DPMS enabled
```


----------



## wblock@ (May 24, 2011)

Please show xorg.conf and /var/log/Xorg.0.log.  The first will fit in a post, pastebin.com is popular for the second.  It's also worth looking at .xinitrc in case something is set in there.


----------



## jrm@ (May 24, 2011)

You can run `% xset -q` for information about DPMS.  For example here is the relevant information from my system:


```
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 600
  DPMS is Enabled
  Monitor is On
```


----------



## jrm@ (May 24, 2011)

Also, you should be able to modify the "Off time" with your screensaver application ([gnome-|kde|X]screensaver) or with xset.

You can also do a test with `% xset dpms force off`.


----------



## fmw (May 31, 2011)

Sorry for the delay, sometimes other things just get in the way...

DPMS is enabled, 


```
xset -q
[...]
DPMS (Energy Star):
  Standby: 600    Suspend: 0    Off: 0
  DPMS is Enabled
  Monitor is On
```

In Xorg.0.log I found the following entries related to DPMS:


```
(II) Loading extension DPMS
(II) RADEON(0): DPMS capabilities: StandBy Suspend Off
(II) RADEON(0): DPMS capabilities: StandBy Suspend Off
(**) RADEON(0): DPMS enabled
```

The rest of Xorg.0.log is here: http://pastebin.com/uYVn1B6F

Now I can use xset to change the value for off and it works, but none of the utilities that come with both KDE3 and Gnome2 seem to have any effect.

I also noticed that, as long as I haven't logged in, it works as desired, i.e. the KDM greeter will turn the display off after some time.


----------



## jrm@ (May 31, 2011)

Your output of `% xset -q` shows the monitor is not set to go off (Off: 0) .  I don't use kde, so I can't offer any details about how you configure your screensaver, but you need to get the output of `% xset -q` to show a value in seconds for the off time.


----------



## wblock@ (May 31, 2011)

Still haven't seen xorg.conf.  Check the menus on the monitor and see if DPMS or power save features are disabled on it.


----------



## jrm@ (May 31, 2011)

fmw said:
			
		

> Now I can use xset to change the value for off and it works, but none of the utilities that come with both KDE3 and Gnome2 seem to have any effect.



Sorry, I responded too quickly after seeing the output without reading the rest carefully enough.  If things work correctly (your monitor turns off after a specified time) when you set the off time with xset, then it seems the problem is with KDE or Gnome.


----------



## fmw (Jun 4, 2011)

wblock said:
			
		

> Still haven't seen xorg.conf.  Check the menus on the monitor and see if DPMS or power save features are disabled on it.



Aw shucks, I knew I had forgotten something.

The settings on the monitor are just fine; as I mentioned before, it works as long as I haven't logged in.

Here's xorg.conf which I hasn't been changed so far:


```
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  "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   "GSM"
	ModelName    ""
	HorizSync    30.0 - 83.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     "ShowCache"          	# [<bool>]
        #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   "RV350 AQ [Radeon 9600]"
	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
```


----------



## fmw (Jun 4, 2011)

A bit of an update:

I just saw a new version of Hal in the ports collection, so I upgraded that. 

Result: now [cmd=]xset dpms force off[/cmd] doesn't work any more.

I guess now I know where I need to look.


----------



## fmw (Jun 5, 2011)

Now I did take a look, found nothing. 

First of all though, apologies to DutchDaemon. I shouldn't post here when in a hurry. :\

Now for the long version: 

I followed the steps described in http://www.freebsd.org/gnome/docs/halfaq.html to enable verbose output from HAL. Aside from the DPMS glitch, I had noticed that logging in was taking much longer since the update. 

However, neither logging in nor `% xset dpms force off` triggered any messages. The only result this command gave me was a black screen, but again it wasn't powered down.

So, where else can I look?


----------



## wblock@ (Jun 5, 2011)

HAL should not have any bearing, DPMS is between the monitor and the video card and driver.

*xset dpms force off* just disables the video signal, so that's working.  It's up to the monitor to recognize there's no signal and go to sleep or power down.  Fancier monitors have power control menu options, but they are rare.

Maybe the difference you're seeing in power save is actually a difference in the video driver.  x11-drivers/xf86-video-ati613 is still in ports; see if it acts any different.


----------



## fmw (Jun 5, 2011)

wblock said:
			
		

> *xset dpms force off* just disables the video signal, so that's working.  It's up to the monitor to recognize there's no signal and go to sleep or power down.  Fancier monitors have power control menu options, but they are rare.
> 
> Maybe the difference you're seeing in power save is actually a difference in the video driver.  x11-drivers/xf86-video-ati613 is still in ports; see if it acts any different.



I had suspected something like that after the first update which I ran a few weeks ago. I had been slightly *cough* behind on updates, so I couldn't trace it to a specific port. 

However in this case, I'm absolutely positive that the change in the behaviour of the monitor coincided with (I am clearly *not* saying: was caused by) the update of HAL. The only thing I don't know for sure is whether any dependencies were updated along with it. 

The only thing that hasn't changed is that it still works as long as I haven't logged in - I can tell that by the power LED on the monitor.

Now of course I could ignore that as a minor nuisance which it is, but my curiosity gets in the way of that. After all, that is my reason for switching to FreeBSD in the first place.


----------



## fmw (Jun 14, 2011)

Good thing I wrote 'coincided'. Never rule out your own clumsiness.

Oh well, at least I can rule out HAL as the source of the problem now.

So, what do I need to do to switch the video driver? I couldn't seem to find specific instructions for that. Do I just install the new driver, delete the old one and rerun *Xorg -configure* ?


----------



## wblock@ (Jun 15, 2011)

`# cd /usr/ports/x11-drivers/xf86-video-ati && make deinstall`
`# cd /usr/ports/x11-drivers/xf86-video-ati613 && make install clean`

No need to run -configure again, it's all the same.


----------



## fmw (Jun 16, 2011)

wblock said:
			
		

> No need to run -configure again, it's all the same.



Actually, I had to do that, otherwise I'd just get 

```
X server died during startup
X server for display :0 can't be started, session disabled
```

For some reason, DMPS wasn't enabled in the new xorg.conf, but that was no problem. Still the problem persisted, but switching the driver seems to have fixed the issue I had with vlc crashing the X server, so that was a good thing. 

Now since that had been taken care of, I no longer had a reason to keep using KDE - KDE seemed to be a bit more stable than Gnome - sometimes just clicking on the wrong window while a video was running caused a crash. So, I decided to see what would happen if I switched to GDM for log-in. 

I found two things:

1. For the first time since I started using FreeBSD, I actually have a fully working GDM. So far, it would frequently hang itself up when I mistyped the password or do other funny things.

2. After a minute, the screen goes black, the LED turns amber. Hey! 

So at this point, I'd guess that there's something in the way the KDE Greeter initializes the session that doesn't quite work.


----------



## FeZoli (Jul 30, 2015)

Hi There,

This is a rather old thread, but I have the same problem in FreeBSD 10.1 x86
My graphic card is Radeon HD3200

DPMS is enabled, and set to '1 1 1' with `xset`. Screen never blanks. Furthermore also ther applications think that there was no idle time (aka. Pidgin remains 'online' forever, no 'away' state activated).

Anybody else having this issue?

Thanks,

Zoli


----------

