# Nvidia brightness controls or dimming [solved]

## rockier

Can someone help me get the screen brightness or backlight to work on a HP laptop.

The laptop is a HP dv6054nr with a nvidia display. I have most of the hardware working.

this is the lspci -k on the machine for the video

05:00.0 VGA compatible controller: nVidia Corporation GeForce Go 7200 (rev a1)

        Kernel driver in use: nvidia

        Kernel modules: nvidia

Let me know what you need to help.

So far I have these items working

CPU fan, USB plus-in, MMC card, The wireless works but do not have the net.wlan0 file, touchpad, alsa sound, Microdia Sonix camera, and power managment. I just can not get the screen to dim.Last edited by rockier on Mon Oct 26, 2009 5:23 pm; edited 1 time in total

----------

## platojones

Have you tried installing the nvidia-settings package in portage?  It should be able to control all of this stuff...works on my desktop.

----------

## rockier

Yes, I have it installed.

media-video/nvidia-settings version 180.60

----------

## Moonboots

I use the smartdimmer function from nvclock package to control backlight

----------

## rockier

 *Quote:*   

> I use the smartdimmer function from nvclock package to control backlight

 

I just tryed that and it does not work for me.

Thanks for the info.

----------

## rockier

Please Close. I have got it to work.

Thanks for everyones help.

----------

## 199599

Would you mind telling us how you got it to work?  :Smile: 

----------

## rockier

Yes, I will.

I have a HP DV6045nr laptop. Running AMD64 bit kernel under x86_64

I had tryed to get this working for days. I was seeing how long the battery would last and let the machine go down to 5% and then I pluged it back in to power. At that time I did this.

I first uninstalled the kernel software.

emerge -C gentoo-sources

I deleted everything in the directory

rm -R /usr/src/*

I remerged the sources back

emerge gentoo-sources

This is the kernel version linx-2.6.30-gentoo-r8 I emerged.

The hardware is :

```

00:00.0 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)

00:00.1 RAM memory: nVidia Corporation C51 Memory Controller 0 (rev a2)

00:00.2 RAM memory: nVidia Corporation C51 Memory Controller 1 (rev a2)

00:00.3 RAM memory: nVidia Corporation C51 Memory Controller 5 (rev a2)

00:00.4 RAM memory: nVidia Corporation C51 Memory Controller 4 (rev a2)

00:00.5 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)

00:00.6 RAM memory: nVidia Corporation C51 Memory Controller 3 (rev a2)

00:00.7 RAM memory: nVidia Corporation C51 Memory Controller 2 (rev a2)

00:02.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)

00:03.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)

00:04.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)

00:09.0 RAM memory: nVidia Corporation MCP51 Host Bridge (rev a2)

00:0a.0 ISA bridge: nVidia Corporation MCP51 LPC Bridge (rev a3)

00:0a.1 SMBus: nVidia Corporation MCP51 SMBus (rev a3)

00:0a.3 Co-processor: nVidia Corporation MCP51 PMU (rev a3)

00:0b.0 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3)

00:0b.1 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3)

00:0d.0 IDE interface: nVidia Corporation MCP51 IDE (rev f1)

00:0e.0 IDE interface: nVidia Corporation MCP51 Serial ATA Controller (rev f1)

00:10.0 PCI bridge: nVidia Corporation MCP51 PCI Bridge (rev a2)

00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)

00:14.0 Bridge: nVidia Corporation MCP51 Ethernet Controller (rev a3)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

03:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01)

05:00.0 VGA compatible controller: nVidia Corporation GeForce Go 7200 (rev a1)

07:05.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller

07:05.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)

07:05.2 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 0a)

07:05.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 05)

07:05.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev ff)

```

I then I made the chages to the kernel like this:

```

#

# Power management and ACPI options

#

CONFIG_ARCH_HIBERNATION_HEADER=y

CONFIG_PM=y

CONFIG_ACPI=y

CONFIG_ACPI_SLEEP=y

CONFIG_ACPI_PROCFS=y

CONFIG_ACPI_PROCFS_POWER=y

CONFIG_ACPI_SYSFS_POWER=y

CONFIG_ACPI_PROC_EVENT=y

CONFIG_ACPI_AC=y

CONFIG_ACPI_BATTERY=y

CONFIG_ACPI_BUTTON=m

CONFIG_ACPI_VIDEO=m

CONFIG_ACPI_FAN=m

CONFIG_ACPI_DOCK=y

CONFIG_ACPI_PROCESSOR=m

CONFIG_ACPI_HOTPLUG_CPU=y

CONFIG_ACPI_THERMAL=m

# CONFIG_ACPI_CUSTOM_DSDT is not set

CONFIG_ACPI_BLACKLIST_YEAR=0

# CONFIG_ACPI_DEBUG is not set

CONFIG_ACPI_PCI_SLOT=m

CONFIG_X86_PM_TIMER=y

CONFIG_ACPI_CONTAINER=y

# CONFIG_ACPI_SBS is not set

#

# CPU Frequency scaling

#

CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

# CONFIG_CPU_FREQ_DEBUG is not set

CONFIG_CPU_FREQ_STAT=m

CONFIG_CPU_FREQ_STAT_DETAILS=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y

# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set

# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=y

CONFIG_CPU_FREQ_GOV_USERSPACE=y

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

#

# Graphics support

#

CONFIG_AGP=y

CONFIG_AGP_AMD64=y

CONFIG_AGP_INTEL=y

# CONFIG_AGP_SIS is not set

# CONFIG_AGP_VIA is not set

# CONFIG_DRM is not set

# CONFIG_VGASTATE is not set

CONFIG_VIDEO_OUTPUT_CONTROL=y

CONFIG_FB=y

CONFIG_FIRMWARE_EDID=y

# CONFIG_FB_DDC is not set

CONFIG_FB_BOOT_VESA_SUPPORT=y

CONFIG_FB_CFB_FILLRECT=y

CONFIG_FB_CFB_COPYAREA=y

CONFIG_FB_CFB_IMAGEBLIT=y

# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set

# CONFIG_FB_SYS_FILLRECT is not set

# CONFIG_FB_SYS_COPYAREA is not set

# CONFIG_FB_SYS_IMAGEBLIT is not set

# CONFIG_FB_FOREIGN_ENDIAN is not set

# CONFIG_FB_SYS_FOPS is not set

# CONFIG_FB_SVGALIB is not set

# CONFIG_FB_MACMODES is not set

# CONFIG_FB_BACKLIGHT is not set

CONFIG_FB_MODE_HELPERS=y

# CONFIG_FB_TILEBLITTING is not set

#

# Frame buffer hardware drivers

#

# CONFIG_FB_CIRRUS is not set

# CONFIG_FB_PM2 is not set

# CONFIG_FB_CYBER2000 is not set

# CONFIG_FB_ARC is not set

# CONFIG_FB_ASILIANT is not set

# CONFIG_FB_IMSTT is not set

# CONFIG_FB_VGA16 is not set

CONFIG_FB_UVESA=y

CONFIG_FB_VESA=y

CONFIG_FB_EFI=y

# CONFIG_FB_N411 is not set

# CONFIG_FB_HGA is not set

# CONFIG_FB_S1D13XXX is not set

# CONFIG_FB_NVIDIA is not set

# CONFIG_FB_RIVA is not set

# CONFIG_FB_LE80578 is not set

# CONFIG_FB_INTEL is not set

# CONFIG_FB_MATROX is not set

# CONFIG_FB_RADEON is not set

# CONFIG_FB_ATY128 is not set

# CONFIG_FB_ATY is not set

# CONFIG_FB_S3 is not set

# CONFIG_FB_SAVAGE is not set

# CONFIG_FB_SIS is not set

# CONFIG_FB_VIA is not set

# CONFIG_FB_NEOMAGIC is not set

# CONFIG_FB_KYRO is not set

# CONFIG_FB_3DFX is not set

# CONFIG_FB_VOODOO1 is not set

# CONFIG_FB_VT8623 is not set

# CONFIG_FB_TRIDENT is not set

# CONFIG_FB_ARK is not set

# CONFIG_FB_PM3 is not set

# CONFIG_FB_CARMINE is not set

# CONFIG_FB_GEODE is not set

# CONFIG_FB_VIRTUAL is not set

# CONFIG_FB_METRONOME is not set

# CONFIG_FB_MB862XX is not set

# CONFIG_FB_BROADSHEET is not set

CONFIG_BACKLIGHT_LCD_SUPPORT=y

CONFIG_LCD_CLASS_DEVICE=y

# CONFIG_LCD_ILI9320 is not set

CONFIG_LCD_PLATFORM=y

CONFIG_BACKLIGHT_CLASS_DEVICE=y

# CONFIG_BACKLIGHT_GENERIC is not set

# CONFIG_BACKLIGHT_PROGEAR is not set

# CONFIG_BACKLIGHT_MBP_NVIDIA is not set

# CONFIG_BACKLIGHT_SAHARA is not set

#

# Display device support

#

CONFIG_DISPLAY_SUPPORT=y

#

# Display hardware drivers

#

#

# Console display driver support

#

CONFIG_VGA_CONSOLE=y

CONFIG_VGACON_SOFT_SCROLLBACK=y

CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256

CONFIG_DUMMY_CONSOLE=y

CONFIG_FRAMEBUFFER_CONSOLE=y

CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y

CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y

# CONFIG_FB_CON_DECOR is not set

# CONFIG_FONTS is not set

CONFIG_FONT_8x8=y

CONFIG_FONT_8x16=y

CONFIG_LOGO=y

# CONFIG_LOGO_LINUX_MONO is not set

# CONFIG_LOGO_LINUX_VGA16 is not set

CONFIG_LOGO_LINUX_CLUT224=y

```

I then recompiled the kernel and copy it to the boot

make && make modules && make modules_install

cp arch/x86_64/boot/bzimage /boot/kernel64

I rebooted the machine and when it came up.

I then run the nvidia drivers I got from nvidia web site.

NVIDIA-Linux-x86_64-185.18.36-pkg2.run

After that it started work. Even the FN+F7 and FN+F8 worked to dime the monitor.

I hope this helps someone.

----------

## rockier

 *rockier wrote:*   

> Yes, I will.
> 
> I have a HP DV6045nr laptop. Running AMD64 bit kernel under x86_64
> 
> I had tryed to get this working for days. I was seeing how long the battery would last and let the machine go down to 5% and then I pluged it back in to power. At that time I did this.
> ...

 

----------

## 199599

Thanks for your post, I adopted your kernel config, but it didn't solve the problem for me. Seems like it's graphics card specific, as others report the same problems with the 9600M GT. This error in dmesg might be related, but I couldn't find any info on it:

```

[Firmware Bug]: ACPI: ACPI brightness control misses _BQC function 

```

----------

## rockier

Just wanted to update some more information I have found.

As I was using the laptop and the brightness quit working agian.

So I started hacking the video brightness functions to find out why it quit working.

when I looked in the dmesg I got this error message.

dmesg | grep -i acpi

ACPI Error (video-0538) Current brightness invalid [20090320]

What I have found is the brightness on the display was set in between the steps that are aloud.

My display brightness was set to 70 and the allowed steps are 66 then 78 so this function would fail.

file is /usr/src/linux/drivers/acpi/video.c

```

static int

acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)

{

   int status;

   union acpi_object arg0 = { ACPI_TYPE_INTEGER };

   struct acpi_object_list args = { 1, &arg0 };

   int state;

   arg0.integer.value = level;

   status = acpi_evaluate_object(device->dev->handle, "_BCM",

                  &args, NULL);

   if (ACPI_FAILURE(status)) {

      ACPI_ERROR((AE_INFO, "Evaluating _BCM failed"));

      return -EIO;

   }

   device->brightness->curr = level;

   for (state = 2; state < device->brightness->count; state++)

      if (level == device->brightness->levels[state]) {

         if (device->backlight)

            device->backlight->props.brightness = state - 2;

         return 0;

      }

   ACPI_ERROR((AE_INFO, "Current brightness invalid"));

   return -EINVAL;

}

```

This is where it fails in the code.

```

  if (level == device->brightness->levels[state]) {

```

So I changed it to 

```

  if (level <= device->brightness->levels[state]) {

```

And it started working agian.

I hope this may help someone get there brightness to work agian too.

----------

