Screen Calibration

From postmarketOS
Jump to: navigation, search

Framebuffer

On most Android devices, a somewhat working framebuffer is required to get Weston and other Wayland compositors running. The alternative to framebuffer would be DRI.

If your framebuffer does not work out of the box, try the following:

  • Boot TWRP/Android and read out the correct framebuffer configurations from the /sys... paths and try to set them in pmOS
  • If you made it work, create an initfs hook, that instantly sets the framebuffer right. Example

If the screen looks laggy, it might be a known issue with refresh rate. It can be solved by hardcoding the refresh rate in the video driver, see mdss_fb_refresh_rate.patch.

Weston

Relevant syslog entries: logread -f | grep weston
  • Make sure, that Weston runs on the device
  • Look in the logs (via SSH) for the touch device name. For lg-mako, the name is touch_dev, but it may be different for your device.
  • Copy 90-android-touch-dev.rules from device-lg-mako to your device's aport. Replace touch_dev with your touch device name. Adjust the APKBUILD, so it gets installed properly (Example)
SUBSYSTEM=="input", ATTRS{name}=="touch_dev", \
ENV{ID_INPUT}="1", ENV{ID_INPUT_TOUCHSCREEN}="1"

Reload udev rules:

# Reload all rules
udevadm control --reload
# Re-apply those rules on all devices
udevadm trigger
  • This calibration will probably just work fine. If it does, you are done here, otherwise read on.

weston-calibrator (needed for resistive touch screens)

  • Connect to your phone via SSH
  • Run weston-calibrator
  • Adjust your udev rules-file to the output from weston-calibrator (example).