Reply to topic

Creating custom brightness ranges

idoitprone
Registered Member
Posts
15
Karma
0
OS

Creating custom brightness ranges

Sat Nov 02, 2013 7:06 pm
Long time ago, I made this script that changes the brightness lower than what is available thorugh fn keys. However, power management events such as suspend, un plug, etc keep changing the backlight which is kinda annoying. I dont like getting blinded at night because of the sudden backlight change.
Code: Select all
#!/bin/sh
MAX=976
MIN=0
SCREEN_BRIGHTNESS=/sys/class/backlight/intel_backlight/brightness
if test $# -gt 1;
then
echo "Usage: backlight [ARGS]" 1>&2
echo "Arguments:" 1>&2
echo "Number between $MIN and $MAX" 1>&2
echo "Options:" 1>&2
echo "-h, --help Print help message" 1>&2
exit 1
fi
if test $# -eq 0
then
cat "$SCREEN_BRIGHTNESS"
exit 0
fi
if test $1 = '-h' -o '--help' = $1
then
echo "This number changes the screen bightness"
echo "Usage: backlight NUMBER"
echo "Number is between $MIN and $MAX"
fi
if test `whoami` != "root"
then
echo "You have to be root to perform this command" 1>&2
exit 3
fi
if test $1 -le $MIN -o $1 -gt $MAX;
then
echo "Numbers must be between $MIN and $MAX" 1>&2
exit 2
fi
sh -c "echo $1 > "$SCREEN_BRIGHTNESS"



I just want either of the two resolutions

The ability to disable all of these brightness changing scripts that happen on suspend, screensave, unplug, on battery, etc.

Or the ability to integrate my script so I can use my fn keys properly.

Or propose a better solution.

Yes, all LCD screens hurt my eyes. Screens are too bright in almost in all situations

I am on Opensuse 12.3
User avatar bcooksley
Administrator
Posts
19765
Karma
87
OS
To disable brightness changes, open System Settings > Power Management > Energy Saving. For each of the three profiles, ensure "Display Brightness" is unchecked - this should result in no changes being made.


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]
idoitprone
Registered Member
Posts
15
Karma
0
OS

Re: Creating custom brightness ranges

Tue Nov 05, 2013 12:18 am
bcooksley,

That was the first thing I did

It doesnt work.
User avatar bcooksley
Administrator
Posts
19765
Karma
87
OS
I suspect something else other than KDE may be interfering in the screen brightness here then - that should have worked.
To disable KDE Power Management, please open System Settings > Startup & Shutdown > Service Manager. Under "Startup Services" locate "Power Management" and disable it, then stop it. Afterwards, logout and back in again to ensure it is fully disabled. Does the behaviour still occur?


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]
idoitprone
Registered Member
Posts
15
Karma
0
OS

Re: Creating custom brightness ranges

Thu Nov 07, 2013 11:25 am
Yep, the behavior still continues
User avatar bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay. This means you have another process other than KDE which is tampering with the brightness controls i'm afraid.
Just to confirm KDE Power Management is deactivated on your system, the following command should return nothing:
Code: Select all
qdbus org.kde.kded /kded loadedModules | grep -i power


In terms of other processes which could be interfering - I would suggest looking into systemd (which has been known to handle power key events in the past) as well as anything such as acpid, or similarly named processes.


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]
idoitprone
Registered Member
Posts
15
Karma
0
OS
bcooksley wrote:Okay. This means you have another process other than KDE which is tampering with the brightness controls i'm afraid.
Just to confirm KDE Power Management is deactivated on your system, the following command should return nothing:
Code: Select all
qdbus org.kde.kded /kded loadedModules | grep -i power


In terms of other processes which could be interfering - I would suggest looking into systemd (which has been known to handle power key events in the past) as well as anything such as acpid, or similarly named processes.


$qdbus org.kde.kded /kded loadedModules | grep -i power

return nothing

Hmmm, It will take awhile. Power management is complex and confusing to understand
User avatar bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay - I would suggest asking your distribution's support mechanisms, as they will likely have more specialist knowledge as to the mechanisms which could be tampering with the screen brightness at the system level.


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], kde-cfeck, Sogou [Bot]