From d42fef5d64005bcaa161b18f8fed4312c20e37e0 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Tue, 28 Jun 2016 05:34:26 -0400 Subject: html docs: guide on backlight control --- (limited to 'docs/misc/index.html') diff --git a/docs/misc/index.html b/docs/misc/index.html index 5af9350..2ce689d 100644 --- a/docs/misc/index.html +++ b/docs/misc/index.html @@ -24,6 +24,7 @@
  • X60/T60: Serial port - how to use (for dock owners)
  • Power Management Beeps on Thinkpads
  • Using diff and patch
  • +
  • Finetune backlight control on intel gpu’s
  • Get EDID: Find out the name (model) of your LCD panel
  • @@ -149,9 +150,70 @@ WantedBy=multi-user.target

    Back to top of page +

    +

    Finetune backlight control on intel gpu’s

    +

    + Sometimes the backlight control value (BLC_PWM_CTL) set by libreboot is not ideal. The result is either flicker, which could cause nausea or epilepsy or an uneven backlight and/or coil whine coming from the display. To fix this a different value for the gpu reg BLC_PWM_CTL needs to be set. See p94 of https://01.org/sites/default/files/documentation/g45_vol_3_register_0_0.pdf for more information on this reg. The tool for setting registry values on intel gpu’s is included in intel-gpu-tools. Install intel-gpu-tools: sudo apt-get install intel-gpu-tools +

    +

    + You can set values:
    + sudo intel_reg write 0x00061254 <your_value> +

    +

    + The value set has the following structure: bits [31:16] is PWM divider. PWM / PWM_divider = frequency bits [15:0] is the duty cycle and determines the portion of the backlight modulation frequency. A value of 0 will mean that the display is off. A value equal to the backlight modulation frequency means full on. The value should not be larger than the backlight modulation frequency. +

    +

    + On displays with a CCFL backlight start from: 0x60016001 To verify if all modes work as desired use:
    + xbacklight -set 10 + and gradually increase until 100. Displays with an LED backlight need a lower backlight modulation. Do the same thing but start from 0x01290129 . Try setting different values until you have found a value which presents no issue. +

    +

    + It is important to know that there are four failure modes: +

      +
    1. flickering very fast, which could cause epilepsy (frequency is too low. decrease divider)
    2. +
    3. randomly flickering in random intervals - driver IC cannot keep up with toggling the mosfet (frequency too fast, increase divider)
    4. +
    5. frequency is in audible range and causes coils to whine (frequency is too high. increase divider)
    6. +
    7. backlight is uneven. (CCFL specific, frequency is too high. increase divider)
    8. +
    +

    +

    + To check for flickering try moving your laptop while looking at it. +

    +

    + A higher frequency equals higher power consumption. You want to find the highest good working value. +

    +

    + Next this value should be set at boot: either add
    +

    intel_reg write 0x00061254 <your_ideal_value>
    + before exit 0 in /etc/rc.local or create a systemd service file /etc/systemd/system/backlight.service: +
    +[Unit]
    +Description=Set BLC_PWM_CTL to a good value
    +[Service]
    +Type=oneshot
    +RemainAfterExit=no
    +ExecStart=/usr/bin/intel_reg write 0x00061254 <your_value>
    +[Install]
    +WantedBy=multi-user.target
    +	    
    + Now start and enable it: sudo systemctl start backlight && sudo systemctl enable backlight +

    +

    + Special note on i945: +

    +

    + i945 behaves differently. Bit 16 needs to be 1 and the duty cycle is not updated when backlight is changed. There are no available datasheets on this target so why it behaves in such a way is not known. So to find a working value BLC_PWM_CTL set bit 16 to 1 and make sure PWM divider == duty cycle. see https://review.coreboot.org/#/c/10624/ on bit 16. The cause of this issue is that i945, in contrast with to GM45, is set to work in BLM Legacy Mode. This makes backlight more complicated since the duty cycle is derived from 3 instead of 2 registers using the following formula:
    + + if(BPC[7:0] <> xFF) then BPCR[15:0] * BPC[7:0] Else BPCR[15:0] + +
    + BPC is LBB - PCI Backlight Control Register, described on http://www.mouser.com/pdfdocs/945gmedatasheet.pdf on page 315. BPCR is BLC_PWM_CTL described in https://01.org/sites/default/files/documentation/g45_vol_3_register_0_0.pdf on page 94. More research needs to be done on this target so proceed with care. +

    +
    +
    - +

    Power Management Beeps on Thinkpads

    @@ -176,7 +238,7 @@ WantedBy=multi-user.target

    A reboot is required, for these changes to take effect.

    - +
    @@ -199,7 +261,7 @@ WantedBy=multi-user.target

    Back to top of page.

    - +
    @@ -247,7 +309,7 @@ WantedBy=multi-user.target possible, most closely approximates an absolute disclaimer and waiver of all liability.

    - +
    -- cgit v0.9.1