Old SD on a new RPi 4B results in weird display lines

Hi, what a nice new forum on Discourse, congrats!

My trouble is that I’ve replaced my old RPi 4B 4GB ram, that I use as a Pi-Hole, for a new one with 1GB (the one with 4GB will be used for another task), so I simply swapped the microsd and display to the new one. Everything works perfectly as expected BUT a weird thing happened to the display…. Now looks weird, like the bash colors are weird read by DietPI but the microsd is the same, I also updated the RPi firmware to have the latest (just in case…) but no luck.

I have no idea on what to try because I have no idea what can cause this weird situation, pictures explain better:

Old RPi

New RPi (see the horizontal lines that are…uh, weird…)

on a first guess, it looks like the HDMI port is not correctly plugged in or has some challenges.

It’s connected via GPIO :thinking:

This one: HyperPixel 4.0 - Hi-Res Display for Raspberry Pi - Pimoroni

Maybe I have to reinstall “the driver” because I’ve just noticed that Pimoroni has updated the tutorial for Bullseye. I’ll try… but anyway it’s weird because, if it was working fine 5 minutes before with the other RPi, there’s no reason why it’s weird now. I hope that I haven’t damaged something on the rear, but to me look like a software issue, not hardware, because it’s only on some fonts :thinking:

Raspberry Pi OS Bullseye includes major changes to how DPI display drivers work. If you’re using an image dated 04/04/2022 or later, it will come with Hyperpixel drivers baked in and you don’t need to run the installer. You can set up display and touch by adding a few lines to your boot/config.txt:
PSA: HyperPixel 4 (Square & Rectangular) on Raspberry Pi OS 2022-04-04

If you’re using Raspberry Pi OS Buster/Legacy (or an earlier version), you can use our one-line-installer to configure your Pi properly for HyperPixel 4.0 and to enable the touch screen on the touch version. Note that you’ll need another display, keyboard, and mouse to install the software, or you could do it remotely over SSH if you follow our guide on how to set your Pi up headlessly.

Open a terminal, and type curl https://get.pimoroni.com/hyperpixel4 | bashto run the one-line installer and set your HyperPixel 4.0 up.

well if you simply switch the SD card, the software did not changed. How does it looks like if you swap SD card back into the original divice?

It’s about the dashes being red instead of white, or do I miss another difference? I see the PADD version is shown in red, which probably indicates that an update is available (yes it is: Releases · pi-hole/PADD · GitHub)? Probably PADD has a bug then showing more in red than intended? Try to update PADD and see whether colours are again as before.

I tried to upgrade the hyperpixel with new setup but I get some error with python:

./install.sh 
Job for hyperpixel4-init.service failed because the control process exited with error code.
See "systemctl status hyperpixel4-init.service" and "journalctl -xe" for details.
Installed: /usr/bin/hyperpixel4-init
Installed: /etc/systemd/system/hyperpixel4-init.service
Installed: /boot/overlays/hyperpixel4.dtbo

And

root@Pi-Hole:/home/dietpi/hyperpixel4# systemctl status hyperpixel4-init.service
● hyperpixel4-init.service - HyperPixel 4.0" LCD Display Initialization
     Loaded: loaded (/etc/systemd/system/hyperpixel4-init.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2022-05-25 14:18:55 CEST; 1min 43s ago
    Process: 20958 ExecStart=/usr/bin/hyperpixel4-init (code=exited, status=127)
   Main PID: 20958 (code=exited, status=127)
        CPU: 4ms

May 25 14:18:55 Pi-Hole systemd[1]: Starting HyperPixel 4.0" LCD Display Initialization...
May 25 14:18:55 Pi-Hole hyperpixel4-init[20958]: /usr/bin/env: ‘python’: No such file or directory
May 25 14:18:55 Pi-Hole systemd[1]: hyperpixel4-init.service: Main process exited, code=exited, status=127/n/a
May 25 14:18:55 Pi-Hole systemd[1]: hyperpixel4-init.service: Failed with result 'exit-code'.
May 25 14:18:55 Pi-Hole systemd[1]: Failed to start HyperPixel 4.0" LCD Display Initialization.

So I installer python-is-python3

root@Pi-Hole:/home/dietpi/hyperpixel4# sudo apt install python-is-python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  python-is-python3
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 2800 B of archives.

And the installer went fine:

root@Pi-Hole:/home/dietpi/hyperpixel4# ./install.sh 
Installed: /usr/bin/hyperpixel4-init
Installed: /etc/systemd/system/hyperpixel4-init.service
Installed: /boot/overlays/hyperpixel4.dtbo
Skipped: dtoverlay=hyperpixel4 already exists in /boot/config.txt
Skipped: enable_dpi_lcd=1 already exists in /boot/config.txt
Skipped: dpi_group=2 already exists in /boot/config.txt
Skipped: dpi_mode=87 already exists in /boot/config.txt
Skipped: dpi_output_format=0x7f216 already exists in /boot/config.txt
Skipped: dpi_timings=480 0 10 16 59 800 0 15 113 15 0 0 0 60 0 32000000 6 already exists in /boot/config.txt

But after reboot the display orientation was wrong (in portrait), and:

root@Pi-Hole:~# hyperpixel4-rotate left
HyperPixel 4: Square - Display/Touch Rotation
This rotate utility only works with the Raspberry Pi OS desktop version or X-based alternatives.

Rotation requires hardware support on the Pi 4 or Pi 400
Ensure "dtoverlay=vc4-fkms-v3d" is enabled in /boot/config.txt

So I added hyperpixel4-rotate left to /boot/config but didn’t work :angry:

Then I tried to add display_rotate=3 in /boot/config aaaaandddd…

:partying_face:

This did the trick :grin: damn, it was difficult to use a screen… :rofl:

So -for other DietPI users- you have to first install python-is-phyton3 to have the files in the correct place for Pimoroni script, then install the Pimoroni script, then change the display layout via display_rotate=3 in /boot/config.

Now the screen colors are also correct, I have no idea why those weird lines without the upgrade.

I already tried to update PADD and reboot, by the way I’m running it with my custom code, but the red weird text/line/whatever was still there. I think it was something with the hyperpixel4-overlay.dts old file in /boot/src

Probably the maintainer of the script would need to update to explicitly use python3 instead of the unversioned /usr/bin/python.

Fully agreed, completely irresponsible to STILL ship trivial scripts as Python 2 scripts, which is officially EOL since 2.5 years now, with Python 3 is available now for 14 years (!), which should have been sufficient for any developer to migrate its software to…

However, I’m glad that it works now. Was the red colour now due to the available PADD update, or an issue with the LCD driver?

/boot/config.txt does not allow to enter commands to execute, but it has a strict set of settings :smile:. For HDMI use display_hdmi_rotate, for other LCDs use lcd_rotate:

The red color was an issue with the driver, not related to the available update.

boot/config.txt does not allow to enter commands to execute, but it has a strict set of settings :smile:

Damn, I realized only now it is a command and not a text to add inside boot/config :sweat_smile: for that it wasn’t working, what a stupid!