Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What makes backlight automatically dim?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1655

PostPosted: Thu Mar 19, 2015 7:37 pm    Post subject: What makes backlight automatically dim? Reply with quote

Greetings all my lcd backlight automatically dims to about half brightness if I unplug the power adapter.
I am curious what is doing the dimming?

I have been playing around with laptop-mode-tools on my laptop and get some odd behavior.
When I edit the file
Code:
 /etc/laptop-mode/conf.d/lcd-brightness.conf

And set
Code:
CONTROL_BRIGHTNESS=0

or if I stop laptop-mode-tools
my lcd backlight still automatically dims to about half brightness if I unplug the power adapter.
however
Code:
cat /sys/class/backlight/acpi_video0/brightness

reports "0" which is all the way dim
and
Code:
cat /sys/class/backlight/intel_backlight/brightness

reports
"976" which is all the way bright

Is this some sort of BIOS or hardware level control or is it some other linux process?
I am thinking its hardware or BIOS since the files are not changing.
However should ACPI not update those files with the actual brightness level?

I have a recent Intel chipset:
Code:

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
        Subsystem: Dell Device 0549
        Flags: bus master, fast devsel, latency 0, IRQ 40
        Memory at f6400000 (64-bit, non-prefetchable) [size=4M]
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at f000 [size=64]
        Expansion ROM at <unassigned> [disabled]
        Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [d0] Power Management version 2
        Capabilities: [a4] PCI Advanced Features
        Kernel driver in use: i915


So now I start laptop-mode and enable
Code:
CONTROL_BRIGHTNESS=1

I wrote 3 scripts to see what its doing

BATT_BRIGHTNESS_COMMAND="/usr/local/bin/lcd_on_battery.sh"
LM_AC_BRIGHTNESS_COMMAND="/usr/local/bin/lcd_full.sh"
NOLM_AC_BRIGHTNESS_COMMAND="/usr/local/bin/lcd_full_nolm.sh"
BRIGHTNESS_OUTPUT="/dev/null"

Each script logs when it was called and does a
Code:
echo '976' > /sys/class/backlight/intel_backlight/brightness

to set the lcd backlight to full.
When I plug in the power I see in the log the script LM_AC_BRIGHTNESS_COMMAND="/usr/local/bin/lcd_full.sh"
never gets called. Instead NOLM_AC_BRIGHTNESS_COMMAND="/usr/local/bin/lcd_full_nolm.sh" is called.
Is this the expected behavior of CONTROL_BRIGHTNESS=1 ?

Now when I unplug AC power the lcd backlight dims then
BATT_BRIGHTNESS_COMMAND="/usr/local/bin/lcd_on_battery.sh" does get called and it brightens again.

Its not really a problem since my scripts solve the problem, however I am curious
why does the kernel (3.6.11) not know the correct status of the hardware?
Thoughts?
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3131

PostPosted: Thu Mar 19, 2015 7:53 pm    Post subject: Reply with quote

I'd start with your DE's power saving features :roll:
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1655

PostPosted: Thu Mar 19, 2015 9:06 pm    Post subject: Reply with quote

Thanks though I really dont use a DE.
I have a very minimal openbox setup with tint2.
Sometimes I use JWM as well.

I did boot into the BIOS and found a setting for lcd brightness that was set to half on battery.
The question still stands:
Why are BIOS changes to a hardware state like brightness are not picked up by ACPI?
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum