There’s an alternate driver for the HyperPixel4 touchscreen which might help- details here- https://github.com/pimoroni/HyperPixel4TouchScreen/tree/master/driver
And also discussed at great length here: https://github.com/pimoroni/HyperPixel4TouchScreen/tree/master/driver
Granted this repository doesn’t tell you that you need to make build
and make install
to replace the hyperpixel4.dtbo
with a modified one before using the rotation commands documented at the top. ( I need to fix that )
Edit: For clarity the rotation settings specified in the normal hyperpixel4.dts for the normal driver are just for 0 and 180 degrees landscape modes. It’s been a while, but I think I remember issues with portrait that the alt driver fixed.
Edit 2: for brevity:
wget https://github.com/pimoroni/HyperPixel4TouchScreen/releases/download/v1.0/hyperpixel4-goodix-dkms_1.0_all.deb
sudo dpkg -i hyperpixel4-goodix-dkms_1.0_all.deb
git clone https://github.com/pimoroni/HyperPixel4TouchScreen
cd HyperPixel4TouchScreen/driver
make build
sudo make install
And then in /boot/config.txt
use:
-
dtoverlay=hyperpixel4:rotate_0
- Portrait, USB ports on top -
dtoverlay=hyperpixel4:rotate_1
- Landscape, USB ports on left -
dtoverlay=hyperpixel4:rotate_2
- Portrait, USB ports underneath -
dtoverlay=hyperpixel4:rotate_3
- Landscape, USB ports on right
These all match the number you supply to display_lcd_rotate=
.
Note: both Portrait orientations must have framebuffer_width=480
and framebuffer_height=800
specified instead of the defaults in /boot/config.txt
.