Desktop is blank after logging in without a monitor attached (Ubuntu)
Affected version
OS: Ubuntu 20.04
gnome-shell: 3.36.2-1ubuntu1~20.04.1
Display server: Xorg
Bug summary
The Ubuntu desktop team has requested I file this bug here after initially filing it in the Ubuntu tracker: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1881687
They stated: "Yes indeed the X server has zero monitors attached, but still has a usable desktop area of 1024x768. For gnome-shell this just means it won't draw any panel/launcher etc. Because it prefers to only do that on the primary monitor, which there is none."
On Ubuntu 20.04, I have an AMD system with an integrated GPU (Ryzen 3 3200G with Radeon Vega 8) My GPU is using the amdgpu driver. I have no specific xorg.conf in place. I am using x11vnc to login and view the desktop remotely. There is no monitor attached.
After logging into lightdm's greeter, I am presented with a blank desktop with the Focal Fossa (standard Ubuntu) background image and a mouse cursor, but no other visible interface or windows. There is no menu bar at the top of the desktop and no application bar on the left.
This all works perfectly fine if a monitor is attached before lightdm (and thus Xorg) is started.
Gnome Flashback mode (using metacity) works fine and does not have this issue. But the default of gnome-shell/mutter does not work without the monitor. Nor does using Wayland.
Other notes: I am using lightdm instead of gdm3. If I change the settings at login to use fvwm for my session it works fine.
For gnome-shell processes after login, I see:
root@redacted:/home/redacted# ps -elf | grep gnome-shell
0 S redacted 5868 823 4 80 0 - 1040028 poll_s 12:26 ? 00:00:02 /usr/bin/gnome-shell
That's just one process running as the user who logged in.
And for xrandr:
root@redacted:/home/redacted# env XAUTHORITY=/var/run/lightdm/root/:0 DISPLAY=:0 xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 16384 x 16384
HDMI-A-0 disconnected primary (normal left inverted right x axis y axis)
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
HDMI-A-1 disconnected (normal left inverted right x axis y axis)
Steps to reproduce
- Boot machine without a monitor attached
- Login to the Ubuntu UI
What happened
See above. The desktop is basically blank and no windows or menus appear.
What did you expect to happen
Regular usable desktop/graphical session with menus and the ability to run apps and see menus.