Backlight / Brightness for R580

Discussions about Linux installation and configuration on Samsung laptops
mdhooge
Newbie
Newbie
Posts: 7
Joined: 02/06/2010, 22:18

Backlight / Brightness for R580

Post by mdhooge » 19/06/2010, 18:12

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

User avatar
voria
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

Re: Backlight / Brightness for R580

Post by voria » 30/06/2010, 14:48

I confirm that this fixes the backlight control on my NC10 with Kubuntu.
Thanks for pointing it out! ;)
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

zinzolin
Newbie
Newbie
Posts: 8
Joined: 14/07/2010, 12:24
Location: Berlin

Re: Backlight / Brightness for R580

Post by zinzolin » 16/07/2010, 13:01

@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

mdhooge
Newbie
Newbie
Posts: 7
Joined: 02/06/2010, 22:18

Re: Backlight / Brightness for R580

Post by mdhooge » 16/07/2010, 20:42

Google found the following tutorial for Gnome:
http://ubuntuforums.org/showthread.php?t=308568

HTH

zinzolin
Newbie
Newbie
Posts: 8
Joined: 14/07/2010, 12:24
Location: Berlin

Re: Backlight / Brightness for R580

Post by zinzolin » 20/07/2010, 23:15

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

mdhooge
Newbie
Newbie
Posts: 7
Joined: 02/06/2010, 22:18

Re: Backlight / Brightness for R580

Post by mdhooge » 22/07/2010, 9:35

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.

zinzolin
Newbie
Newbie
Posts: 8
Joined: 14/07/2010, 12:24
Location: Berlin

Re: Backlight / Brightness for R580

Post by zinzolin » 22/07/2010, 12:59

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!

mdhooge
Newbie
Newbie
Posts: 7
Joined: 02/06/2010, 22:18

Re: Backlight / Brightness for R580

Post by mdhooge » 22/07/2010, 21:44

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

Dibo
Newbie
Newbie
Posts: 4
Joined: 11/10/2010, 18:59

Re: Backlight / Brightness for R580

Post by Dibo » 11/10/2010, 19:20

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.

Dibo
Newbie
Newbie
Posts: 4
Joined: 11/10/2010, 18:59

Re: Backlight / Brightness for R580

Post by Dibo » 01/11/2010, 0:42

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)

zinzolin
Newbie
Newbie
Posts: 8
Joined: 14/07/2010, 12:24
Location: Berlin

Re: Backlight / Brightness for R580

Post by zinzolin » 08/11/2010, 14:53

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 !

Dibo
Newbie
Newbie
Posts: 4
Joined: 11/10/2010, 18:59

Re: Backlight / Brightness for R580

Post by Dibo » 08/11/2010, 16:29

Yes, right place but "magic" line I mean:

Code: Select all

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

zinzolin
Newbie
Newbie
Posts: 8
Joined: 14/07/2010, 12:24
Location: Berlin

Re: Backlight / Brightness for R580

Post by zinzolin » 08/11/2010, 18:36

Great! It worked for me too!

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

Have a great day!

zinzolin
Newbie
Newbie
Posts: 8
Joined: 14/07/2010, 12:24
Location: Berlin

Re: Backlight / Brightness for R580

Post by zinzolin » 25/06/2012, 20:22

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!

sergwy
Newbie
Newbie
Posts: 10
Joined: 24/04/2011, 18:55

Re: Backlight / Brightness for R580

Post by sergwy » 28/06/2012, 8:07

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests