Raspberry Pi with Ubuntu Server 24.04 LTS, X11, and XFCE
Recently I was tasked with a project using a Raspberry Pi 5 running Raspberry Pi OS specifically using the X11 graphics server with the XFCE desktop. For those that are unfamiliar, a Linux graphics server is a bit like DirectX if you’re still silly enough to be using Windows. The software we were using used tooling that required X11, and since X11 has been around since the late 80’s, there’s a lot of support for it in software that was made in the last few decades. Some Linux distributions these days are starting to follow corporate lead of RedHat and implementing RedHat’s Wayland graphics server for their desktop’s, including Ubuntu and Raspberry Pi OS. However, Raspberry Pi OS has up until very recently still supported X11. For whatever reason (I think it’s because the Raspberry Pi folks are very focused on implementing a new sound server, Pipewire, into their OS), the latest release of Raspberry Pi OS totally borked over our X11 installs and ruined the devices we had running with them.
Some of you might say it’s my own fault for using Raspberry Pi OS on a device that needed a more stable OS, and that would be a fair assessment. The Raspberry Pi OS is not considered a “stable” OS, which means that critical systems can change with subsequent releases.
So, to solve that issue and help prevent further issues in the future, I’m now working on getting the software we’re using to run on a stable OS but also have that stable OS work with X11-based desktop (like XFCE), which my software needs. In my case, I’m opting to use Ubuntu Server 24.04 LTS which is the latest Long-Term-Support (LTS) release at the time that I’m writing this.
Install Ubuntu Server 24.04 LTS
To install Ubuntu Server 24.04 LTS, I just used the Raspi Imager, and selected it from the list of Generic OS options. Once it was installed, I poped it into my Raspi 5 and ran the update process on it:
sudo apt update && sudo apt upgrade -y
Install the XFCE Desktop
If you haven’t seen it yet, there’s a specific Ubuntu distribution that includes the XFCE desktop called Xubuntu. for folks who are looking for a very light build that runs on older laptops or SBC’s or just for folks who want a light desktop system (like me!). The good people at Ubuntu and likely a lot of awesome volunteers have done an amazing job of packaging XFCE into a sweet little package simply called “xubuntu-desktop” which is a huge group of packages that can turn Ubuntu Server into essentially an Xubuntu Desktop system with the stability of a server. MMMM…. smells like freedom. I can’t help but adore Linux and the amazing community behind it!
To install the Xubuntu experience on to our Ubuntu Server 24.04 LTS, all that’s needed is to run the following command:
sudo apt install -y xubuntu-desktop
You will be prompted to pick a Display Manager. A Display Manager is a fancy name for the program that gives you a graphical password prompt, then with a successful login, starts up your desktop system and passes you off to it once it’s started. Sounds simple, right? It isn’t! Processes that integrate with other processes are usually pretty complicated, which is why Display Managers exist. Go ahead and select LightDM for your Display Manager.
After about 1000 years waiting for a billion packages to get installed, even on the amazing Raspi5’s, we finally finish all our updates and we just need to reboot:
sudo shutdown -r now
The Bad News – Black Screen of Death
Okay, so here’s the bad news. Even though these packages were packaged for the ARM CPU’s that are in our sweet little Raspi5’s, the configuration provided by the Ubuntu ARM repos aren’t specific to our Raspi’s, so on the first boot you currently get a blank, black screen of doom. Don’t give up! The fix is super-simple!
What’s happening here is that the kernel that ships with Debian Bookworm (which is what Ubuntu 24.04 is based on) doesn’t know what device to assign to the Display Driver. You can verify this by checking the status of LightDM:
sudo systemctl status lightdm
which will produce something like the following:
× lightdm.service - Light Display Manager
Loaded: loaded (/usr/lib/systemd/system/lightdm.service; indirect; preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-07-31 09:39:06 PDT; 2min 7s ago
Duration: 308ms
Docs: man:lightdm(1)
Process: 1408 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] (code=exited, statu>
Process: 1412 ExecStart=/usr/sbin/lightdm (code=exited, status=1/FAILURE)
Main PID: 1412 (code=exited, status=1/FAILURE)
CPU: 48ms
Jul 31 09:39:06 npctv-controller systemd[1]: lightdm.service: Scheduled restart job, restart counter is at 5.
Jul 31 09:39:06 npctv-controller systemd[1]: lightdm.service: Start request repeated too quickly.
Jul 31 09:39:06 npctv-controller systemd[1]: lightdm.service: Failed with result 'exit-code'.
Jul 31 09:39:06 npctv-controller systemd[1]: Failed to start lightdm.service - Light Display Manager.
So… LightDM isn’t starting. Let’s find out why by checking the LightDM log files:
sudo vim /var/log/lightdm/x-0.log
and we should be seeing something like the following in the logs:
X.Org X Server 1.21.1.11
X Protocol Version 11, Revision 0
Current Operating System: Linux npctv-controller 6.8.0-1031-raspi #35-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 3 15:00:20 UTC 2025 aarch64
Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe smsc95xx.macaddr=2C:CF:67:59:38:D8 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000 console=ttyAMA0,115200 multipath=off dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc
xorg-server 2:21.1.12-1ubuntu1.4 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.42.2
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Jul 31 09:39:05 2025
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
Aha! It doesn’t know what “bus” to use. With computers, a “bus” is like a road, so it’s saying it doesn’t know where to send data. It hasn’t been configured for our display! So, let’s tell it.
To do that, we create the following config file:
sudo vim /etc/X11/xorg.conf.d/99-v3d.conf
Since X11 has been around since ye-olden-days, it’s configuration is similar to the old Sys-V config that Linux systems used to use before SystemD came into the picture. In this older Sys-V structure, a config file that started with ’99’ is intended to be run after all the other stuff had run. This X11 config file should contain the following for our Raspi5’s:
Section "OutputClass"
Identifier "vc4"
MatchDriver "vc4"
Driver "modesetting"
Option "PrimaryGPU" "true"
EndSection
Save that file and reboot. You should get the LightDM password prompt, and once logged in, you should get a full XFCE desktop (light as it is) in all it’s efficient glory.