Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, Well, I would like to turn off backlight but at this moment. I only "switch off" lcd screen with the follow command: " setterm -blank force " But this ...
  1. #1
    Just Joined!
    Join Date
    May 2007
    Posts
    22

    Turn off backlight console mode..

    Hello,

    Well, I would like to turn off backlight but at this moment. I only "switch off" lcd screen with the follow command:
    " setterm -blank force "

    But this command does not turn off backlight.
    I am looking for in the net any information about this but I dont find any solution.

    My system is Geode LX800, with kenrel 2.6.24.7-rt27, no server X. CPU is a ETX module and it has two signals:
    1 - BLON# : Backlight ON/OFF
    2 - DIGON : Turn ON/OFF display

    My last idea is to try access signals but it is so difficult.

    Best regards.
    John Martin

  2. #2
    Linux Newbie
    Join Date
    Nov 2008
    Location
    Tokyo, Japan
    Posts
    243
    You would like to have a command that can switch the backlight on and off? Well, you need to run this command as the root user:
    Code:
    vbetool dpms off
    vbetool dpms on
    Please read the man page for "vbetool" to learn more about this command.

    You can create a script file as the root user, and set the script flie setgid permission bit on that can execute this command for you:
    Code:
    #-------- create a script called "backlight.sh" --------
    #!/bin/bash
    #backlight.sh
    case "$1" in
      ("on") vbetool dpms on ;;
      ("off") vbetool dpms off ;;
      (*) echo "Please specify \"on\" or \"off\"." >2; exit 1 ;;
    esac
    
    #-------- then set setuid bit --------
    chown root backlight.sh
    chmod 4555 backlight.sh
    If this does not work, it is possible that Linux does not support your CPU architecture.

    I don't know very much about this topic, but if you search www.kernel.org in the Geode drivers section, they only have support for the display framebuffer.

    I cannot find any drivers for the backlight. Please try the command I told you about, see if it works.
    Last edited by ramin.honary; 06-16-2011 at 04:11 AM.

  3. #3
    Just Joined!
    Join Date
    May 2007
    Posts
    22
    Hello,
    It doesnt work with vbetool.
    Finally it works with "setterm -blank force" -> and backlight OFF.
    Before, I change in my kernel APM options: APM_DISPLAY_BLANK .

    Enable console blanking using the APM. Some laptops can use this to turn off the LCD backlight when the screen blanker of the Linux virtual console blanks the screen. Note that this is only used by the virtual console screen blanker, and won't turn off the backlight when using the X Window system. This also doesn't have anything to do with your VESA-compliant power-saving monitor. Further, this option doesn't work for all laptops -- it might not turn off your backlight at all, or it might print a lot of errors to the console, especially if you are using gpm.
    Then, in console mode, this command works fine.

    char ioctlarg = TIOCL_BLANKSCREEN;
    ioctl(0, TIOCLINUX, &ioctlarg);
    Now I have tried the same code in my Qt app, but without succes. its like Qt take framebuffer and avoid to use this command.
    Also ioctl always return -1 in Qt, why?

    Best regards
    John Martin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...