You are not logged in.

#1 2012-02-03 22:31:56

NekySerbia
Member
Registered: 2008-01-12
Posts: 40

[Solved]Brightness changing by itself / Samsung brightness

Hello friends,

I have a rather strange issue with my laptop (Samsung NP300V5Z). GNOME or KDE, no difference at all, so I presume it's kernel/hardware related. My brightness maxes out when:

1. In KDE, when I click on the battery widget in systray (which is a known KDE bug) OR totally random.
2. In GNOME 3, totally random.

Using laptop-mode-tools helps a bit, because I choose it over KDE's powerdevil, so the bug is not so visible. One other thing worth mentioning. My Fn keys for brightness work half-way; they will only decrease/increase brightness by 1 (out of 7 max). Sound, wlan, touchpad Fn keys work without problem.

I will provide whatever info you might need.

Arch x64 latest, KDE 4.8, Gnome 3.2.1 kernel 3.2.2-1

Last edited by NekySerbia (2012-03-06 18:32:22)

Offline

#2 2012-03-02 08:35:14

NekySerbia
Member
Registered: 2008-01-12
Posts: 40

Re: [Solved]Brightness changing by itself / Samsung brightness

Something happened and brightness is doing fine now, changing when I want it (except for a known KDE bug). One more thing still bothers me; my hotkeys for brightness are not working.

I opened xev and pressed the combinations, here is the output:

KeyPress event, serial 40, synthetic NO, window 0x1c00001,
    root 0xac, subw 0x1c00002, time 470989, (55,54), root:(57,436),
    state 0x10, keycode 232 (keysym 0x1008ff03, XF86MonBrightnessDown), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x1c00001,
    root 0xac, subw 0x1c00002, time 470989, (55,54), root:(57,436),
    state 0x10, keycode 232 (keysym 0x1008ff03, XF86MonBrightnessDown), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x1c00001,
    root 0xac, subw 0x1c00002, time 476305, (55,54), root:(57,436),
    state 0x10, keycode 233 (keysym 0x1008ff02, XF86MonBrightnessUp), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x1c00001,
    root 0xac, subw 0x1c00002, time 476305, (55,54), root:(57,436),
    state 0x10, keycode 233 (keysym 0x1008ff02, XF86MonBrightnessUp), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

but nothing happens ;( What can I do to fix this? I can check my brightness level by

cat /sys/class/backlight/acpi_video1/brightness

. There is also 'acpi_video0' but it does nothing.

Offline

#3 2012-03-06 18:31:48

NekySerbia
Member
Registered: 2008-01-12
Posts: 40

Re: [Solved]Brightness changing by itself / Samsung brightness

There is a workaround! All credit to BlaXpirit, he wrote the script.

Download my brightness changer script, allow it to be executed, and put it to /usr/local/bin/:
wget -O brightness http://ideone.com/plain/yPlo5
chmod +x brightness
sudo mv brightness /usr/local/bin

We have to allow the brightness file to be edited, so that sudo isn't needed everywhere.
Also, we want to make the brightness setting restore itself to the previous setting when the system boots (it is not saved by default, unfortunately).

The mentioned brightness script can handle it all (with restore parameter), just add it to autorun.
To do this we will edit /etc/rc.local (sudo nano /etc/rc.local or any editor instead of nano).
Add the following line before the exit 0 line:
/usr/local/bin/brightness restore

It is best to reboot now.

So the brightness script works. You may go to terminal any time and type these:

brightness - get current brightness setting
brightness value - set the brightness to value
brightness inc step, brightness dec step - increase or decrease the brightness by step (if it's not specified, a default value is used from the configuration file, usually 10% of maximal brightness)
Now you might want to map brightness change to your hotkeys.

Set XF86BrightnessUp to brightness inc
Set XF86BrightnessDown to brightness dec
If you want to tweak something, make sure to look at /etc/bx_brightness.conf
You can change the step by which brightness is changed with brightness inc/dec

Offline

#4 2012-08-18 08:41:13

hutxubix
Member
Registered: 2012-08-18
Posts: 1

Re: [Solved]Brightness changing by itself / Samsung brightness

Hello,

Thank you so so much!! This works also in a Samsung np300a5 with ubuntu 12.04

Offline

Board footer

Powered by FluxBB