Jump to content

Display/Troubleshooting

From postmarketOS Wiki
Revision as of 21:31, 6 December 2017 by Halamix2 (talk | contribs) (added proper fix to red screen problem)

Generic debugging steps

Changing the panning

Some devices might have a framebuffer virtual size thats twice as big as the panel resolution, this is a common double buffering method. The application renders to one side of the display while the panning is set to the other side. You can try changing the panning with the `panning` file in the sysfs directory.

$ cat /sys/class/graphics/fb0/virtual_size
todo: add file contents here
$ cat /sys/class/graphics/fb0/pan
todo: add file contents here
$ echo 0 0 > /sys/class/graphics/fb0/pan

Qualcomm framebuffer (mdss, mdp3)

MSM framebuffer doesn't work

We found out that removing the 3D driver support makes the MSM framebuffer. See #66.

CONFIG_MSM_KGSL=n

On devices using the mdss_fb driver, adding mdss-fb-init-hack to the dependencies of the device package (example) might help.

Screen output flicker and inactivity

If you notice a very brief flicker upon boot, but immediately disappears and screen turns black, you might have a buggy framebuffer Qualcomm MDSS MDP3 driver.

You can try patching the source code by removing the function assigned to the mdp3_interface->off_fnc in the mdp3_ctrl.c file.

See example patch: 05_fix_mdp3_ctrl_off.patch

Screen output messed up

If the output on the screen is not aligned correctly (see picture) it's probably because you have a wrong value in /sys/class/graphics/fb0/bits_per_pixel.

You can try patching the source code by setting a different video mode (RGB/ARGB/RGBA/YCRYCB/...).

This may also help, when your X11 is segfaulting (see #779).

See example patch: 06_fix_mdss_fb_rgb_mode.patch

My screen is red!

There are some buggy framebuffer drivers (e.g. in LG Nexus 5) that report incorrect data. You can override it with:

weston --pixman-type=2

More information on issue #54

You can set deviceinfo_weston_pixman_type (see deviceinfo reference) to enable this workaround.

Proper fix is to patch the kernel: (06_fix_mdss_fb_rgb_mode.patch from lg-hammerhead, your mileage may vary)

+diff --git a/drivers/video/msm/mdss/mdss_fb.c b/drivers/video/msm/mdss/mdss_fb.c
+index 53112ca6..69673017 100644
+--- a/drivers/video/msm/mdss/mdss_fb.c
++++ b/drivers/video/msm/mdss/mdss_fb.c
+@@ -569,7 +569,7 @@ static int mdss_fb_probe(struct platform_device *pdev)
+ 	mfd->bl_level = 0;
+ 	mfd->bl_scale = 1024;
+ 	mfd->bl_min_lvl = 30;
+-	mfd->fb_imgType = MDP_RGBA_8888;
++	mfd->fb_imgType = MDP_RGB_888;
+ 
+ 	mfd->pdev = pdev;
+ 	if (pdata->next)

Screen doesn't refresh

Check if your screen refreshes when you do the following:

$ cat /sys/class/graphics/fb0/modes > /sys/class/graphics/fb0/mode

If it does, enable deviceinfo_msm_refresher (see deviceinfo reference) and add msm-fb-refresher to the depends= of your device-package. It will basically do the same automatically.

(If the above command does not refresh your screen, you could try the msm-fb-refresher anyway.)

Note Make sure you zap the device rootfs after enableing the msm refresher, otherwise it will only get installed as a service and not enabled by the postmarketos-base install script (you'll only see a second of splash-screen otherwise and the refresher won't be restarted after exiting the initramfs

Screen is blank outside of Weston

Something like that should help, see #603:

$ echo 0 > /sys/class/graphics/fb0/blank
$ echo 1 > /sys/devices/fd900000.qcom,mdss_mdp/qcom,mdss_fb_primary.134/leds/lcd-backlight/brightness