WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [solved] How to turn off display?  (Read 10063 times)

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
[solved] How to turn off display?
« on: May 19, 2009, 11:09:39 PM »
When the tc user desktop is loaded the display times out and turns off just as it should. But when I exit to prompt and then exit to login the display timeout no longer turns off the display. The timeout blanks out the screen but the lcd backlight stays on.  I guess xvesa is handling the display turnoff. Is there a command that can be executed to turnoff the display.
« Last Edit: June 01, 2009, 11:26:43 AM by bigpcman »
big pc man

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: How to turn off display?
« Reply #1 on: May 19, 2009, 11:46:38 PM »
The timeout blanks out the screen but the lcd backlight stays on because of the  loaded display times out and turns off..

What does this mean? "because of the  loaded display times out and turns off.."

[^thehatsrule^: fixed up post]
« Last Edit: May 21, 2009, 06:56:52 PM by ^thehatsrule^ »
big pc man

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to turn off display?
« Reply #2 on: May 20, 2009, 08:18:03 AM »
The linux console can't turn your screen off. X can, because it uses DPMS.

Or did you mean that it won't work after restarting X?
The only barriers that can stop you are the ones you create yourself.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: How to turn off display?
« Reply #3 on: May 20, 2009, 09:43:03 AM »
The linux console can't turn your screen off. X can, because it uses DPMS.

Or did you mean that it won't work after restarting X?
OK. Is there another approach. I tried logging in via ssh and then killing Xvesa but that causes the lcd screen to turn back on. There must be a way to reclaim the Xvesa memory when the screen is not needed and have the lcd screen turned off.
big pc man

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to turn off display?
« Reply #4 on: May 20, 2009, 10:09:30 AM »
If X is running, you can control the features with xset (for example command it to turn the screen off immediately), but that only works as long as X runs unfortunately.

Hmm, it appears I had old info, after googling I found the console can turn the screen off too:
http://alexis.m2osw.com/console.html
The only barriers that can stop you are the ones you create yourself.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: How to turn off display?
« Reply #5 on: May 20, 2009, 10:54:10 AM »
If X is running, you can control the features with xset (for example command it to turn the screen off immediately), but that only works as long as X runs unfortunately.

Hmm, it appears I had old info, after googling I found the console can turn the screen off too:
http://alexis.m2osw.com/console.html

Thanks. That's a great link on the subject. What do think causes this error:

tc@box:/dev$ sudo echo -e "\033[14;10]" >/dev/console
-sh: can't create /dev/console: Permission denied
« Last Edit: May 20, 2009, 10:56:04 AM by bigpcman »
big pc man

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: How to turn off display?
« Reply #6 on: May 20, 2009, 11:06:43 AM »
re: link.

manual can be accessed with modified man script (see thread)  "man 4 console_codes" 


edit:   "http://linux.die.net/man/4/console_codes"

Quote
What do think causes this error:

tc@box:/dev$ sudo echo -e "\033[14;10]" >/dev/console
-sh: can't create /dev/console: Permission denied

Probably the same reason /dev/null always gets it....it's root:root
Code: [Select]
crw------- 1 root root 5, 1 May 19 08:47 /dev/console

« Last Edit: May 20, 2009, 11:23:51 AM by jpeters »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to turn off display?
« Reply #7 on: May 20, 2009, 11:55:49 AM »
Run the command from a root console, or use sudo in a slightly dfferent way:

Quote
sudo sh -c 'echo -e "\033[14;10]" >/dev/console'
The only barriers that can stop you are the ones you create yourself.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: How to turn off display?
« Reply #8 on: May 20, 2009, 12:55:43 PM »
Run the command from a root console, or use sudo in a slightly dfferent way:

Quote
sudo sh -c 'echo -e "\033[14;10]" >/dev/console'

It would be nice if it wasn't necessary to "sudo" the shell. Sometimes these "permission" issues
are crazymaking.   

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: How to turn off display?
« Reply #9 on: May 23, 2009, 10:09:32 PM »
Well I finally got back to this problem. The escape sequence command from the console to the console to turn off the display did not work. The command:
Code: [Select]
sudo sh -c 'echo -e "\033[14;10]" >/dev/console'executed without any messages whatsoever. The display did not turn off. I also tried the blank screen command:
Code: [Select]
sudo sh -c 'echo -e "\033[14;1]" >/dev/console'set to 1 minute and it did not work either.

I found this googling:
Quote
January 8, 2009
Turn off LCD Display Backlight from Linux command line
Posted by Paul at 08:32

Use vbetool to turn off the backlight in an LCD display from the Linux command line. This is useful if using Linux on a laptop computer in text mode. The normal screen blanking utilities do not turn off the backlight, leaving a dull glow and using power unnecessarily. The vbetool utility can manipulate the VESA DPMS (Display Power Management Signaling) features of the display. DPMS can turn off the backlight. Use vbetool dpms off to turn it off, vbetool dpms on to turn it on.

Is this tool in one of the extentions?
« Last Edit: May 23, 2009, 10:13:51 PM by bigpcman »
big pc man

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: How to turn off display?
« Reply #10 on: May 23, 2009, 11:18:21 PM »
I don't believe so, but you can get it from here:

http://www.codon.org.uk/~mjg59/vbetool/download/

I think you also need libx86, which is in suspend.tce
« Last Edit: May 23, 2009, 11:50:32 PM by Juanito »

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: How to turn off display?
« Reply #11 on: May 24, 2009, 09:26:41 AM »
I don't believe so, but you can get it from here:

http://www.codon.org.uk/~mjg59/vbetool/download/

I think you also need libx86, which is in suspend.tce

Looks like it needs libpci as well. Is that buried in an existing extension?
big pc man

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: How to turn off display?
« Reply #12 on: May 24, 2009, 09:35:16 AM »
..the pci-utils extension

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: How to turn off display?
« Reply #13 on: May 24, 2009, 10:32:58 AM »
..the pci-utils extension
Thanks. I see the suspend extension loads pci-utils as a dep. So all the libs for the vbetool should be covered by installing suspend. However, suspend is a bit large to keep in ram. Could you make a tcz 2.0 version?
big pc man

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: How to turn off display?
« Reply #14 on: May 25, 2009, 06:22:36 AM »
The suspend extension is made to /usr rather than /usr/local, so I'm not too sure it is a good idea to make a tcz extension out of it.

Maybe it would make sense to extract libx86 from the suspend extension in order to test if vbetool is the answer to your problems? If it is, then I could recompile libx86 to /usr/local as a separate extension.

Edit: I played around with this a little - libx86 doesn't seem to want to compile in tc_2.x. Using libx86 from the suspend extension, vbetool requires libpci.a to build (not installed by pci-utils along with the headers and the .pc file) - after fixing all that, vbetools didn't seem to want to work...
« Last Edit: May 25, 2009, 08:59:00 AM by Juanito »