Laptop screen causes eye strain on all linux distros except Ubuntu and elementary OS

5,126

I already found what the problem is. LCD displays uses a frequency known as PWM (Pulse widht modulation). The screen backlight flashes to this frequency, on most monitors is between 200hz - 500hz range.

My Linux distro sets a low PWM frequency by default, that's why all the eyestrain. Luckily Intel gpu drivers can change the PWM frequency.

You need to install intel-gpu-tools

First you need to know your reference clock, this is stored on address 0xC6204. You can read values with the command intel_reg_read, so to read the value you can use the command:

    intel_reg_read 0xC6204

Once you know your reference clock you can use the calculator on this page to calculate your desired value. I used 500mhz, so I got 0x7a107a1.

The address for the PWM value is 0xC8254, You can set values with intel_reg_write, so you can use:

    intel_reg_write 0xC8254 0x7a107a1

You can see immediately changes. (Sometimes the screen brightness could change, but this is ok, the PWM frequency changes also)

I hope that this info could be helpful to anyone who need it.

Source

Share:
5,126

Related videos on Youtube

Josué Padilla
Author by

Josué Padilla

Musician, Coder and life power user.

Updated on September 18, 2022

Comments

  • Josué Padilla
    Josué Padilla almost 2 years

    I have a Lenovo g470 with Windows 8 used for games only, and a Linux Distro used for development and as my main OS.

    I used to have Elementary OS, it was working well, but I decided to try CrunchBang. I installed it and everything went fine with the installation, just some little problems about wifi that I solved easily. After some minutes setting OpenBox, conky and tint2 to my desires I had a big headache, and my eyes felt very sore. I could notice that the screen flickered a bit, like CTR with a low refresh rate. It's more noticeable on darker colors and on the corners of the screen.

    I checked my refresh rate an resolution, and everything was fine, the resolution and refresh were set to the native ones (1366x768 60hz) I thought that it was a video card drivers related problem. My computer has two graphics cards, an integrated Intel HD3000 and a discrete Ati HD6370, I tried with both cards. Using the intel drivers, and for the ati, the privative and open source ones with no difference.

    After looking for answers and trying some setting with xrandr, I gave up and tried with another distro. This time Arch Linux. I installed the base system, intel video drivers, the latest version of Xorg and OpenBox but I found the same problem. I don't have any idea of what's wrong with this. I'm already trying with Linux mint, and the problem is also present here, I'm sure that it's not a harware fault, because I can use it fine with Windows, Ubuntu and Elementary OS.

    Any idea of what could be wrong? Or any different setting present on Ubuntu by default and that all other OS are missing that could be causing this?

    Thanks in advance.

    • Tim
      Tim over 10 years
      Maybe there is a difference in the default brightness of the screen? My Thinkpad is very bright compared to other notebooks.
  • user592704
    user592704 over 9 years
    Very helpful info thanks :) Currently I am facing backlight LED micro-flashing with intel hd graphics so it is very tiring for eyes (also I suspect graphics artifacts)... I just wanted to ask how to know "desired" PWM? And concerning PWM and kernel config what configuration should be enabled to use PWM cause currently I have pre-compiled kernel and the "intel_reg_read 0xC8254" outputs "0xC8254 : 0x0" so maybe my kernel is missing come configuration? Please give me a tip
  • Josué Padilla
    Josué Padilla over 9 years
    Well, if I recall correctly I didn't used a standard or specified value, I just used the one that I was more comfortable with after trying different ones for a while. I used 500mhz and that worked for me, but I don't Know if this value is ok for every screen. I suggest you to try incremental values until you find one that suits your screen. About the kernel, try to set a different value using the write command on that address to see if anything changes. I am not sure if the memory addresses varies with different drivers or chipsets but maybe you can do some research to find it out :)
  • Mario Peshev
    Mario Peshev over 4 years
    I've been using Linux for 15 years now and consistently struggled with this (always looking for workarounds). This fix worked out like a charm and should be a default setting for every Linux build. Thank you so much.