I have the same issue when login via xrdp as well as local login.

When this issue occurs, login via ssh, and execute following command.

$ DISPLAY=:10 timeout 1 xmessage -iconic x

Right after execute it, screen appears.
Other x11-apps works as well, e.g. xclock, xeyes, xcalc...
xrefresh does not work for this issue.
This also works for local login as well, by changing the display number.

$ DISPLAY=:0 timeout 1 xmessage -iconic x

Following script is a workaround for this issue.
This script writes workaround-blackscreen.desktop to /etc/xdg/autostart 
directory.

$ sudo bash -c "cat >/etc/xdg/autostart/workaround-blackscreen.desktop" <<EOF
[Desktop Entry]
Type=Application
Name=workaround for blackscreen
Exec=sh -c 'if [ "\$XDG_SESSION_TYPE" = "x11" ]; then sleep 2;timeout 0.5 
xmessage -iconic x; fi'
EOF

Sometimes sleep 2 is not enough. Longer sleep is better though, it makes
delay longer to display desktop.

I guess, when x11 app is executed, graphic buffer data is pushed to the
screen.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-shell in Ubuntu.
https://bugs.launchpad.net/bugs/2089709

Title:
  Ubuntu 24.04 (X11) sometimes logs in to a black screen with only an X
  cursor

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/2089709/+subscriptions


-- 
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to