Page 1 of 2

Backlight / Brightness for R580

Posted: 19 Jun 2010, 18:12
by mdhooge
Here are my experiments with using the back-light of my R580.
I first reported them in the thread http://www.voria.org/forum/viewtopic.php?p=3686#p3686 but I think it is now better to create a dedicated thread :-)

To summarize, I've installed Kubuntu 64bits, enabled the nvidia proprietary driver and installed the packages provided by "Linux On My Samsung". To be able to control the BL with the Fn-Up & Fn-Down keys, I found the following workaround:
- install the samsung-backlight package (once)
- rmmod the module when logged-in.

As suggested by voRia, I have created the following script in ~/.kde/Autostart/ to automatically apply the rmmod:

Code: Select all

#!/bin/sh
sudo -n /sbin/rmmod samsung_backlight
And added the following line at the end of /etc/sudoers:

Code: Select all

michel	ALL=NOPASSWD:/sbin/rmmod samsung_backlight
To avoid touching the sudoers, I tried to add the rmmod commands to all files in /etc/kde4/kdm/. But it never worked: the module was removed but the Fn keys didn't work. Very strange.

I'll post follow-ups to this when I have time to experiment (after a while, I'm bored to reboot all the time)

HTH
Michel

Re: Backlight / Brightness for R580

Posted: 30 Jun 2010, 14:48
by voria
I confirm that this fixes the backlight control on my NC10 with Kubuntu.
Thanks for pointing it out! ;)

Re: Backlight / Brightness for R580

Posted: 16 Jul 2010, 13:01
by zinzolin
@mdhooge:
I'd like to try the script you proposes but as I am using the gnome desktop (Ubuntu 10.04), there is no such folder as ~/.kde/Autostart/ or someting similar in the ~/.gnome2/ folder. Do you have an idea of where I should place that script ?

Thanks

Re: Backlight / Brightness for R580

Posted: 16 Jul 2010, 20:42
by mdhooge
Google found the following tutorial for Gnome:
http://ubuntuforums.org/showthread.php?t=308568

HTH

Re: Backlight / Brightness for R580

Posted: 20 Jul 2010, 23:15
by zinzolin
Hello !

I finally found some time to apply your advice. I made the script and changed the sudoers file as you indicated (except that I replace michel with my user name). Running the script, i.e. double-clicking it, did have an effect. When I pressed the Fn+Brightness hotkeys (only once), the notification showed me the "brightness at its minimum" symbol. This is wierd for three reasons:
First, the brightness was at its maximum before running the script.
Second, I did not see the brightness changing of the slightest bit.
Third, after pressing once the hotkey, it did not work anymore (meaning, no more notification of something happening when pressing the keys).

And when I make the script run on startup, there is no more notification at all, not even the first time the hotkeys are pressed.

Any idea of why the script is not working ?

Thanks for the help,

Nicolas

Re: Backlight / Brightness for R580

Posted: 22 Jul 2010, 09:35
by mdhooge
Can you check first that the "low-level" interface is OK?

Here are commands that work in my case:

Code: Select all

sudo -i
cd /proc/acpi/video/NVID/LCD
cat brightness
#levels:  7 13 20 30 45 60 80 100
# current: 20
echo 45 > brightness
If this doesn't work, your problem is before the point I described.

Re: Backlight / Brightness for R580

Posted: 22 Jul 2010, 12:59
by zinzolin
I tried your commands and, indeed, it does not work.

cat brightness gave me the following output:
levels: 7 13 20 30 45 60 80 100
current: 7

And echo 45 > brightness changed well the current brightness to level 45 but without any viewable effect.

You said that the "low-level" interface does not work then. But what does it mean? And how could I fix it?

Thanks a lot!

Re: Backlight / Brightness for R580

Posted: 22 Jul 2010, 21:44
by mdhooge
Did you install all the packages as detailed there:
http://www.voria.org/forum/viewtopic.php?f=3&t=296

On my R580, I have:

Code: Select all

% aptitude search '~i~Ovoria'
i A easy-slow-down-manager
i A libgudev-1.0-0
i A libudev0
i A linux-headers-2.6.32-22
i A linux-headers-2.6.32-22-generic
i A linux-headers-2.6.32-23
i A linux-headers-2.6.32-23-generic
i A linux-image-2.6.32-22-generic
i A linux-image-2.6.32-23-generic
i A linux-libc-dev
i   phc-intel
i   samsung-backlight
i   samsung-tools
i   samsung-wireless
i A samsung-wireless-2.6.32-23
i A udev
Normally you only have to install those without the 'A'.

BTW, thanks to you I learned how to retrieve the packages installed from a given repository ;-)
I also found the answer to a security issue I wondered about for years!
http://algebraicthunk.net/~dburrows/pro ... 02s06.html

So double thanks :-D

Re: Backlight / Brightness for R580

Posted: 11 Oct 2010, 19:20
by Dibo
Hi,

I have similar problem with brightness on my R580. Everythings work but ubuntu can't remember last brightness wich I set. When I login in, ubuntu always set minimal brightness. I have ubuntu 10.10 64bit with GNOME (I had this same problem on 10.4)

This are my modules:

Code: Select all

i A easy-slow-down-manager          - 'easy-slow-down-manager' driver in DKMS fo
i A linux-headers-2.6.35-22         - Header files related to Linux kernel versi
i A linux-headers-2.6.35-22-generic - Linux kernel headers for version 2.6.35 on
i   linux-image-2.6.35-22-generic   - Linux kernel image for version 2.6.35 on x
i   linux-libc-dev                  - Linux Kernel Headers for development      
i   nvidia-bl-dkms                  - Supplementary Nvidia laptop display backli
i   samsung-tools                   - Tools for Samsung netbooks. 
Regards.

Re: Backlight / Brightness for R580

Posted: 01 Nov 2010, 00:42
by Dibo
Problem solved. In file "/etc/X11/xorg.conf" I always add "magic" line in "device" section, but it should be in "screen" section. On login it set backlight to 100% but it's better than 20% (before)

Re: Backlight / Brightness for R580

Posted: 08 Nov 2010, 14:53
by zinzolin
Dibo wrote:Problem solved. In file "/etc/X11/xorg.conf" I always add "magic" line in "device" section, but it should be in "screen" section. On login it set backlight to 100% but it's better than 20% (before)
Hi ! I am not sure to understand how to modify my xorg.conf file. It is currently looling like this:

Code: Select all

Section "Screen"
	Identifier	"Default Screen"
	DefaultDepth	24
EndSection

Section "Module"
	Load	"glx"
EndSection

Section "Device"
	Identifier	"Default Device"
	Driver	"nvidia"
	Option	"NoLogo"	"True"
EndSection
Should I just make it so ?

Code: Select all

Section "Screen"
	Identifier	"Default Screen"
	DefaultDepth	24
	"magic"
EndSection

Section "Module"
	Load	"glx"
EndSection

Section "Device"
	Identifier	"Default Device"
	Driver	"nvidia"
	Option	"NoLogo"	"True"
EndSection
Thanks for the help !

Re: Backlight / Brightness for R580

Posted: 08 Nov 2010, 16:29
by Dibo
Yes, right place but "magic" line I mean:

Code: Select all

Section "Screen"
   Identifier   "Default Screen"
   DefaultDepth   24
   Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection

Re: Backlight / Brightness for R580

Posted: 08 Nov 2010, 18:36
by zinzolin
Great! It worked for me too!

Awesome! It lasted so long I even stopped hoping. What a relief.

Have a great day!

Re: Backlight / Brightness for R580

Posted: 25 Jun 2012, 20:22
by zinzolin
Hello,

I upgraded to Ubuntu 12.04 and I tried to apply the solution above. It worked perfectly for me with Ubuntu 11.10 -thanks again!- but now it just prevents the computer from booting correctly. I get a black screen after the ubuntu logo, no logon screen.

My /etc/X11/xorg.conf is different though: much smaller.

Code: Select all

Section "Device"
	Identifier	"Default Device"
	Option	"NoLogo"	"True"
EndSection
Adding
Option "RegistryDwords" "EnableBrightnessControl=1"
below the line Option is what I did... and what did not work.

Any suggestions? Thanks in advance!

Re: Backlight / Brightness for R580

Posted: 28 Jun 2012, 08:07
by sergwy
Brightness on an nvidia video card on Samsung can work correctly only if nvidia-bl-dkms driver is installed. The driver is not available in Voria's repos for Ubuntu 12.04 due to incompatibility with the latest kernels. I tried to install it from other repos the last version of the driver ant it works pretty well.