Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: HDMI screen rotation doesn't "stick"
#6
This worked on my 10.1" winaxit display to switch it to portrait orientation with the correct touch angle.

./.xinitrc
#!/bin/bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2014 The moOde audio player project / Tim Curtis
#

# Turn off display power management
xset -dpms

# Screensaver timeout in secs or 'off' for no timeout
xset s off

# Capture screen size
fgrep "#dtoverlay=vc4-kms-v3d" /boot/firmware/config.txt
if [ $? -ne 0 ]; then
   SCREENSIZE="$(kmsprint | awk '$1 == "FB" {print $3}' | awk -F"x" '{print $1","$2}')"
else
   SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"
fi
SCREENSIZE="900,1600"
DISPLAY=:0 xrandr --output HDMI-1 --rotate left
# Clear browser cache
$(/var/www/util/sysutil.sh clearbrcache)

# Launch chromium browser
chromium-browser --app="http://localhost/" \
--window-size="$SCREENSIZE" \
--window-position="0,0" \
--enable-features="OverlayScrollbar" \
--no-first-run \
--disable-infobars \
--disable-session-crashed-bubble \
--kiosk

/usr/share/X11/xorg.conf.d/40-libinput.conf
# Match on all types of devices but joysticks
#
# If you want to configure your devices, do not copy this file.
# Instead, use a config snippet that contains something like this:
#
# Section "InputClass"
#   Identifier "something or other"
#   MatchDriver "libinput"
#
#   MatchIsTouchpad "on"
#   ... other Match directives ...
#   Option "someoption" "value"
# EndSection
#
# This applies the option any libinput device also matched by the other
# directives. See the xorg.conf(5) man page for more info on
# matching devices.

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
EndSection

Section "InputClass"
        Identifier "libinput tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Here are the CalibrationMatrix options. I used the 270 deg option.
0    Option "CalibrationMatrix" "1 0 0 0 1 0 0 0 1"
90   Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
180 Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
270 Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
HDMI screen rotation doesn't "stick" - by MJR42 - 11-10-2024, 09:50 PM
RE: HDMI screen rotation doesn't "stick" - by Tim Curtis - 11-12-2024, 11:19 AM

Forum Jump: