HyperPixel 4.0 Screen Won't Rotate

I’m trying to rotate my HyperPixel 4.0 Screen to be in landscape mode with the power on the Raspberry Pi 4 on the bottom of the screen.

Currently it is stuck in the default portrait mode and won’t rotate.

I’ve edited the boot/config.txt file to amend:

  • Changed dtoverlay=hyperpixel4 to dtoverlay=hyperpixel4:rotate
  • added display_rotate=3 to display_rotate=1 (display_rotate did not exist on a line before I added it if that matters??)

Next I used:

hyperpixel4-rotate left

I got the following error:

Rotating display
Can’t open display
Traceback (most recent call last):
File “”, line 3, in
ImportError: No module named screenlayout
Setting matrix: 0 -1 1 1 0 0
usr/bin/hyperpixel4-rotate: line 10: xinput: command not found
Saving touch settings to /etc/udev/rules.d/90-hyperpixel4-calibration.rules

Any help would be appreciated.