Waveshare AMOLED on Pi5 and Pi4 with GPU acceleration

Hello together,

I use the Waveshare AMOLED 5.5 (1080x1920) display on a Pi4 for a long time. This display needs a rotation to use it in landscape format. The official touchscreen plugin from gVolt do this perfectly, but with the standard rotation commands in boot\userconfig.txt. Therfore the performance of Volumio UI is horrible with fullHD resolution. Scrolling in chrome is slow and the new Manifest UI with transparences is very slow.
Now I have start a new try with grafic driver vc4-kms-v3d in boot\userconfig.txt. If this driver is active the standard rotation and timing commands in userconfig.txt are ignored. This driver works with a correct EDID response over HDMI. In some circumstances the Waveshare gives no correct timing response. So the display shows a part of content and rotation with xrandr not working.

The solution for this dilemma is to use an offline EDID binary file. I have create this file with correct EDID data for this monitor and define it for HDMI-A-1. The rotation is now set with xrandr (the rotation in /etc/X11/xorg.conf.d was not stable - black screen at startup from time to time). The result is a working rotated display with smooth scrolling in UI and the new Manifest UI is running very smooth on Pi4 and Pi5.

I have add now two versions of installation.

  1. installation with a working EDID from monitor. For this version you don’t need to implement the binary EDID file

  2. installation with overwriting the monitor EDID with a local EDID binary file

What is to do exactly:

in Touchscreen plugin do the follow settings:

  • be shure the rotation is set to 0 in Touchscreen plugin
  • enable the GPU mem with 64Mb in Touchscreen plugin
  • set scale factor to 200%
  • Restart with this values

to install the files you can use the install_amoled.sh:

  • expand the folder and copy it to /home/volumio
  • make the install_amoled.sh executable
chmod +x /home/volumio/Install_amoled_EDID/install_amoled.sh
or
chmod +x /home/volumio/Install_amoled_noEDID/install_amoled.sh
  • start the installation
/home/volumio/Install_amoled_EDID/install_amoled.sh
or
/home/volumio/Install_amoled_noEDID/install_amoled.sh

for manually step by step:

  • add this lines in /boot/userconfig.txt
max_framebuffer_height=1920
config_hdmi_boost=10
hdmi_group=2
hdmi_mode=87
hdmi_timings=1080 1 26 4 50 1920 1 8 2 6 0 0 0 60 0 135580000 3
hdmi_drive=1
hdmi_blanking=1
dtoverlay=vc4-kms-v3d,cma-256
  • copy the config file for X11 to use the KMS driver
sudo cp -f 96-amoled_mode.conf /etc/X11/xorg.conf.d
  • copy the xrandr rotation command file to start it with X11 start
sudo cp -f 55x11-rotate_display /etc/X11/Xsession.d
  • shutdown Volumio and powerOff the Pi
    With next powerOn the boot screen start in portait mode and the display rotate with starting the x-server.

Only if your display not working you need the following steps to use the static EDID binary file.

  • copy the EDID file to /lib/firmware
cd /home/volumio/Install_amoled_noEDID
sudo cp -f AMOLED_1080x1920.bin /lib/firmware
  • add this entry to /boot/cmdline.txt with space as separator
drm.edid_firmware=HDMI-A-1:AMOLED_1080x1920.bin
  • optional you can do some chrome optimization commands for gpu using in /opt/volumiokiosk.sh
    --enable-smoth-scrolling \
    --enable-gpu \
    --enable-low-res-tiling \
    --enable-native-gpu-memory-buffers \
    --enable-gpu-rasterization \
    --enable-zero-copy \
    --disk-cache-dir='/tmp/chromium' \

Now you can test the usability of the new or old UI.
I can’t give a guarantee all is experimantal

Download
Install_amoled_EDID.zip (1.1 KB)
Install_amoled_noEDID.zip (1.8 KB)

After any systemupdate start the installation again or add the entry in /boot/cmdline.txt again.
(only if you use the binary EDID file)
It’s possible it is overwritten.

The first download with a running EDID is also working with other displays, witch have trouble on Pi5

I’m looking forward to a feedback
best regards
2aCD

1 Like

@2aCD

Welcome back.

I was very excited to see this post. I’ve been trying to use this screen for a while, but the terrible performance when rotated to landscape mode made the whole system un-usable.

I downloaded the zip file, and ran the installation as you instructed above. Upon reboot, I see the manifest UI appear on the Waveshare screen for a second or two, then it goes black, and I can’t get it back without uninstalling and reinstalling the Touch Screen plugin. Once reinstalled, I get the UI for about 1-2 seconds again. Any thoughts?

I take it back. It turns out it was a bad connector. It appears to be working well. I’ll continue testing and let you know if I come across any issues.

@Jon
I had also the black screen at startup from time to time, not always.
It was not a cable problem. The rotation command in xorg.config.d was not stable working.
Therefore I have it moved to a separate xrandr command and put it in autostart of X11
This is working now very stable without black screen on 100 restarts.
Also the binary file is updated with some manufacturer informations