Author Topic: How To Blank Screen  (Read 3267 times)

acpkendo

  • Full Member
  • ***
  • Posts: 169
    • View Profile
    • http://
How To Blank Screen
« on: March 14, 2005, 05:36:31 pm »
Is there any way to blank the screen while listening to xmms-embedded?  I saw the following page on the OESF wiki:

https://www.oesf.org/index.php?title=Turning_off_the_screen

Which describes how to do it with a qcop command (how I'd ideally like to do it):

Code: [Select]
qcop QPE/System 'setBlankLCD(int)' 1
But this produces no result on my install of OZ 3.5.2.  I checked to ensure that I DO have opie-qcop installed. . . are there any other packages I'd need?

grog

  • Hero Member
  • *****
  • Posts: 692
    • View Profile
    • http://
How To Blank Screen
« Reply #1 on: September 15, 2005, 12:48:26 pm »
I'm wanting to do the same thing. Was a solution to this ever found? thks
GROG!

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
How To Blank Screen
« Reply #2 on: September 15, 2005, 04:12:25 pm »
It must be possible as there's a setting to blank the screen rather than suspend in the Light & Power settings - I'd look in the code for the applet and see what it calls.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

Hiddenface

  • Newbie
  • *
  • Posts: 4
    • View Profile
How To Blank Screen
« Reply #3 on: November 17, 2005, 07:34:17 am »
Quote
It must be possible as there's a setting to blank the screen rather than suspend in the Light & Power settings - I'd look in the code for the applet and see what it calls.

Si
[div align=\"right\"][a href=\"index.php?act=findpost&pid=95944\"][{POST_SNAPBACK}][/a][/div]
This has not worked for me for a while, it just turns the backlight off.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
How To Blank Screen
« Reply #4 on: November 17, 2005, 08:32:25 am »
What device are you running, and which kernel?

With the 2.6.x kernels you should be able to do:

echo 1 > /sys/class/backlight/*/power

To switch the power off (I think that's the right direction).


This is the code from ODevice in libopie2 which performs the switching off:

Code: [Select]
bool Zaurus::setDisplayStatus( bool on )
{
    bool res = false;
    if ( m_embedix )
    {
        int fd = ::open( SHARP_FL_IOCTL_DEVICE, O_WRONLY|O_NONBLOCK );
        if ( fd )
        {
            int ioctlnum = on ? SHARP_FL_IOCTL_ON : SHARP_FL_IOCTL_OFF;
            res = ( ::ioctl ( fd, ioctlnum, 0 ) == 0 );
            ::close ( fd );
        }
    }
    else
    {
        int fd = ::open( m_backlightdev + "power", O_WRONLY|O_NONBLOCK );
        if ( fd )
        {
            char buf[10];
            buf[0] = on ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN;
            buf[1] = '\0';
            res = ( ::write( fd, &buf[0], 2 ) == 0 );
            ::close( fd );
        }
    }
    return res;
}



Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva