Fix Qt touch rotation when using display_lcd_rotate=2 on Venus OS 3.73+#51
Fix Qt touch rotation when using display_lcd_rotate=2 on Venus OS 3.73+#51sragneau wants to merge 1 commit into
Conversation
When the alternate rotate command (display_lcd_rotate=2) is chosen, the display rotates but the touchscreen does not. On Venus OS 3.73+, ts_calibrate cannot display calibration targets because the KMS framebuffer is not accessible without the GUI running. Fix: inject QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS with rotate=180 into start-gui.sh when altRotateDisplay is active. This makes Qt rotate touch events to match the display rotation without requiring ts_calibrate. The patch is applied/removed automatically on each install/reinstall, so it survives Venus OS updates (which overwrite start-gui.sh). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thanks for your work. Before I incorporate this, a couple of things should be discussed and addressed. UNINSTALL does not remove the patch to start-gui.sh What impact does this have with versions of Venus OS prior to v3.73? The package is currently compatible back to v2.73 but I have moved most of my packages to v3.10 being the first compatible version. I just missed RpiDisplaySetup. What impact does this have on HDMI displays? SetupHelper does have a file patching mechanism that is might be a better solution. It provides a mechanism to detect conflicts with other packages that modify the same file. However, I'm not sure how to address this if Venus OS versions prior to v3.73 need to remain unpatched. Any change to a package must also update the version and changes files. |
Problem
When using the alternate rotate command (
display_lcd_rotate=2), the display rotates correctly but the touchscreen does not follow. On Venus OS 3.73+, the usual fix (runningts_calibrate) no longer works because:ts_calibratecannot display calibration targets on the KMS framebuffer when the GUI is stoppedstart-gui.sh) usesQT_QPA_PLATFORM=linuxfbwith direct evdev input — it ignores/etc/pointercalentirelyFix
Inject
QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/touchscreen0:rotate=180intostart-gui.shwhen thealtRotateDisplayoption is active. This makes Qt rotate touch events 180° to match the display rotation.The patch is:
altRotateDisplayis setstart-gui.sh(which gets overwritten by Venus OS updates) is automatically re-patchedTested on
display_lcd_rotate=2)Note
ts_calibratestill works fine for fine-tuning once the rotation is correct, but the initial rotation fix must go through Qt's evdev parameters on Venus OS 3.73+.