I decided to put a Raspberry Pi 4 on the downstairs TV, with the vague idea of watching streaming media. We already have an Apple TV and a Chromecast, but their mirroring is always more complicated and lower quality than advertised.
Getting set up was easy. Bought an 8GB CanaKit on Amazon and it arrived in one day. I used the default install of 32-bit Raspberian OS as a test, then installed 64-bit Ubuntu. The only hiccup was using 20.04 LTS, which didn’t come with an included user interface. No problem, I can install Gnome. Except modern Ubuntu servers seem to secretly do a security update in the background by default, which blocks any other updates or installs. Once I figured this out it was off to the races.
I went to YouTube for a video test and the results were disappointing. Slow, pixelated and choppy. I know the processor in the Raspberry Pi 4 has a pretty decent Graphics Processor (GPU) so performance should be better. A bit more Googling showed it needed to be enabled at the kernel level.
Some earlier postings showed how to rebuild libraries and the kernel, but that seemed like too much work. It did look like later postings using more recent kernels could enable the GPU with a single line in a configuration file and a reboot. I gave it a try, adding the lines below to the /boot/firmware/usercfg.txt file.
The first line just fixes the annoying black borders around the display and allows the full screen to be used at full resolution. I’m not sure why this isn’t the default. The second line enables the GPU. After a reboot you can tell if it works by looking at the Graphics field in the About page in Settings as below. The default (slow) software graphics interface is called llvmpipe. It should now say V3D, the 3D “Vulcan” graphics driver.
After this change video was smooth and fast, even in a browser. I was impressed. It also seems to help with regular desktop rendering. You may also need to do special enabling in applications such as Chrome and VLC.