You are not logged in.

#1 2009-08-01 06:04:30

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Screen keeps dimming on Battery. Why?

Helo,

I have a problem with my screen dimming when I switch to battery. The screen is bright then I unplug it and it go's dim like %50. The strange thing is...   

cat /proc/acpi/video/DGFX/LCD/brightness     

reports.....

levels:  0 10 20 30 40 50 60 70 80 90 100
current: 100


While on AC and even after I unplug and the screen dim to about half it's original brightness.

I have DPMS "false" in xorg.conf. I also stopped laptop-mode. I have no idea what could be doing this.

Do you have any ideas where I should look ? I am starting to think it is a BIOS/ACPI F*** Up do to the fact that Linux knows nothing about the dimming of the backlight. Linux still thinks that the screen is at 100.....

All thoughts would be helpful wink

Last edited by hunterthomson (2009-08-01 06:13:34)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#2 2009-08-01 06:26:58

ndowens04
Member
Registered: 2009-05-07
Posts: 25

Re: Screen keeps dimming on Battery. Why?

It could be ur window/desktop manager, check your power manager settings in it


ArchLinux + ZFS

Offline

#3 2009-08-01 06:54:37

M177ER
Member
Registered: 2008-06-15
Posts: 148

Re: Screen keeps dimming on Battery. Why?

check your BIOS setting. I know with my laptop i can change the setting when on battery there.

Offline

#4 2009-08-01 07:12:00

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Screen keeps dimming on Battery. Why?

Hum ya I checked all the BIOS settings. Nothing about what to do wile on battery. I did turn off the Auto Light Sensor to see if that was messing it up but no luck. I also just flashed my BIOS with the new one and still no change.

I use OpenBox. I did looked and didn't see anything. Also, this problem still happens even when I am just in the terminal.

It is looking more and more like it is just some BIOS crap that Linux has no control over.... I'll play with the BIOS more. I'll reset it all and then check agin. Maybe it is a Bug in some BIOS setting that has nothing to do with the backlight.

I am also going to boot up into OpenSolarus and see what happens.


Thanks for the thoughts big_smile
You know how this stuff go's sometimes I'll just overlooks things that others may not.

Last edited by hunterthomson (2009-08-01 07:16:06)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#5 2009-08-01 07:26:04

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Screen keeps dimming on Battery. Why?

Hum, OK I am in OpenSolarus now and when I unpluged  the AC the screen dimed but then I opened up the PowerManagement thing and it was set for the backlight to dim on Battery. So, I turned it off and vola the backlight got to full brightness again.

So, this problem can be fixed hmm

Maybe that setting will make a deferents in Linux too ? Just a hope tongue
I guess I could try to install some more powermanagement stuff in Linux and that should fix the problem just like it did in OpenSolarus.

I love multi boot smile So good for trouble shooting. Right now I have all these OS's installed.

OpenBSD
OpenSolarus
ArchLinux

Awe the Unix love roll


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#6 2009-08-01 07:34:44

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Screen keeps dimming on Battery. Why?

OK so the change in OS didn't affect the other OS... Du tongue

So, what powermangment application could I install that has the "Dim backlight on Battery" setting like the Gnome PowerManagment application has ?


Hum... Looking at    acpid    right now. Looks like the one. I'll let you know.

--------------------------

Well acpid doesn't look like what I need. Or is it?

Last edited by hunterthomson (2009-08-01 07:54:23)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#7 2009-08-01 08:14:03

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Screen keeps dimming on Battery. Why?

I installed gnome-power-manager
I did set it NOT to dim on battery but it didn't work. I guess some daemon it needs to run right is not installed or running on my OpenBox system. However I could turn the back-light back up with the tool.

I am now looking for a backlight management tool sents the /proc/acpi/video/G**/lcd/backlight doesn't change I can't set the backlight from the shell.

Arg, lots of MacCrap tools and nVidia tools no backlight setting tools for me sad

Last edited by hunterthomson (2009-08-01 08:18:14)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#8 2009-08-01 08:25:20

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Screen keeps dimming on Battery. Why?

Could it be hal that is messing it up ?


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#9 2009-08-01 08:40:36

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Screen keeps dimming on Battery. Why?

Owe, OK

So, even though the brightness is still at 100 in /proc/blayblal   I can still set the brightness back up to full with the command

sudo echo 100 > /proc/acpi/video/DGFX/LCD/brightness

First I had to change the permitions of the file for this to work.

sudo chmod 664 /proc/acpi/video/DGFX/LCD/brightness
sudo chown root:wheel /proc/acpi/video/DGFX/LCD/brightness

So, good enough. I am happy enough now that I can at lest set the brightness back up. Before I was stuck on the dim back-light and that sucked. If I am on battery I am probably in the Sun so I need FULL backlight.

Last edited by hunterthomson (2009-08-01 08:43:11)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#10 2009-08-01 18:32:31

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: Screen keeps dimming on Battery. Why?

This same problem happens to me with xfce4.6 and a HP Pavilion dv9920us using NVIDIA GeForce 7150m / nForce 630m. Even after I log out and shutdown a session that I had used suspend/hibernate in, and then boot back up latter, it will still be dimmed..... in fact it wouldn't go back to full brightness until after I booted into my Vista partition.

I'll try this command next time to see if it works. (But I usually don't use suspend/hibernate anyway)

Last edited by methuselah (2009-08-01 18:33:57)

Offline

#11 2009-08-01 19:43:56

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Screen keeps dimming on Battery. Why?

hunterthomson wrote:

Could it be hal that is messing it up ?

You haven't mentioned the make/model of the laptop so it's difficult to offer any specific advice.  Some products have known issues.  It could be a DSDT issue too.  If I were you I'd check whether a BIOS update is available at the manufacturer's site. 

I have an Acer Aspire One and just upgraded the BIOS yesterday.  Now my /proc info correctly shows the display brightness and lid state.


thayer williams ~ cinderwick.ca

Offline

#12 2009-08-02 02:07:57

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Screen keeps dimming on Battery. Why?

My laptop is HP elitebook 8530w w/ ATI Mobility FireGL v5700 aka HD3650 with Catalyst 9.7.

Ya my last laptop Lenovo IdeaPad Y510 we over at the Ubuntuforums fixed up the DSDT and solved quite a few problems. However, this seems more like a default feature as opposed to a problem. Well maybe not changing the value in the /proc/bal/bal/brightness file is a bug. All in all this laptop is vary Linux compatible (not the ATI card though). HP even supports SUSE Linux on this laptop. Owe ya I did upgrade to the new BIOS yesterday no change.

I booted with hal !banged out of rc.conf and still dimmed in the terminal when switching to battery. I also had Laptop-mode off too. I guess it is a default action built into the BIOS. If I used Gnome all would be fine as it is with OpenSolarus w/ Gnome.

Or if I could find a dependency free application that lived in the system tray to change the brightness. There is none that I can find. However, I am learning Python and this sounds like a vary good project to take on. I think I will write this little application in Python/GTK.

Agin thanks for all your thoughts big_smile If anyone thinks of any other solution or posable problem let me know.
------------------------------------
methuselah: I saw a few applications to adjust the brightness with nVidea. You should check them out. They mite fix your problem.

Also, the permissions for /proc/acpi/bla/bal/brightness get changed back on reboot so the best way is to just enter root and then runt then echo the highest brightness value to the file.

Last edited by hunterthomson (2009-08-02 02:17:59)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#13 2009-08-02 13:34:05

Ronin-Sage
Member
Registered: 2008-10-24
Posts: 153
Website

Re: Screen keeps dimming on Battery. Why?

Not sure if it's been mentioned already or is even applicable, but trying using a tweaked HAL policy file, I guess(default "templates" are in /usr/share/hal/fdi/policy/10osvender".

Offline

#14 2009-08-02 22:30:03

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Screen keeps dimming on Battery. Why?

Ronin-Sage wrote:

Not sure if it's been mentioned already or is even applicable, but trying using a tweaked HAL policy file, I guess(default "templates" are in /usr/share/hal/fdi/policy/10osvender".

Awe yes that is not a bad idea. Hal is not causing this but hal could solve this.


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#15 2009-08-03 15:15:51

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: Screen keeps dimming on Battery. Why?

Using this command for my HP I would get:

$  cat /proc/acpi/video/UVGA/LCD/brightness
levels:  20 24 28 32 37 43 50 59 69 81 95
current: 20

Then adding the "brightness" panel-plugin for xfce4-panel I could get my brightness back up to 95% (which I guess is the maximum setting for me?)

$  cat /proc/acpi/video/UVGA/LCD/brightness
levels:  20 24 28 32 37 43 50 59 69 81 95
current: 95

Last edited by methuselah (2009-08-19 22:27:32)

Offline

#16 2009-08-24 04:05:21

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: Screen keeps dimming on Battery. Why?

Okay, new problem.

Now my brightness seems to not be supported anymore:

$  cat /proc/acpi/video/UVGA/LCD/brightness
<not supported>

I have no idea why this is like this now. The xfce4 brightness plugin won't work anymore, and I'm not sure what level my screen is at..... but it doesn't seem to be at 95% anymore.

Last edited by methuselah (2009-08-24 04:07:22)

Offline

#17 2009-08-24 08:42:05

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: Screen keeps dimming on Battery. Why?

Here's an idea.

Instead of using HAL to change the brightness, just install acpid, run the daemon on boot, and then change /etc/acpi/handler.sh in the appropriate place and add in the command you use at the shell in.  Then when the AC adaptor is unplugged, acpid will pick it up and run that command, thus restoring brightness.  There might be a slight flicker, but I see no reason why it won't work.

HTH

Offline

#18 2009-08-24 20:01:11

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: Screen keeps dimming on Battery. Why?

methuselah wrote:

Okay, new problem.

Now my brightness seems to not be supported anymore:

$  cat /proc/acpi/video/UVGA/LCD/brightness
<not supported>

I have no idea why this is like this now. The xfce4 brightness plugin won't work anymore, and I'm not sure what level my screen is at..... but it doesn't seem to be at 95% anymore.

After reinstalling a few packages, and trying hunterthomson's tip (with no immediate success)..... I logged out of my Arch partition and back into my Vista partition. Then I reset my Vista power management's screen dimming power plan to default (even though I don't remember changing them), then I restarted my Arch partition and my xfce4-brightness-plugin worked again and so did this command:

$  cat /proc/acpi/video/UVGA/LCD/brightness
levels:  20 24 28 32 37 43 50 59 69 81 95
current: 95

I think it's weird how my dual boot of Vista affects my Linux install..... I've had a similar problem with the time..... even though I had my time configured properly in the /etc/rc.conf file, for some reason my time got screwed up by an hour in my Windows partition and it made my Linux time off by an hour..... and I couldn't fix it until I corrected my Vista time.

Strange. Does this have to do with a shared bios?

Last edited by methuselah (2009-08-24 20:03:55)

Offline

#19 2009-08-24 22:06:43

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Screen keeps dimming on Battery. Why?

SiC wrote:

Here's an idea.

Instead of using HAL to change the brightness, just install acpid, run the daemon on boot, and then change /etc/acpi/handler.sh in the appropriate place and add in the command you use at the shell in.  Then when the AC adaptor is unplugged, acpid will pick it up and run that command, thus restoring brightness.  There might be a slight flicker, but I see no reason why it won't work.

HTH

Nice, good idea, that will work well.


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#20 2009-08-24 22:26:12

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Screen keeps dimming on Battery. Why?

methuselah wrote:
methuselah wrote:

Okay, new problem.

Now my brightness seems to not be supported anymore:

$  cat /proc/acpi/video/UVGA/LCD/brightness
<not supported>

I have no idea why this is like this now. The xfce4 brightness plugin won't work anymore, and I'm not sure what level my screen is at..... but it doesn't seem to be at 95% anymore.

After reinstalling a few packages, and trying hunterthomson's tip (with no immediate success)..... I logged out of my Arch partition and back into my Vista partition. Then I reset my Vista power management's screen dimming power plan to default (even though I don't remember changing them), then I restarted my Arch partition and my xfce4-brightness-plugin worked again and so did this command:

$  cat /proc/acpi/video/UVGA/LCD/brightness
levels:  20 24 28 32 37 43 50 59 69 81 95
current: 95

I think it's weird how my dual boot of Vista affects my Linux install..... I've had a similar problem with the time..... even though I had my time configured properly in the /etc/rc.conf file, for some reason my time got screwed up by an hour in my Windows partition and it made my Linux time off by an hour..... and I couldn't fix it until I corrected my Vista time.

Strange. Does this have to do with a shared bios?

95 doesn't mean 95% it is just an arbitrary number. On my Lenovo Ideapad the settings were 1,2,3,4,5,6,7,8

I would do that the guy above said to do with acpid. That is the best option as long as  hal  runs the script as root and I think it should.

If so the command you would want it to run would be....

echo 95 > /proc/acpi/video/UVGA/LCD/brightness

The time is effected because all the OS's you run on your computer use the same clock... The one in your computer.

Anything ACPI related is a direct, deliberate, and effective attempt by Microsoft to pervert the ACPI standards so ACPI only works well with Windows. If you recompile your BIOS files like the DSDT you will find that it was compiled with the Microsoft Compiler. This compiler is proprietary and non-standards compliant. Sents it is proprietary the only ones that know how the code will be  messed up by useing the complier is Microsoft. So, the only OS that ACPI will work well on is Windows.

Linux developers have to just read reported messed up BIOS code and add endless patches to the Linux ACPI Kernel module to compensate.


Microsoft is the Poster Boy company of evil monopoly's that are only the biggest company because they kill anything that stands in there way. This results in the worst OS and other software that is in use today and has the highest price. Instead of making better software to stay on top they do their best to knock down anything that is better... Or Steal the Software.... Come to think about it why is MS so anti Pirated software??? That is what Microsoft is built on.

Last edited by hunterthomson (2009-08-24 22:36:23)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#21 2009-08-24 23:16:05

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: Screen keeps dimming on Battery. Why?

hunterthomson wrote:

The time is effected because all the OS's you run on your computer use the same clock... The one in your computer.

Well, I had only said that because I had a perfectly configured rc.conf with my local time, and my Arch had the correct time. Then one day when I did an upgrade to my Vista partition it messed my time up by an hour (which I did not notice)..... and this carried over to my linux partition. I noticed it on Arch and didn't know that it had been caused by a windows upgrade, so I spent a few minutes trying different settings (both UTC, localtime) in my /etc/rc.conf with no change in my time. Then I checked out my Vista partition and sure enough it was also off by an hour. When I adjusted the Vista clock, my Linux clock was correct again.


As for me using a dual boot of microsoft, well those days will soon be coming to an end. I pretty much never use that partition and have only kept it around for a few reasons. (I also kept it installed as a backup OS in case I ruined something in Linux and need to get online to ask a question..... which I guess I could always use a Live CD to do the same thing)


Now for the handler.sh:

#!/bin/sh
# Default acpi script that takes an entry for all actions

# NOTE: This is a 2.6-centric script.  If you use 2.4.x, you'll have to
#       modify it to not use /sys

minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"

set $*

case "$1" in
    button/power)
        #echo "PowerButton pressed!">/dev/tty5
        case "$2" in
            PWRF)   logger "PowerButton pressed: $2" ;;
            *)      logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/sleep)
        case "$2" in
            SLPB)   echo -n mem >/sys/power/state ;;
            *)      logger "ACPI action undefined: $2" ;;
        esac
        ;;
    ac_adapter)
        case "$2" in
            AC)
                case "$4" in
                    00000000)
                        echo -n $minspeed >$setspeed
                        #/etc/laptop-mode/laptop-mode start
                    ;;
                    00000001)
                        echo -n $maxspeed >$setspeed
                        #/etc/laptop-mode/laptop-mode stop
                    ;;
                esac
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;
    battery)
        case "$2" in
            BAT0)
                case "$4" in
                    00000000)   #echo "offline" >/dev/tty5
                    ;;
                    00000001)   #echo "online"  >/dev/tty5
                    ;;
                esac
                ;;
            CPU0)    
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/lid)
        #echo "LID switched!">/dev/tty5
        ;;
    *)
        logger "ACPI group/action undefined: $1 / $2"
        ;;
esac

I know the command would be "echo 95 > /proc/acpi/video/UVGA/LCD/brightness", but I'm not sure where I would put it.

Would I place it below like this:

ac_adapter)
        case "$2" in
            AC)
                case "$4" in
                    00000000)
                        echo -n $minspeed >$setspeed
                        echo 20 > /proc/acpi/video/UVGA/LCD/brightness
                        #/etc/laptop-mode/laptop-mode start
                    ;;
                    00000001)
                        echo -n $maxspeed >$setspeed
                        echo 95 > /proc/acpi/video/UVGA/LCD/brightness
                        #/etc/laptop-mode/laptop-mode stop
                    ;;
                esac
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;

Last edited by methuselah (2009-08-24 23:17:35)

Offline

#22 2009-08-25 01:21:40

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Screen keeps dimming on Battery. Why?

Ya, that looks like it will set the backlight to low when switching to battery and high when switching to AC. I would guess that the code that it is set up to run on battery would be to start laptop-mode-tools.

Also, make sure you want acpid to do all that other stuff. I know I would not want acpid starting and stopping laptop-mode-tools on my laptop. I have the laptop-mode config file set up to handle that. I also would not want it to set my CPU clock speed.

Maybe this would be better

ac_adapter)
        case "$2" in
            AC)
                case "$4" in
                    00000000)
                        #echo -n $minspeed >$setspeed
                        echo 20 > /proc/acpi/video/UVGA/LCD/brightness
                        #/etc/laptop-mode/laptop-mode start
                    ;;
                    00000001)
                        #echo -n $maxspeed >$setspeed
                        echo 95 > /proc/acpi/video/UVGA/LCD/brightness
                        #/etc/laptop-mode/laptop-mode stop
                    ;;
                esac
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;

If the settings are right in rc.conf then you should set the time in the CMOS setup. You know where you set the boot order. Setting it in windows works too that is setting the system clock too. I would guess that there is a command to set the system time in linux but I don't know it off hand.

Last edited by hunterthomson (2009-08-25 01:36:41)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#23 2009-08-25 02:14:07

methuselah
Member
Registered: 2007-10-02
Posts: 570

Re: Screen keeps dimming on Battery. Why?

hunterthomson wrote:

Ya, that looks like it will set the backlight to low when switching to battery and high when switching to AC. I would guess that the code that it is set up to run on battery would be to start laptop-mode-tools.

Also, make sure you want acpid to do all that other stuff. I know I would not want acpid starting and stopping laptop-mode-tools on my laptop. I have the laptop-mode config file set up to handle that. I also would not want it to set my CPU clock speed.

Maybe this would be better

ac_adapter)
        case "$2" in
            AC)
                case "$4" in
                    00000000)
                        #echo -n $minspeed >$setspeed
                        echo 20 > /proc/acpi/video/UVGA/LCD/brightness
                        #/etc/laptop-mode/laptop-mode start
                    ;;
                    00000001)
                        #echo -n $maxspeed >$setspeed
                        echo 95 > /proc/acpi/video/UVGA/LCD/brightness
                        #/etc/laptop-mode/laptop-mode stop
                    ;;
                esac
                ;;
            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;

If the settings are right in rc.conf then you should set the time in the CMOS setup. You know where you set the boot order. Setting it in windows works too that is setting the system clock too. I would guess that there is a command to set the system time in linux but I don't know it off hand.

Cool, thanks for the help. I'll give this a try.

Offline

Board footer

Powered by FluxBB