# HP Pavillion - No Backlight

## Holysword

Hey there,

I just made a (massive) upgrade of Gentoo on my old machine, just to find out that the backlight stuffs are not working. Previously I didn't actually try: the laptop comes with two dim control keys, and even though they do not produce an event in xev or input-events, they did control the brightness correctly. Well, sad story, now they don't and I can't find anything in /sys/

```
◢ jarvis ◣ ~ $  find /sys -iname "*bright*"

/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/leds/phy0-led/brightness

/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/leds/phy0-led/max_brightness

/sys/devices/pci0000:00/0000:00:1c.4/0000:04:00.1/leds/mmc0::/brightness

/sys/devices/pci0000:00/0000:00:1c.4/0000:04:00.1/leds/mmc0::/max_brightness

/sys/devices/virtual/leds/hp::hddprotect/brightness

/sys/devices/virtual/leds/hp::hddprotect/max_brightness

◢ jarvis ◣ ~ $
```

Also "light" or "back" do not return anything related to video. There is a directory named "/sys/bus/acpi/drivers/NVIDIA ACPI Video Driver" though, but no backlight control found in there.

This is an HP Pavillion DV7 if that matters, using nvidia-drivers=334.21-r1 and  gentoo-sources-3.13.6. The GPU is:

```
◢ jarvis ◣ ~ $  lspci | grep -i vga

01:00.0 VGA compatible controller: NVIDIA Corporation GT216M [GeForce GT 230M] (rev a2)

◢ jarvis ◣ ~ $
```

Thanks in advance!

----------

## BitJam

These boot parameters fix the backlight on some HP laptops:

```
video.use_bios_initial_backlight=0 video.brightness_switch_enabled=1
```

----------

## Holysword

 *BitJam wrote:*   

> These boot parameters fix the backlight on some HP laptops:
> 
> ```
> video.use_bios_initial_backlight=0 video.brightness_switch_enabled=1
> ```
> ...

 

Erm... can you enlightenment on how to set up these boot parameters? ><

----------

## BitJam

It depends on the bootloader you are using.  If you are using grub-legacy then just add them to the end of the "kernel" line in the /boot/grub/grub.conf file.  I don't know how to add boot parameters to grub-2.  I've never used it.

Here is the section on bootloaders in the handbook.

----------

## Holysword

 *BitJam wrote:*   

> It depends on the bootloader you are using.  If you are using grub-legacy then just add them to the end of the "kernel" line in the /boot/grub/grub.conf file.  I don't know how to add boot parameters to grub-2.  I've never used it.
> 
> Here is the section on bootloaders in the handbook.

 

I am not using any bootloader. I use efibootmgr to define the options and to set up bootorder, but that's it. I considered using refind, and I actually have it; but it is in fact just booting the kernel directly.

----------

## BitJam

That's unfortunate.  Parameterless booting always seemed like a screwy idea to me.   If you are allowed an initrd then you could use kexec to make linux act as a bootloader and pass yourself kernel parameters but that seems like a lot of effort just to workaround a defective bootloader.

 *man kexec wrote:*   

> kexec is a system call that enables you to load and boot into another kernel from the currently running kernel.
> 
> To load a kernel, the syntax is as follows:
> 
> ```
> ...

 

Edit: Those boot parameters only work on some HP laptops.  One of the reasons I suggested them was I thought it would be easy for you to give them a try.

----------

## Hu

You can compile kernel command line parameters into the kernel specifically because there exist defective bootloaders that cannot pass arguments.  Some EFI implementations might be smart enough to let efibootmgr save a command line to include.  Embedding them in the kernel is easier, though.

----------

## Holysword

 *BitJam wrote:*   

> That's unfortunate.  Parameterless booting always seemed like a screwy idea to me.   If you are allowed an initrd then you could use kexec to make linux act as a bootloader and pass yourself kernel parameters but that seems like a lot of effort just to workaround a defective bootloader.
> 
>  *man kexec wrote:*   kexec is a system call that enables you to load and boot into another kernel from the currently running kernel.
> 
> To load a kernel, the syntax is as follows:
> ...

 

I just installed grub-legacy and tried your suggestion. The kernel line looks like this:

```
kernel /boot/vmlinuz-3.13.6-gentoo root=/dev/sda3 video=uvesafb:1280x800-32,mtrr:3,ywrap video.use_bios_initial_backlight=0 video.brightness_switch_enabled=1
```

It doesn't change the backlight problem though. Any other suggestion?

----------

## BitJam

That was the only one I had.  I'm sorry it didn't work.

----------

