sonyxperiadev / bug_tracker

Empty repository that is used as a bugtracker for Open Devices project
52 stars 13 forks source link

[LENA][11][4.19] Display contrast becomes low after switching it off and on again #768

Open sledges opened 2 years ago

sledges commented 2 years ago

Platform: lena Device: pdx213 xqbt52 (Xperia 10 III) Kernel version: 4.19.188-gadf298fa3900 Android version: AOSP11 android-11.0.0_r46 Software binaries version: SW_binaries_for_Xperia_Android_11_4.19_v9a_lena.img

Previously working on Bug from factory.

Description Screen's contrast decreases a lot after switching display off and on.

Symptoms Blacks are not longer pitch black as they should on an OLED display. It feel as if the whole screen developed a "backlight".

How to reproduce

  1. Uncheck Settings > Display > Adaptive brightness
  2. Set brightness to the highest level
  3. Open an app which has black background and/or shows many black tones (e.g. Camera or Gallery)
  4. Set brightness to the lowest level
  5. Press power button to suspend device
  6. Press power button to wake device up
  7. Go back to that app

Additional context You can observe this much easier in a dark environment.

To reset display contrast, set brightness to the max again. You will notice the screen blink when it resets its contrast (it needs max_brightness value to do the contrast reset):

# echo 4094 > /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/backlight/panel0-backlight/brightness
# echo 4095 > /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/backlight/panel0-backlight/brightness

High contrast is restored during the last command, as the screen resets.

sledges commented 2 years ago

This is broken the same way on the original stock Android (flashed via Emma to 62.0.A.3.109), so probably there isn't much we can do about it on AOSP side..

sledges commented 2 years ago

The issue has been fixed in 62.0.A.3.131 (might be possible to upgrade after flashing Emma's .109), how could we trickle down any relevant changes to AOSP?

Related issue in XDA: https://forum.xda-developers.com/t/green-tint-on-oled.4289057/

Findings by @direc85: https://forum.sailfishos.org/t/x10ii-x10iii-color-banding-in-low-light-conditions/11659

sledges commented 2 years ago

The issue has been fixed in 62.0.A.3.131 (might be possible to upgrade after flashing Emma's .109), how could we trickle down any relevant changes to AOSP?

After quick search, file drivers/input/et613.c doesn't exist in AOSP kernel; https://github.com/sonyxperiadev/kernel-copyleft/commit/0b96eff8f2a9d4bb1995e6993797bebc7a00a4df#diff-f3a65493e47daa285b631adb52afce87266e115618a519c3b9b6da191f46179a

MarijnS95 commented 2 years ago

Can you explain how that fingerprint driver has any effect on the OLED appearing "backlit"?

sledges commented 2 years ago

I gave it only a very superficial looking into. Train of thought: if it's fixed in 62.0.A.3.131 -> open copyleft repo -> check latest commit, find "62.0.A.3.131" in it -> look through hunks -> the only least irrelevant file is et613.c -> nothing comes up after looking for "et613" online -> hints at gpio changes made this a candidate albeit vague, because I had (only) hopes this source drop would contain a solution as per above-mentioned findings.

After all, the history has known cases where writing to memory card would timeout frames clocked out from the GPU in the likes of hardware such as Openmoko FreeRunner:)