Screen Power Config for LXDM login manager

Discussion in general that pertains to Sabayon Linux - Must Pertain to Sabayon Linux

Moderator: Moderators

Screen Power Config for LXDM login manager

Postby kayasaman » Thu Apr 25, 2013 23:07

Hi,

I'm running the MATE desktop environment and LXDM login manager which got auto-installed with it.

I've just upgraded to the latest version too: 1.6.0

My issue is that the login manager LXDM doesn't turn off the displays after a period of time like before.

This means that the displays are on 24/7 as the machine is never switched off.....

Is there a way to configure LXDM to turn the screens off after the login screen is idle for X amount of time?


In MATE the Power-Manager settings do it during the user sessions but if someone isn't logged in then how does one go about it?


Would someone be able to help me or give some advice?


If it's a but I don't mind posting a bug report!


Thanks
kayasaman
Young Hen
 
Posts: 29
Joined: Wed Feb 06, 2013 5:14

Re: Screen Power Config for LXDM login manager

Postby colock » Fri Apr 26, 2013 10:03

I think that XOrg integrates DPMS (Display Power Managing Signaling), i.e. it should not be relevant to lxdm unless it does explicitely prevent power saving (which would surprise me a lot).

Instead of focusing on lxdm, see if you can find what changed in the DPMS settings of your XOrg between the last upgrade. Your /var/log/Xorg.0.log may contain some useful information.

Also, mate-1.6.1 seems to be a better version than mate-1.6.0
colock
Simple Hen
 
Posts: 56
Joined: Mon Feb 25, 2013 12:01

Re: Screen Power Config for LXDM login manager

Postby kayasaman » Sat Apr 27, 2013 0:10

I get this from Xorg.log.0 when searching for DPMS:

Code: Select all
cat Xorg.0.log | grep DPMS
[    18.397] Initializing built-in extension DPMS
[    19.926] (==) NVIDIA(0): DPMS enabled


so it seems to be enabled and no errors seem to be present.


Could it be an NVidia driver issues?? Am using the latest drivers from Entropy!

Also, mate-1.6.1 seems to be a better version than mate-1.6.0


Will this be part of the Sabayon Weekly updates for Entropy? I think my system went from 1.4.0 to 1.6.0 and I update the system every week or whenever the Rigo Daemon shows me that there are updates.


{EDIT}

Could this possible be an ACPI issue?

Just did a more thorough search and checked the whole Xorg log file and found this:

Code: Select all
[    18.395] (--) PCI:*(0:3:0:0) 10de:0a64:1043:841f rev 162, Mem @ 0xfa000000/16777216, 0xd0000000/268435456, 0xce000000/33554432, I/O @ 0x0000cc00/128, BIOS @ 0x?????
???/524288
[    18.396] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)


The system further down claims that ACPI daemon either isn't running or cannot connect to ACPI socket.


Well ran:

Code: Select all
/etc/init.d/acpid restart


after I couldn't find acpi when running: ps aux | grep acpi

The daemon has started now so let's see if it makes a difference; will enable at runlevel 5 now and reboot.
kayasaman
Young Hen
 
Posts: 29
Joined: Wed Feb 06, 2013 5:14

Re: Screen Power Config for LXDM login manager

Postby kayasaman » Sat Apr 27, 2013 3:19

Well the good news is that the screens are going black now!! Though when I checked the LCD backlight was still lit.....

....it just might take a bit longer to turn off the LEDs then blacken the displays.

One thing I noticed though was that XDM (LXDM init script) starts before the ACPI init script creates a socket in /var/run/

In order to get round this I wrote a shell script testing for the socket and if not found reboot XDM:

Code: Select all
#!/bin/bash

export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin

sock=`netstat | grep acpid`
sock_name="acpid"


if [[ $sock =~ $sock_name ]]; then
   echo "Output of Sockstat command" > /var/log/xdm_restart.log;
   echo "" >> /var/log/xdm_restart.log;
   echo "$sock" >> /var/log/xdm_restart.log;
   echo "" >> /var/log/xdm_restart.log;
   echo "Socket type $sock_name" >> /var/log/xdm_restart.log;
   echo "" >> /var/log/xdm_restart.log;
else
   sleep 30;
   /etc/init.d/xdm restart;
fi


and cronolized it to @reboot.

Though it's still in testing stage and might be easier to write something like:

Code: Select all
#!/bin/bash
sleep 30
/etc/init.d/xdm restart


??
kayasaman
Young Hen
 
Posts: 29
Joined: Wed Feb 06, 2013 5:14

Re: Screen Power Config for LXDM login manager

Postby kayasaman » Mon Apr 29, 2013 2:16

Well.... in addition to the above script which seems to be working fine - at least sorting out the ACPI issue - I have derrived another script in order to force the displays fully off.

I don't want them to be 'forced' off during a user session as the PowerManagement configuration will take presedence there (which works fine in user sessions) so the script detects if a user is logged in or not and if not then turn the screens off when run:

Code: Select all
#!/bin/bash

export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin

sock=`who | grep :0.0`
sock_name=":0.0"


if [[ $sock =~ $sock_name ]]; then
   echo "Output of who command" > /var/log/display_off.log;
   echo "" >> /var/log/display_off.log;
   echo "$sock" >> /var/log/display_off.log;
   echo "" >> /var/log/display_off.log;
   echo "Display variable $sock_name" >> /var/log/display_off.log;
   echo "" >> /var/log/display_off.log;
else
   /usr/bin/xset -display :0 dpms force off;
fi


Then with cron job set as:

Code: Select all
*/10 * * * * display_off.sh


The system now behaves exactly how I want it to!! :-)
kayasaman
Young Hen
 
Posts: 29
Joined: Wed Feb 06, 2013 5:14


Return to Sabayon Linux General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron