Thursday, August 14, 2014

Gentoo, Black screen, Integrated Intel graphics

This is a record of a black screen problem that I initially faced after I installed Gentoo with kernel version 3.10 and below. 

Laptop: Lenovo G400S with rEFind as bootloader.
Integrated Intel graphics with Nvidia GT720M

** This problem has somehow been fixed in kernel 3.14.14 which I just compiled and the black screen problem is finally gone! 

1. During bootup into Gentoo, the screen goes blank after the initial few lines. (I wasn't patient enough to wait for the system to bootup completely and kept thinking it was kernel panic and went through countless of times recompiling the kernel only to realise much later that the backlight wasn't switched on! Duh. *face palm*)

2. This problem occurs when I enable KMS for Intel together with EFI framebuffer. I just have to press the hotkey to increase the brightness of the backlight. (/sys/class/backlight/acpi_video0/brightness is somehow always set to zero), It doesn't solve the problem completely, but at least I am able to view the screen. If I disable KMS for Intel, no problems with backlight, but I am not able to start the X-server without KMS.

3. A few suggestions on the net are to add i915.invert_brightness=1 or acpi_backlight=vendor as a kernel option. That doesn't work quite well for me because:

a. If I boot the kernel with the option i915.invert_brightness=1, the backlight doesn't switch off. But everything is inverted. If I press the key to increase brightness, the display dims and vice versa. Same thing happens if I change the value in /sys/class/backlight/acpi_video0/brightness. If I increase the value, the display dims. If I decrease it, the display brightens. 

b. If I boot the kernel with the option acpi_backlight=vendor, the backlight also doesn't switch off. But brightness is at maximum and I am unable to change it at all.

4. My solution is to  create a file called "backlight.start" (Remember to chmod +x the file) in "/etc/local.d" The content of the file is as follows: 

 #!/bin/sh

echo 60 >> /sys/class/backlight/acpi_video0/brightness

 This will cause the backlight to be set at 60 when I see the login prompt. You may have to check your system first to see if setting value in /sys/class/backlight/acpi_video0/brightness will actually change the brightness or not. For some people it might be /sys/class/backlight/acpi_video1 or /sys/class/backlight/intel_backlight. 

5. There are, by the way, 3 ways (in my case) to adjust the brightness of the screen: The brightness keys on the keyboard, adjusting the values in /sys/class/backlight/acpi_video0 or /sys/class/backlight/intel_backlight and using xbacklight.

Well, all these solutions are now redundant as the problem has been fixed in the latest kernel. But it has been interesting researching for a temporary fix. :) 


2 comments:

Anonymous said...

Hi,

I have exactly the same problem as you have had, in kernel 3.14.14!

I suspect the problem is not really kernel version dependent.....

Unfortunately I do not have a solution to my problem yet.

Laptop: Lenovo Carbon X1

Anonymous said...

Hi Phil!

I do not know if the problem depends on the kernel version. But my configuration for kernel 3.10.x and 3.14.x is the same. I gave up looking for a solution and relied on the backlight.start file to brighten up the screen for more than a year before the problem eventually solved itself.