Fortunately this worked. Unfortunately, I don't know which one worked. I tried a but of each along whit what was here https://www.raspberrypi.org/documentation/configuration/config-txt/video.md and the problem is fixed now.
I tried Ubuntu for a while, then gave up. However, I do think I'll try it again, and here's why:
When I tried to use it before, I had a class 7 SD card. Now that I have a class 10 SD card, Raspbian/Ubuntu, for that matter, is much snappier. And, instead of a user developed OS, I would use the official Ubuntu from here:
The RPI4 with the current firmware can boot from USB.. However what I think is happening in your case is it's booting from the SD card then it's remounting the drives of the USB drive.
In RPIOS the SD card boot partition cmdline.txt contains the UUID of the root file-system. But Ubuntu uses a label 'Writable'.
You can view the label and UUID information ...
Easily done and its good to play..
Login to your machine via the console.. and use your editor of choice to edit /etc/netplan/50-cloud-init.yaml.
driver: bcmgenet smsc95xx lan78xx
Here is my script that puts things together: Gist link: Install RealVNC server on arm64 Linux
mkdir realvncserversetup && cd realvncserversetup
echo Add armhf arch
sudo dpkg --add-architecture armhf && sudo apt update
echo Download and install RealVNC server
wget -nv https://www.realvnc.com/download/file/vnc.files/VNC-Server-6.7.4-Linux-ARM....
It is possible to set gpu_mem to larger values, however this should be avoided since it can cause problems, such as preventing Linux from booting.
The minimum value is 16, however this disables certain GPU features.
Memory options in config.txt
First, as indicated in this link one can inspect which kernels are installed using:
dpkg -l | grep linux-image
which can return something like:
.. linux-image-5.11.0-1007-raspi ..
.. linux-image-raspi ..
which I believe are kernel versions.
Next one can set these kernel versions to hold using the interpretation of the commands from this link:
This script named first_run.sh asks you for your wifi ssid and wifi password and automatically connects your Raspberry Pi 4 to your wifi:
# Verify internet access is available
while [ $(ping -q -w1 -c1 google.com &>/dev/null && echo online || echo offline) == offline ]
# get wifi module