LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-15-2011, 03:13 AM   #1
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 227

Rep: Reputation: 32
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
 
Old 06-15-2011, 03:22 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Have you tried

Code:
vbetool dpms off
?
 
Old 06-15-2011, 03:42 AM   #3
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 227

Original Poster
Rep: Reputation: 32
Does this command work in console mode?

Quote:
"dpms
vbetool will use the VESA 0x4f10 extensions to alter the power management state of your screen "
Best regards
John Martin

Last edited by webquinty; 06-15-2011 at 07:39 AM.
 
Old 06-16-2011, 07:33 AM   #4
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 227

Original Poster
Rep: Reputation: 32
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 .

Quote:
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.

Quote:
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.

Best regards.

Last edited by webquinty; 06-16-2011 at 07:35 AM.
 
Old 06-16-2011, 10:18 AM   #5
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Well done for finding that.

About Qt - Doesn't Qt use X? You mentioned the framebuffer, but as far as I know only embedded Qt applications write directly to the framebuffer without X (supported by http://doc.qt.nokia.com/4.7-snapshot/qvfb.html). The quote you posted said:

Quote:
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.
Is this maybe why it doesn't work?
 
Old 06-17-2011, 02:33 AM   #6
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 227

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Snark1994 View Post
Well done for finding that.

About Qt - Doesn't Qt use X? You mentioned the framebuffer, but as far as I know only embedded Qt applications write directly to the framebuffer without X (supported by http://doc.qt.nokia.com/4.7-snapshot/qvfb.html). The quote you posted said:

Is this maybe why it doesn't work?
Hello,

Well, I use Qt embedded under framebuffer.
I am not use X system.

Now, I use VESA VGA framebuffer. I am going to change to LX geode framebuffer because there are some function to blank screen.

Best regards.
John Martin
 
Old 06-17-2011, 05:26 AM   #7
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 227

Original Poster
Rep: Reputation: 32
Hello again,

Now, I have made some changes in my kernel. I use LX framebuffer Geode.
I you can check i kernel code, you can see this function:

Quote:
lxfb_ops.c
int lx_blank_display(struct fb_info *info, int blank_mode)
{

.....
.....
/* Power on/off flat panel */

if (par->output & OUTPUT_PANEL) {
fp_pm = readl(par->df_regs + DF_FP_PM);
if (blank_mode == FB_BLANK_POWERDOWN)
fp_pm &= ~DF_FP_PM_P;
else
fp_pm |= DF_FP_PM_P;
writel(fp_pm, par->df_regs + DF_FP_PM);
}
}
Quote:
lxfb_core.c

static struct fb_ops lxfb_ops = {
.owner = THIS_MODULE,
.fb_check_var = lxfb_check_var,
.fb_set_par = lxfb_set_par,
.fb_setcolreg = lxfb_setcolreg,
.fb_blank = lxfb_blank,
/* No HW acceleration for now. */
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
.fb_imageblit = cfb_imageblit,
};

static int lxfb_blank(int blank_mode, struct fb_info *info)
{
return lx_blank_display(info, blank_mode);
}
But I dont known have to use this function to turn off my panel.
Can I use it user space or its necessary to make a new driver to use it?

Best regards.
John Martin
 
Old 06-17-2011, 05:29 AM   #8
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
I'm sorry, I've never really done kernel programming... perhaps one of the more experienced forum members will know.
 
Old 06-17-2011, 06:00 AM   #9
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 227

Original Poster
Rep: Reputation: 32
Hello Snark1994,

Dont worry, As you can see I need more experienced to do it, and this is the best place to learn.

Best regards
John Martin
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sony with Intel 815 won't turn off screen backlight chris1379 Linux - Laptop and Netbook 4 11-13-2010 02:43 AM
xset does not turn off backlight neonsignal Linux - Hardware 4 07-28-2009 10:33 PM
Force Backlight to turn off? mEo Linux - Laptop and Netbook 2 04-01-2008 01:40 PM
Satellite M30-742 Backlight doesn't turn off cyberjun Linux - Laptop and Netbook 1 09-25-2005 10:22 PM
LCD backlight does not turn off on console (acer travelmate 291LMi) zen_guerrilla Linux - Laptop and Netbook 0 07-16-2004 11:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration