samsung-backlight - wider brightness range (fyi)

Discussions about Linux installation and configuration on Samsung laptops
mikebl71
Newbie
Newbie
Posts: 22
Joined: 03/10/2010, 20:17

samsung-backlight - wider brightness range (fyi)

Postby mikebl71 » 10/02/2011, 12:03

Hi

I've got Samsung N140 and I am using the latest Kubuntu 10.10 (with all the voRia's extra packages).

One thing that annoyed me about the brightness control (after I made it work that is, which is another story ;) ), is that I could not make the screen dark enough. If I pushed the brightness all the way down with either the slider or the hot keys, the screen was still way too bright for my liking.
However, if I called "setpci -s 00:02.0 f4.b=1" (where the last number is the brightness level from 0 to FF), then I could get the brightness reduced to almost complete darkness.

So I looked at the driver installed by the samsung-backlight package to see if there is a way to tweak it. And I was pleasantly surprised that it already supports two modes:
a) using SABI, which I believe is some kind of interface to call BIOS
b) using PCI
SABI is the default mode, but the driver conveniently supports configuration options to enable either of these modes.

So, if you want to unleash the full range of PCI brightness control, you can do it as follows.
* Create file "/etc/modprobe.d/samsung-backlight.conf" containing

Code: Select all

options samsung_backlight use_sabi=0 force=1

* reboot (see KDE note below first)
You can now change the brightness from complete darkness to extreme brightness in small increments (255 levels).

Note for KDE users:
I've noticed that the KDE Power Manager has settings for default/initial brightness level for each power profile. That's the brightness that you'll get when you boot your netbook or plug/unplug the charger. So make sure to go to "System Settings / Power Management / Edit Profiles" and check that all profiles have non-zero brightness values. Otherwise, you'll end up with completely dark screen after reboot or after your unplugged your AC cable.

Tips:
Even though you can use the brightness slider to get advantage of the full new range, the brightness control with the hot keys (Fn-Up/Down) is still very crude (in KDE at least). It only has 10 steps. And I could not find any way to configure this. So what I've done is I assigned an additional key combination (eg Meta-Up/Down) to "xbacklight +1" / "xbacklight -1". Which gives me a fine grained control of the brightness. (You can use more advanced scripts here if you prefer.)

Assumptions:
a) you need to install the samsung-backlight package (obviously)
b) you need to set "acpi_backlight=vendor" for your kernel (see other threads for howto)

mikebl71
Newbie
Newbie
Posts: 22
Joined: 03/10/2010, 20:17

Re: samsung-backlight - wider brightness range (fyi)

Postby mikebl71 » 21/02/2011, 0:03

Hi voRia,
Could you apply the attached patch to the samsung-backlight.c
It
* adds N140 to the list of supported devices
* adds logging to the PCI branch (the current version of the driver is completely silent if PCI mode is chosen so it's not clear from dmesg what's going on)


Return to “Linux On My Samsung”

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests