I installed Ubuntu Server on my Raspberry Pi 4. I have a 3.5" Waveshare display for it.
Waveshare provides instructions to clone a GitHub repository and then run a script called "./LCD35-show" (https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)). I did this on Raspberry Pi OS and the display worked. With Raspberry Pi OS, after the script runs, HDMI gets switched off. However, it does not work on Ubuntu Server. The HDMI is still displaying, and the LCD is not.
I found a GitHub project which seems to have fixed the issue for Ubuntu 20.04 and Raspberry Pi 3 (https://github.com/victorbrca/waveshare35-rpi3b-ubuntu-20.04-64). I will try this out, but I'd like to understand the principles on a deeper level.
Waveshare's driver is open-source, so it seems quite possible to study how it works. I'm just curious, what is it about Raspberry Pi OS which allows their driver script to work but not for Ubuntu? What specifically is it about Ubuntu that is different and is not working?