Make the best performance on Raspberry pi 4 with XPI and Manjaro

Categori : Raspberry Pi

 

Experience with XPI and how-to make it faster and smoother in your setup.

First, I will tell I have used this configuration for over a year now, and I have almost only worked with Pi 4 as my main computer for desktop computing with email, surfing, Tinkercad design for 3d printing. Prusa slicer for 3d printing and Free Pascal/Lazarus for programming.

Issues?

I have no complaints about the system’s performance. The system works more reliability than my Mac or my Windows 10 computer. I explain in detail what I mean by these :

I feel the PI is sold as a playground for kids, seriously? Okay, that’s great, but the performance is much greater than an I/O board to get some LED’s blinking. I think the Pi computer is hardly underestimated and must be taken more seriously as an everyday computer for almost any regulars pc-users. For an LED game I recommend Arduino UNO 3, this is a lovely small computer for an electronics workshop.

Perhaps the leaks of a stable OS’s in the past (I will not go deeper here), are the reasons, but not more. Now we have Manjaro – that preform just great on the Raspberry Pi 4, and have the stability that’s are extremely high.

So I hope you join? Try it, I am almost sure you will be surprised over the stability of the OS vs Windows/macOS.

The system I use is with the power management board XPI – but you can run the system without it. Without the XPI board, you do not need the dtoverlay=gpio lines under.

Changes to the config.txt file:

gpu_mem=256
dtoverlay=vc4-fkms-v3d
arm_freq=2000
over_voltage=6
dtoverlay=gpio-shutdown,gpio_pin=21,active_low=0,gpio_pull=off
dtoverlay=gpio-poweroff,gpio_pin=20
dtoverlay=dwc2,dr_mode=host

More info : The first dtoverlay line is used by the XPI power management board to talk to the Manjaro/Raspberry Pi to start the shutdown process (no need for any script!). The second line tells the XPI board when the Raspberry Pi is idle and complete shutdown and it’s safe to turn off the power. The third line tells the Raspberry Pi to use the onboard power-USB-C port as a USB Host for other devices – booth USB 3 and USB 2 devices can be connected to the power-USB-C port on the Raspberry Pi 4. If so, you must provide power to the 5V-pins on the GPIO header on the Raspberry Pi. This works, and gives you the fifth USB port on Raspberry Pi!

Changes to the Chromium browser (chrome://flags):

Override software rendering list = Enabled
Smooth Scrolling = Enabled
GPU rasterization = Enabled
Hardware-accelerated video decode = Enabled
Zero-copy rasterizer = Enabled
Vulkan = Enabled

This WILL play full-screen video (if you have a good Internet line) in real HD, 1920×1080 pixel in your Chromiun browser! Give it a second or 2 to stabilize. It takes about 50-70 % CPU trust, so it’s no real hardware optimization here, that’s bad. Hope things get better someday. Sadly, for the moment, H264 video plays better on the old Pi 3b+…

Digging deeper

Are there no issues at all? Oh, Yes, but it has been issues that are my fault. Bad cable and connectors, bad USB to SATA cables. Low power issues. I “feed” my Pi now with 5 volts and 5 amp power supply on booth GPIO 5v-pins and the USB-C connector and believe this works ok.

I have tried all the firmware versions in over a year now. The current version is dated sometime in march 2021 now, and that works great. It was some issues when the Pi did not start/boot that has now been fixed in the March 2021 release of the firmware for the Pi 4.

Current Power problem and the Raspberry Pi 4

There are issues with the power lines on Raspberry Pi 4. This does not compute! 3 Amp max in via the USB-C connector and what is left to the 4 x USB ports? – after the main board takes what it’s needed (about 0.8 to 1.8 amp)? Remember most USB devices now only uses power from the USB line and do not come with an external power supply. Also, the Raspberry Pi 4 has “fuses” that look down the USB port, if current overload goes over about 1.2 amp per port, and also close down” the USB port if voltage goes under 4.6 volt or over 5.6 volts. This summarizes that you must provide more sources (from the same power sources) with power if you have power-hungry USB devices. Many times it’s bad because the SATA-disk reboot and the system kick’s out the USB SATA drive. The system crash! The solution is more power to everything in your configuration.

This is the only “design” error I find on Raspberry Pi 4 : It should have a separate power in connector, and not use the USB-C or Micro-USB on RPI3 to do the job. I am sure this is the main reason for the Raspberry Pi to halt in most cases.

Widevine?

I read last month Widevine for Raspberry Pi is official? Hmmm, Official? Official only for the 32-bit Raspbian Os?. Not sure what people mean, but it works great on Raspberry pi 32-bit Os whit a package name widevinecmd0 or something. So, let’s hope we will see Widevine in the daylight with a 64-bit package soon? There are some docker packages out there, you can install to get an older chromium 32-bit with Widevine to run on Manjaro, but I feel this isn’t the right way to do things. But it works while we hopefully wait for a 64-bit Widevine for Raspberry Pi.

If you do not know what Widevine is, then it is to use Spotify, Netflix, Disney plus, Amazon Prime, etc in your browser (aka play in Chromium browser).

Software to install

There is no special software to install to get this setup working. The Manjaro Pacman/Pamac installer is just a great way to add/remove software on your system. You got the latest version right in the box.

Disk and drives

I boot from SSD! I never use SD cards more. In the beginning, I tried this, but when I crapped up some big sd card and lose all my installs, I changed to only SSD drive via a USB-to-SATA cable – easy, and very stable system and a great file transfer speed. I have tried 2-3 different UASP adapters, but I have not got this to work, don’t know the way.

I will update this document if a find other useful things that will increase the performance in the system for you.

Regards
Morten Steenberg