Hyperpixel Touch Rotate Screen - current status?

I’ve read through Hyperpixel 4.0 Touchscreen Rotate with Display and HyperPixel 4 - Touch screen dimensions are swapped but I’m not sure what the exact state of display rotation (with touchscreen) for the Hyperpixel is. I tried hyperpixel4:rotate and hyperpixel4:rotate_1 but the input is still inverted in Xorg.

Do I really need to recompile stuff to get this work? Or should this work out of the box? I installed the dirvers as described in https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-hyperpixel-4

If there’s additional installation/compiling needed, a step-by-step guide would be appreciated.

It would be great to have this basic feature covered in the FAQ at https://github.com/pimoroni/hyperpixel/wiki

Trying to make sense of Hyper Pixel - Rotate I noticed that I do not have a /usr/bin/hyperpixel-touch or a hyperpixel4-touch.service - should those have been installed by the installer?

Okay, I figured it out. Turns out I was looking at the wrong repository the whole time. For the HyperPixel4 there’s a repository at https://github.com/pimoroni/hyperpixel4 which describes how to get the rotation working in the README.

It’s still a bit weird to me that the installer script isn’t doing the compile step for you. But at least I got it working in the end.

Thank you, @splitbrain! I needed this information today. Thanks for coming back with the answer.

I read the readme.md on the https://github.com/pimoroni/hyperpixel4 page and the 180 degree rotation instructions are right there.

I found that somehow I had gotten the hyperpixel4 drivers installed with working touchscreen so all I needed to do was to

sudo nano /boot/config.txt and change the following lines:

  1. Change dtoverlay=hyperpixel4 to dtoverlay=hyperpixel4:rotate
  2. Change display_rotate=3 to display_rotate=1

For anyone else trying to rotate their hyperpixel 4 screen, who is a Linux noob like me, this might be helpful to know.

if you use the pwd command on raspbian you will find you’re you’re most likely starting off in the directory /home/pi if you are logged in as user “pi.”

So for you, the “/src” folder the instructions are referring to is probably located here:
/home/pi/Pimoroni/hyperpixel4/src

You’ll have to cd /home/pi/Pimoroni/hyperpixel4/src and then run make from there.

For the persistent 180 degree rotation of my HyperPixel4 Square Touch I did the following :

  1. sudo cp /boot/config.txt /boot/config.txt.backup
  2. sudo nano /boot/config.txt
  3. Change dtoverlay=hyperpixel4 to dtoverlay=hyperpixel4:rotate
  4. Add the following line: display_rotate=3 to display_rotate=**2**

The above nicely rotates the screen 180 degree (after a reboot). However the tocuhscreen is not rotated.

For which I did:

Modified the 98-hyperpixel4-square-calibration.rules

  1. sudo cp /etc/udev/rules.d/98-hyperpixel4-square-calibration.rules /etc/udev/rules.d/98-hyperpixel4-square-calibration.rules.backup
  2. sudo nano /etc/udev/rules.d/98-hyperpixel4-square-calibration.rules
  3. Change ‘ATTRS{name}==“generic ft5x06 (11)”, ENV{LIBINPUT_CALIBRATION_MATRIX}=“1 0 0 0 1 0”’ to the following:
    ‘ATTRS{name}==“generic ft5x06 (11)”, ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 0 -1 1 0 0 1"’

The above now rotates the touchscreen 1800 degree

Per the following touch screen rotation notes:

  • 0 degrees of rotation parameters: Option “CalibrationMatrix” “1 0 0 0 1 0 0 0 1”
  • 90 degrees of rotation parameters: Option “CalibrationMatrix” “0 1 0 0 -1 1 0 0 1”
  • 180 degrees of rotation parameters: Option “CalibrationMatrix” “-1 0 1 0 -1 1 0 0 1”
  • 270 degrees of rotation parameters: Option “CalibrationMatrix” “0-1 1 1 0 0 0 0 1”

Also see : How to modify the display orientation-CTP(En) - LCD wiki