Hyperpixel 4.0 Screen not working - service fails

Y axis still not flipped correctly… how does this matrix even work?!

I think 0 -1 1 1 0 0 0 0 1 should work for you.

Which should be the same as removing display_rotate=2 from your /boot/config.txt and using hyperpixel4-rotate left in theory.

If this works you need to save it into /etc/udev/rules.d/98-hyperpixel4-calibration.rules

I never had display_rotate in my config.txt, would that be impacting anything?

Edit: y axis still isn’t flipping???

Just to confirm, you said 0 1 0 1 0 0 0 0 1 gave you a correct Y axis but an incorrect X axis?

On my setup switching from 0 1 0 1 0 0 0 0 1 to 0 -1 1 1 0 0 0 0 1 flips only the X axis.

Using hyperpixel4-rotate right
0 1 0 1 0 0 0 0 1 : y axis flipped x axis correct
0 -1 1 1 0 0 0 0 1 : y axis flipped x axis correct

Judging by the fact both of those transformations produce the same result, I’m guessing they are having no effect whatsoever which might explain a thing or two.

What do you see if you run:

xinput list-props “pointer:Goodix Capacitive TouchScreen”

It might be that you need to change libinput Calibration Matrix instead, perhaps.

Solved!

After gadgetoid and I had a muck around with different matrix setups, this is the one needed when rotating the screen right:
-1 0 1 0 1 0

Input this into /usr/bin/hyperpixel4-rotate, replace the $ORIENTATION == right if statement with

if [ "$ORIENTATION" == "right" ]; then
set_display $ORIENTATION
set_matrix -1 0 1 0 1 0
exit 0
fi

Hi there!
You could be my saver… :)
Could you please send me the matrix setup when rotating the screen left?
Thanks a lot!

What specifically do you want to know? I believe my previous comment where I detailed the solution to this problem was sufficient. I will copy it:

Input this into /usr/bin/hyperpixel4-rotate , replace the $ORIENTATION == right if statement with

if [ "$ORIENTATION" == "right" ]; then
set_display $ORIENTATION
set_matrix -1 0 1 0 1 0
exit 0
fi

Yes… Your solution works very well if I use the rotation to the right (with the USB-C power port up).
I need to use my raspberry with the power port down, so I have to run hyperpixel4-rotate left command in terminal. In this situation, my touchscreen doesn’t act as it should (if I move to the right the cursor moves to the left, and if I move up the cursor moves down)…
That is why I will need to modify that file in this section:
if [ "$ORIENTATION" == "left" ]; then
set_display $ORIENTATION
set_matrix -1 0 1 0 1 0
exit 0
fi

Could you please help me with the good matrix values?

You’ll need to look up a matrix transposing calculator online and do trial and error until you find the one which suits the current format of your screen. I don’t have your setup so I can’t really test myself.

Try ncase.me/matrix/

OK… So, if anybody have problems with hyperpixel4 display on Pi4 this is how need to be done:

A. Landscape / USB-C charging port down:

1. modify /usr/bin/hyperpixel4-rotate
if [ "$ORIENTATION" == "left" ]; then
set_display $ORIENTATION
set_matrix 1 0 0 0 -1 1
exit 0
fi
2. run in terminal: hyperpixel4-rotate left

B. Landscape / USB-C charging port up:

1. modify /usr/bin/hyperpixel4-rotate
if [ "$ORIENTATION" == "right" ]; then
set_display $ORIENTATION
set_matrix -1 0 1 0 1 0
exit 0
fi
2. run in terminal: hyperpixel4-rotate right