• General
  • Flickering OLED screens on Google Pixel smartphones (PWM)

cltqbfk359 Extra Dim has the same method as the apps. Only it doesn't control the system brightness level (PWM doesn't change), it just dims the screen. Here I described how it works:

I've already checked out this app, by the way. OLED Saver and PWMfree when I was still on the stock OS. And even on GrapheneOS I have already tested them.

What they do is increase the brightness to the maximum available to them (the same can be done without the app) that is no higher than the user himself can do in the settings, and overlay an invisible (yet) black filter on the screen. So, when using dimming from the app, the black filter applied gets darker and darker depending on the brightness set in the app.

The way OLED display works is the darker the image, the less voltage is applied to the LED. How do you get dark gray on an OLED display? Gray, dark gray, and light gray are really just shades of white. A gray pixel is obtained by forming a white pixel and then reducing the voltage going to the LEDs. On other smartphones this could work because some models completely turn off the PWM at 100 percent brightness.

And here we should get supposedly DC Dimming, but it's not so easy on Google Pixel and Samsung smartphones.

Because the main problem still remains - the PWM does not go anywhere. At maximum brightness, the display flickers because of PWM at 240 Hz.

@treequell please add the "Development" tag to the topic title (without removing it from "General")

10 days later

This is going to be a long post. So, I've collected some info that can help GrapheneOS developers.

I recently came across this question on Reddit - "Is using max brightness guaranteed to be PWM free?". There was this comment - "Yes if the display has no HDR. But most OLED displays on smartphones today have HDR so they advertise 2 different max brightness values - for example 1200 nits max brightness typically, with 1750 nits max for HDR content.

This means individual LEDs can attain 1750 nits max brightness, but this will be only for HDR content. But this is very very bright for typical use and also unsustainable for long time (from thermal and power perspective) so they limit the individual LED to a lower typical value which means it must use PWM to have it at that lower-than-max brightness."


As we know, the Pixel 6a display supports HDR. I wanted to do an experiment.

The first thing I checked is that the brightness is set to 100 percent and adaptive mode is set in the display settings. Then I downloaded an image of an completely white background, opened the gallery and opened that image to full screen. I then took the camera, set the ISO to 3200 and took the first photo which shows the PWM flicker.

Then on YouTube, I opened an HDR video with completely white color also full screen. I took a photo with the same camera settings.

But a small remark - I do not have a device that measures the coefficient or frequency of PWM flickering, so the conclusion will be based on two different pictures. (and additionally the third one)
The results are as follows, there are 3 pictures in the gallery -

https://postimg.cc/gallery/cY1vXX5

Picture 1 - maximum brightness at 100% without HDR content (PWM 240Hz)
Picture 2 - HDR video is open and playing here, the width of flickering lines is less.
Picture 3 is the most unusual. This is also HDR video. You can see that the PWM frequency has decreased. I think this is because I turned off the video and waited 5 minutes before taking another picture, thus the temperature of the display decreased and the brightness was at its peak. The PWM frequency decreased a lot. And the duty cycle stayed as short, it didn't increase (which is a good thing)

What can I say:

Samsung displays are one of the worst in terms of flicker. They even put these AMOLED displays on their most expensive smartphones (just like Google, of course), which have a PWM flicker frequency of 240 Hz.
So, I've demonstrated some kind of opportunity for GrapheneOS developers. I'm not sure if FlickerFree is possible, but it is still possible to add an option to reduce PWM, which would be good for the eyes. And the method of adjusting the brightness when the option is enabled, can be done as in the app OLED saver (ie overlaying a dark layer depending on the preferred level of brightness) Thus we will get an improvised DC Dimming. (by the way, smartphones with DC Dimming also have PWM, but less).

Since I do not have access to kernel and do not know how to modify it, the conclusion is based on surface experience. Maybe it will be possible to get rid of PWM at all, only GOS developers will be able to find out.


Also saw another interesting Kernel for Google Pixel 2 & Pixel 2 XL today.
It's called Moonflower Kernel. It is available on Github - https://github.com/JanPetrucci27/android_kernel_google_wahoo
Based on the description, it implements Flicker-Free (DC Dimming) as the developer of this kernel wrote on GitHub:

" DC Dimming was provided in the Nov 7, 2022 release -.
" - Introducing DC Dimming "Flicker-free" display driver:
"The flicker free provides flicker free function without changing panel hardware brightness to avoid PWM flicker on OLED devices."
-"Backlight dimmer" and "Backlight max brightness" option. "

At the path "android_kernel_google_google_wahoo/drivers/video/fbdev/msm/" I can see some changes. There are also two files there "flicker_free.c" and "flicker_free.h".

I don't have a Pixel 2 or 2 XL, but I think the changes in the kernel set the display controller to run at full brightness, for example, instead of 800 nits it will get 1300 nits of brightness without PWM. Then, a dimming filter is applied on top of the screen. The same way as the OLED Saver. Then, you get improvised DC Dimming without PWM because of the changes in the kernel. But I can only speculate how it works.

@GrapheneOS Dear GrapheneOS administrators and developers. At least do not leave this problem without attention. Including me.

I have provided you with as much information as I could. I hope that you will take this situation with understanding.

If there is a problem that hurts the eyes of many Pixel smartphone owners, including those who use GrapheneOS firmware, which Google does not want to fix, and you have the opportunity to do so, why not? I'd like to hear some reaction from you on this issue, rather than just ignoring the situation.

Aside from the privacy features, adding this feature 100% would be a good idea. People who suffer from PWM will switch to GOS.

Thank you for your attention to this issue, and I hope you will keep an open mind about the situation.

a month later

matemo Apparently, even in Fairphone 5 smartphones, the DC Dimming option has been added

Was DC dimming also added retrospectively to the FP4?

    matemo It seems as if the possibility of DC dimming depends on screen hardware. If we don't know whether modern Pixel screens do or do not support DC dimming, it is unknown whether or not there is anything for theoretical software to theoretically enable.

      de0u Of course, I agree with that. But it is still possible to reduce the PWM, I did an "experiment". If you want, you can compare the first and third photo: https://postimg.cc/gallery/cY1vXX5
      P.S The first photo shows the default PWM (at 100 percent brightness, which can be set by the user)

      de0u And, as in the 2nd and 3rd photos, this cannot be done for long term use manually (only possible on the firmware or kernel level)

      9 days later

      It would be good if some programmer checked this problem. Xiaomi and even realme have DC dimming options. The Pixel 6a has a really bad display in terms of flicker.

      24 days later

      I too am annoyed by the PWM on my 6a. The only thing I could do was set the screen brightness manually above 50%. The flicker above 50% on the 6a pixel stabilises a bit so it alleviates the situation. But further than that it's just a relief. And I set a bright theme to tire my eyes less when reading. The weak thing is that google and Samsung don't give options to improve flicker. Motorola has much better displays in this respect. And xiaomi and other Chinese brands add DC dimming.

      matemo Have you tried enabling the nightshift / night light to run 24/7? It tints the screen and makes it much easier on your eyes. I have to enable this on everything, otherwise I'll have a migraine.

      a month later

      So, as it turns out, there is a "High Brightness Mode" for OLED screens. But it cannot be enabled without root. (or if such a switch is not added on the Graphene OS side)

      For this reason PWM was reduced alot when playing HDR video. You can see it in the pictures in some of the posts above.

      Developers can add a switch so that those users who need it can enable "High Brightness Mode", which will help to increase brightness and thus reduce PWM by more than 50% for sensitive users (on maximum brightness).
      And "High Brightness Mode" won't be a problem for everyday use. There are apps that overlay a dimming filter to adjust brightness, such as PWMFree. So there will be no need to use the system brightness slider. The main issue is to reduce the PWM. It's better than nothing.

        I have read a lot of articles and watched a lot of videos about PWM in general and pixel 6a. In addition, I compared the pixel screen with Oneplus 8, which has PWM but with a higher frequency. My conclusions so far are:
        -The OP8's screen flickers in the worst case at a frequency of approximately 240hz to a maximum of 360hz below 100% brightness. Pixel screen from 120 to 240Hz.
        -I can use the OP screen without eye pain at any brightness level. In pixel, no.
        -According to Radex, the Pixel screen flickers at a maximum brightness of about 30% on a white background and a little more in color. The ideal result is said to be below 5%. And here's an interesting thing - the screen at 75% brightness also flickers around 35% according to Radex. Brightness levels of 50 and 25 percent are the worst with a value of 130%.
        -I can use Pixel 6a quite comfortably when:
        Set the brightness manually to 75%.
        Set it to light mode.
        I will increase the font size because by default it is set quite low, I don't know why.
        Set additional dimming in the settings in the Accessibility tab. You can dim the screen without changing the screen brightness value by swiping with two fingers from the bottom of the screen.
        Conclusions.
        The screen in Pixel 6a has poor PWM, but other Pixel models have similar ones, even the Samsung s23 ultra with its 120Hz display has PWM at 240Hz. Apple, Google and Samsung don't care about it. Only Chinese brands try to combat this, either through DC dimming or much higher flicker frequencies.

          I'm curious how the screen would behave if it had a refresh rate of 90hz. There is a modification, but it is not very stable. Some sources say that the screens in pixel 6 and 6a are the same, only in 6a it has been reduced to 60hz.

          matemo So, as it turns out, there is a "High Brightness Mode" for OLED screens. But it cannot be enabled without root. (or if such a switch is not added on the Graphene OS side)

          Can you provide a link to documentation about this?

            de0u Documentation is hard to find, but there are many sources of information that confirm this.

            1. For example, there is a paid app made by good developer - Flar2, that helps to enable this High Brightness Mode, and works on Google Pixel devices (but only with Root)
              https://play.google.com/store/apps/details?id=flar2.hbmwidget&hl=en_US
              (Description from Google Play -Supports Pixel 4, 5, 6, 7 and 8 series (requires root)
              -Supports OnePlus 5, 6, 7 and 8 series (requires root)
              -Supports most (not all) Samsung devices without root )

            2. My photos proving the existence of this mode https://postimg.cc/gallery/cY1vXX5
              (PWM decreased and brightness increased)

            3. Commands that require root, they enable this mode (atleast on Pixel 6 Pro, but can also work on 6a and other models) -
              echo 1 > /sys/devices/platform/1c2c0000.drmdsim/1c2c0000.drmdsim.0/backlight/panel0-backlight/hbm_mode
              echo 1 >> /sys/class/backlight/panel0-backlight/hbm_mode
              echo 2 >> /sys/class/backlight/panel0-backlight/hbm_mode

            4. And there's also an article about it https://hothardware.com/news/google-pixel-4-high-brightness-mode

            I think that it is not a difficult thing to implement such a simple switch in GrapheneOS, because Pixel devices already supports High Brightness Mode.

            Javcek Thats very useful information, thank you. And I agree with you, its very frustrating and upsetting that most manufacturers don't care about it.

            Victus
            This article suggests setting the PWM-frequency through software is possible, on Pixel 8 Pro. Since the frequency was changed with an update from Google then it would hopefully be a relatively small task to study the code changes and revert it.