OESF Portables Forum

Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Angstrom & OpenZaurus => Topic started by: acpkendo on March 14, 2005, 05:36:31 pm

Title: How To Blank Screen
Post by: acpkendo 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 (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?
Title: How To Blank Screen
Post by: grog on September 15, 2005, 12:48:26 pm
I'm wanting to do the same thing. Was a solution to this ever found? thks
Title: How To Blank Screen
Post by: lardman 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
Title: How To Blank Screen
Post by: Hiddenface 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.
Title: How To Blank Screen
Post by: lardman 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