1 min read

Get HyperPixel 4.0 working horizontally for Octodash

Get HyperPixel 4.0 working horizontally for Octodash

Recently I managed to corrupt my Octopi SD-card by pulling the power plug while it was updating.

Everything was up and running again relatively quickly, but one thing I could not get to work -no matter what I tried- was horizontal screen orientation for my Pimoroni Hyperpixel 4.0 display and OctoDash.

Finally, I got it to work with these steps.

Install the Hyperpixel overlays:

curl https://get.pimoroni.com/hyperpixel4 | bash

Pick option 2:

Make sure you load the 3D-driver

Check that your /boot/config.txt includes dtoverlay=vc4-fkms-v3d

Install xinput

sudo apt install xinput

Change your .xinitrc

Change your /home/pi/.xinitrc as follows:

#!/bin/shxset s offxset s noblankxset -dpmsratpoison&DISPLAY=:0.0 xrandr --output DSI-1 --rotate leftDISPLAY=:0.0 xinput set-prop "pointer:Goodix Capacitive TouchScreen" "libinput Calibration Matrix" 0 -1 1 1 0 0 0 0 1octodash

Reboot!

You should now have a rotated Octodash screen with correct touch inputs.