HyperPixel 4 touch orientation/calibration issue

Hi everyone,

I have just installed my nice shiny new HyperPixel 4 on my nice shiny new RPi4 (1Gb).

installed Buster and did all updates and upgrades to the base OS. Nothing else has been installed. I followed the instructions (Pi is headless BTW) provided on the website and used:

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

Everything seemed to work at first, I selected the Pi4 rectangular option and it installed all the necessary libraries with no apparent errors. After a reboot the Raspbian desktop displayed nicely on the panel. However the touch X/Y seems to be inverted. If I swipe up/down on the screen the cursor moves Left/Right and if I swipe Left/Right the cursor moves Up/Down.

I’d be grateful for any guidance or links to any fixes for this issue please.

Thanks in advance

Ian

I do believe I’ve seen a few posts along these lines. I think its something Buster does differently from Stretch etc. If you can figure out what to search for you may find a solution.
https://forums.pimoroni.com/search?q=hyperpixel%20touch%20issue%20

Many thanks for the quick reply @alphanumeric.

this post:

  https://forums.pimoroni.com/t/hyperpixel-touchscreen-rotation-touch-fix-after-update/11078

sounds similar to my issue. I’ll try the suggested fix and post back my progress when I can on my Pi tonight.

cheers

Ian

Hopefully you find something that works.

I think the last minute Pi 4B release caught a lot of people out. Especially since it seems Buster wasn’t even officially released when the foundation released the Pi 4B. IMHO The Pi Buster release is still a work in progress.

Hi Folks. I’ve got a shiny new Pi 4 and a shiny new hyperpixel rectangle. I’ve tried a couple of different install methods, but I seem always to end up with either a veritcal display, or touchscreen input not matching my orientation.

I did a fresh raspbian (full) install, then ran the curl script. The result is the vertical (top near USB ports) display, with touchscreen oriented on same axis.

This is the diff of /boot/config.txt after running the curl |bash script in the instruction html page, and selecting pi4/rectangle:

dtoverlay=hyperpixel4
gpio=0-25=a2
enable_dpi_lcd=1
dpi_group=2
dpi_mode=87
dpi_output_format=0x7f216
dpi_timings=480 0 10 16 59 800 0 15 113 15 0 0 0 60 0 32000000 6

I also tried these instructions:

Which would let me rotate the display, but not the touchscreen orientation. Possibly I’m missing something inferred on that page… I assumed there were typos in the sed cmds (they failed to parse, and seem to duplicate setting x instead of switching x & y!)… but correcting for that still resulted in a mix-up of touchscreen and display orientation.

My goal is to get it 800 wide by 480 high, and stick either the application kodi (inside x/rasbian!) or get libreelec working with kodi, so I can set up a little music streaming bluetooth player on the screen, and have the pi do some other various housekeeping for me in the background.

Does anyone have a working method to get this working with all the latest as of Sept 10th 2019 distro/install scripts/etc?

Thanks for your attention

Some new/mixed results after another couple hours of late experiments. I can use the hyperpixel-rotate script to get a successful screen rotation. That works in X (default on text mode is still portrait!). With a little muddling around in the screen layout panel (It thinks it is connected to 2 screens!), I can resolve the tracking problem… put the “HDMI” screen under the HP4, and apply taskbar to the HP4 screen. This seems to set sizes and tracking of mouse just right. Downside is this doesn’t persist, each reboot I have to re-do that. I wonder if some other posters might have this “hidden second screen” on a span desktop layout causing these mouse/touchscreen tracking issues, there seems to be some strange behavior where you can lay them on top of each other.

ok, so finally some results.

The astute among you may notice the goatse mug, old school penguin computing tux plushie, and the 3d-printed moomin.

The process I needed to make this work on a pi4 was:

  1. Clean install rasbian
  2. Use the curl script to install

This got me the portrait layout with working / correctly mapped touch. I wanted landscape though (800x480 vs 480x800!), so:

  1. do the fresh checkout, re-compile the overlay, copy into /boot.
  2. start x
  3. run hyperpixel4-rotate “right” I think I used (power plug on top)

Now I had the display oriented correctly, and mouse tracking on correct axis for touchscreen… but the mapping was off by a lot, I noticed the touch position was far from correct…

  1. Open the preferences…screen configuration tool… I noticed it showed both HDMI-1 and Dsl-1. They were defaulting to overlap (mostly!), and the unused screen was rotated to portrait. The desktop was trying to span 2 screens for some reason, and one was rotated. This caused the taskbar to be shortened, and the mouse tracking to be off… also the window manager thought there was more virtual real-estate below the touch screen.

  2. rotate the unused screen (it strangely varied between Dsl-1 and HDMI-1, not sure why!) so they are both in portrait. Put hdmi-1 over Dsl-1. Apply

  3. Go into the preferences… appearance settings config item. Uncheck “show identical desktop on second monitor” if selected (on both ds1-l and hdmi-1!). Set taskbar on dsl-1 in the “location” item. This makes it snap to the full width of the touchscreen.

  4. shut down, and be quite patient before removing/reapplying power… and it doesn’t hurt to run a sync before too! I think this was why my settings weren’t persisting, I wasn’t waiting long enough on shutdown before powering back up.

So now… here we are… landscape display, 800x480, touchscreen mapping correct, and settings persisting. I still see a few boot messages in portrait mode, but this is the best working solution I’ve found…

I think my suggestion to devs would be to add a couple questions in the install curl/bash script for orientation- that would save a lot of headaches! If you can please ask the user to choose portrait or landscape (or USB on top/bottom, power plug on top/bottom as options) during the setup, this would go sooo much quicker. Probably a default disabling of the second desktop would be a help too, as that was a significant hassle to find out why my touchscreen wasn’t tracking properly with this virtual desktop arrangement…

Most of my configuration work was done via SSH from a PC too. Having that as an option or even a warning in the install script (“it’s a good idea to have ssh working before you apply this config in case anything doesn’t work”) might also help!

I suspect there was a better / quicker way to do this too, so I’m all ears and willing to start fresh again!