Driver for the Pimoroni HyperPixel 4.0" Touchscreen Display
HyperPixel 4.0 is an 800x480 or 720x720 pixel display for the Raspberry Pi, with optional capacitive touchscreen.
This repository contains several branches for different combinations of Pi and HyperPixel4 boards.
You should use our one-line installer to install HyperPixel4 Rectangular and Square:
curl -sSL https://get.pimoroni.com/hyperpixel4 | bash
When prompted, pick the combination of Pi and touchscreen that you're planning to use.
Note: A HyperPixel4 setup for Pi 3B+ or earlier will not readily work if you move it over to a Pi 4, you should run this installer again to update the drivers.
Here's a list of active branches and which Pi/display combination they support:
hyperpixel4-rotateto rotate once installed
To clone a specific branch to your Pi, run:
git clone https://github.com/pimoroni/hyperpixel4 -b
cd hyperpixel4and run
sudo ./install.shto install it.
HyperPixel4 is a portait display, so on first boot it will start in portrait mode with the USB ports at the top.
On Pi 4 we can take advantage of the rotation available in Display Configuration, and provide you with a command for setting both display and touch rotation together.
To rotate HyperPixel4 on a Pi 4 use the
Landscape mode, HDMI/power ports on the bottom:
Landscape mode, HDMI/power ports on the top:
Portrait mode, USB ports on the top:
Portrait mode, USB ports on the bottom:
If you're running this command over SSH you should prefix it with
Note: You must build the latest dtoverlay file to enable rotation support:
maketo build a new hyperpixel4.dtbo with rotation support
sudo cp hyperpixel4.dtbo /boot/overlays/
To rotate your HyperPixel4 you must edit /boot/config.txt and change the following lines:
This will rotate both the display and the touchscreen input to match.
If you're using a non-touchscreen HyperPixel4 you need only change
:warning: for Xorg-based operating systems running on Pi 4 and Pi 400 :warning: must have
You can use xrandr and xinput to rotate the display and touchscreen in turn.
For HyperPixel Square, substitute the device name with "pointer:generic ft5x06 (11)".
DISPLAY=:0.0 xrandr --output DSI-1 --rotate left DISPLAY=:0.0 xinput set-prop "pointer:Goodix Capacitive TouchScreen" "libinput Calibration Matrix" 0 -1 1 1 0 0 0 0 1
DISPLAY=:0.0 xrandr --output DSI-1 --rotate right DISPLAY=:0.0 xinput set-prop "pointer:Goodix Capacitive TouchScreen" "libinput Calibration Matrix" 0 1 0 -1 0 1 0 0 1
DISPLAY=:0.0 xrandr --output DSI-1 --rotate normal DISPLAY=:0.0 xinput set-prop "pointer:Goodix Capacitive TouchScreen" "libinput Calibration Matrix" 1 0 0 0 1 0 0 0 1
DISPLAY=:0.0 xrandr --output DSI-1 --rotate inverted DISPLAY=:0.0 xinput set-prop "pointer:Goodix Capacitive TouchScreen" "libinput Calibration Matrix" -1 0 1 0 -1 1 0 0 1
Add the relevant settings from above into
You will need the device name:
And the 9 numbers from the "Calibration Matrix", eg:
-1 0 1 0 -1 1 0 0 1
Plus the rotation direction for the monitor.
Section "InputClass" Identifier "libinput HyperPixel4 Rectangular" MatchProduct "Goodix Capacitive TouchScreen" Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1" EndSection
Section "Monitor" Identifier "DSI-1" Option "Rotate" "left" EndSection
If you're using lightdm (the default window manager on Raspberry Pi OS) and it's calling
/usr/share/dispsetup.shyou'll need to either disable that call in
exit 0. Removing
dispsetup.shwill break lightdm and boot you to a black screen of death.
dispsetup.shand override your Xorg settings
/etc/lightdm/lightdm.confwill prevent "Screen Configuration" settings for persisting.
hyperpixel4-rotateunless you really know what you're doing!
Where possible we are collecting known FAQs under the
noticelabel in our issue tracker. Issue Tracker
If your issue is not covered by one of these provided by our team and community then we ask you to provide some debugging information using the following oneliner:
curl -sSL https://raw.githubusercontent.com/pimoroni/hyperpixel4/master/hyperpixel4-debug.sh | bash
Then file a bug report.