# Dell Vostro 3700 (GeForce GT 330M) backlight control

## Xificurk

Hi,

I have Dell Vostro 3700 with Nvidia GeForce GT 330M and I'm trying to get the backlight control working, so far only with partial success:

I'm using latest stable kernel (2.6.36-r5) and nvidia-drivers (260.19.29).

I've tried acpi/video module from gentoo-sources, which indeed generates ACPI events when Fn keys are pressed and adjusts the backlight. But when I try set the brightness level via command line e.g. echo 5 > /sys/devices/virtual/backlight/acpi_video0/brightness it does not actually adjust the backlight, although when I then press the Fn keys, the brightness is adjusted starting from the value set from command line. This makes it unusable for automatic adjustment (e.g. when switching from battery to ac).

 I've also tried app-laptop/nvidia-bl from sunrise overlay (this is module provided by mactel), after playing with module parameters for a while, I got it working... almost. Now I have another interface called nvidia_backlight in /sys/devices/virtual/backlight/ via which I can adjust the backlight from command line. The nice thing is that powerdevil daemon from KDE4 now can set the levels when switching power source - it changes the values in acpi_video0 as well as in nvidia_backlight; Pressing Fn keys changes values of acpi_video0/brightness, acpi_video0/actual_brightness, nvidia_backlight/actual_brightness (not nvidia_backlight/brightness, whatever, it seems to work).

Now the weird part - when I enable/disable compositing in KDE4, the brightness resets to a certain level - at first it seemed it's a random level, but by trial and error I've found out that it is precisely the level which was set when by Fn keys last time. E.g. when switching power source to battery, I see that powerdevil dims the display (by setting appropriate values in /sys/devices/virtual/backlight), then sets up few other things, and finally disables compositing in KDE4, which results into reseting the brightness level again.

I guess that nvidia driver (or maybe something else?) resets the brightness level, when the compositing is enabled/disabled, but I have no idea how to get rid of this "feature". By debugging the nvidia_bl module I've found out that when setting the brightness level it writes to registry e.g. 0x80006300, which corresponds to level 99/103, next read of actual_brightness reads registry 0x00006300, but when the reset occurs it reads e.g. 0x40005065, which corresponds to level 80/103 - I wonder what the 0x4 bit means.

Anyway I would really appreciate any hints on why the changing values in the interface provided by acpi/video module has no actual effect on the display, or how to get rid of the brightness resets. Thanks.

----------

## valentin.mu

i've got the same problems. did you find any solutions?

----------

## Xificurk

 *valentin.mu wrote:*   

> i've got the same problems. did you find any solutions?

 

I've found out that the resets occur only when using opengl backend for desktop effects, so for now I'm using xrender.

----------

## valentin.mu

that's good, but i couldn't make it working both in X and in console.

can you post your working kernel config here?  :Smile: 

----------

## valentin.mu

by the way, did you make suspend to RAM working on you laptop?

because i experienced couple of problems:

1. with eth card kernel module loaded wake-up time was more than 1minute(!) - solved by unloading module

2. after wake up laptop freezes sometimes for no visible reason. maybe you know where might be problem?

----------

