vbox VirtualBox guests: black screen with X pointer; non-appearance of the desktop environment; non-starts of the DE (reappearance of SDDM)

grahamperrin

Daemon

Reaction score: 368
Messages: 1,221

Spun off from posts by other users under <https://forums.FreeBSD.org/threads/79825/post-512542> (after the original issue was solved).

Host:

Code:
 % date ; uptime ; uname -v
Sat 12 Jun 2021 14:47:02 BST
 2:47p.m.  up  3:34, 6 users, load averages: 1.56, 1.33, 1.41
FreeBSD 14.0-CURRENT #98 main-n247326-2349cda44fe: Sat Jun 12 08:19:48 BST 2021     root@mowa219-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
% uname -KU
1400021 1400021
% pkg info -x virtualbox
virtualbox-ose-6.1.22
virtualbox-ose-kmod-6.1.22
%

Guest:

Code:
% date ; uptime ; uname -v
Sat 12 Jun 2021 14:47:02 BST
 2:47p.m.  up  3:34, 6 users, load averages: 1.56, 1.33, 1.41
FreeBSD 14.0-CURRENT #98 main-n247326-2349cda44fe: Sat Jun 12 08:19:48 BST 2021     root@mowa219-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
% uname -KU
1400021 1400021
% pkg info -x virtualbox
virtualbox-ose-6.1.22
virtualbox-ose-kmod-6.1.22
%

For me, transient problems were preceded by:
  1. pkg upgrade from latest
  2. FreeBSD update from 13.0-RELEASE-p1 to 13.0-RELEASE-p2
  3. restart
  4. accidental use of the Plasma (Wayland) session option, which is not expected to work at this time.
Example 1: Plasma (X11) – FreeBSD in normal mode

Screenshots not taken.
I recall a black screen, I didn't bother to look for a pointer. Loosely speaking: a hang, with non-appearance of the desktop environment.

Example 2: User Session – FreeBSD in safe mode
1623504188155.png

1623504419969.png
1623504496539.png

/var/log/Xorg.0.log.old after the event: <https://bsd.to/Apec>

Example 3: Plasma (X11) – FreeBSD in safe mode

Without restarting the system, I ran service sddm stop and service sddm start then found no problem with Plasma.

/var/log/Xorg.0.log: <https://bsd.to/SySX>

Example 4: Plasma (X11) – FreeBSD in normal mode

No problem.
 
OP
grahamperrin

grahamperrin

Daemon

Reaction score: 368
Messages: 1,221

… for the virtual machine above, I had forgotten procfs(5) and sysrc dbus_enable="YES" && service dbus start

<https://community.kde.org/FreeBSD/Setup#Quick_start>

(My bad. The machine was previously focused on loss of data with UFS. SDDM and KDE were incidental.)



After making the corrections then restarting FreeBSD:
  • Plasma (X11) sessions are trouble-free
  • User Session sessions fail in a different way – moments after log in, I'm returned to the SDDM screen.
For the most recent User Session failure:
 

Attachments

  • Xorg.0.log.txt
    20 KB · Views: 11
OP
grahamperrin

grahamperrin

Daemon

Reaction score: 368
Messages: 1,221

With a different guest (ZFS in lieu of UFS) …

Example 5: LXDE – FreeBSD in normal mode

Black screen, movable X pointer (same as the User Session experience above).

Switching from ttyv8 (Control-F9) to ttyv1 (Control-F2) presented the movable X pointer from ttyv9 above the console text of ttyv1:
1623510028753.png

– and the command line did not respond to keyboard input until after a switch away to ttyv0 (X pointer disappears) then back to ttyv1.



Example 6: LXDE – FreeBSD in normal mode

I attempted a boot in safe mode (failed; off-topic) then rebooted in normal mode.

LXDE is now OK:
1623510100901.png



Example 7: User Session – FreeBSD in safe mode

1623510998342.png




I rebooted in normal mode.

User Session, Plasma (X11), LXDE and Openbox were all OK.
 
OP
grahamperrin

grahamperrin

Daemon

Reaction score: 368
Messages: 1,221

From <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254464#c4>:

… If I exit from full screen and reboot, LXDE works.

… if I power off the VM and start it, I get again a black screen.

Not reproducible here in that way. I used the menu of LXDE to perform the shutdown whilst the guest was in full screen mode, started the guest, used SDDM to begin the LXDE session then took the screenshot below.

Emrion please: how, exactly, did you power off the guest in your case?

Do you use SDDM?

1623513049130.png
 
OP
grahamperrin

grahamperrin

Daemon

Reaction score: 368
Messages: 1,221

User Session failures

… moments after log in, I'm returned to the SDDM screen. …

Lines from /var/log/sddm.log for the most recent failure. I started SDDM at exactly 17:00 BST then attempted a User Session login:

Code:
[16:00:09.991] (II) DAEMON: Reading from "/usr/local/share/xsessions/xinitrc.desktop"
[16:00:09.991] (II) DAEMON: Reading from "/usr/local/share/xsessions/xinitrc.desktop"
[16:00:09.991] (II) DAEMON: Session "/usr/local/share/xsessions/xinitrc.desktop" selected, command: "/usr/local/share/sddm/scripts/xinit-session"
[16:00:10.000] (II) HELPER: [PAM] Starting...
[16:00:10.000] (II) HELPER: [PAM] Authenticating...
[16:00:10.000] (II) HELPER: [PAM] Preparing to converse...
[16:00:10.000] (II) HELPER: [PAM] Conversation with 1 messages
[16:00:10.006] (II) HELPER: [PAM] returning.
[16:00:10.007] (II) DAEMON: Authenticated successfully
[16:00:10.007] (II) HELPER: [PAM] Preparing to converse...
[16:00:10.007] (II) HELPER: [PAM] Conversation with 1 messages
[16:00:10.007] (WW) DAEMON: Authentication information: "Last login: Sat Jun 12 15:57:54 from :0"
[16:00:10.008] (II) HELPER: Starting: "/usr/local/share/sddm/scripts/Xsession /usr/local/share/sddm/scripts/xinit-session"
[16:00:10.009] (II) HELPER: Adding cookie to "/home/grahamperrin/.Xauthority"
[16:00:10.012] (II) DAEMON: Session started
[16:00:10.064] (II) HELPER: [PAM] Closing session
[16:00:10.064] (II) HELPER: [PAM] Ended.
[16:00:10.069] (II) DAEMON: Auth: sddm-helper exited successfully
[16:00:10.069] (II) DAEMON: Greeter stopping...
[16:00:10.069] (II) DAEMON: Socket server stopping...
[16:00:10.069] (II) DAEMON: Socket server stopped.
[16:00:10.069] (II) DAEMON: Display server stopping...
[16:00:10.510] (II) DAEMON: Display server stopped.
[16:00:10.510] (II) DAEMON: Running display stop script  "/usr/local/share/sddm/scripts/Xstop"
[16:00:10.512] (II) DAEMON: Removing display ":0" ...
[16:00:10.512] (II) DAEMON: Adding new display on vt 9 ...
[16:00:10.512] (II) DAEMON: Loading theme configuration from ""
[16:00:10.512] (II) DAEMON: Display server starting...
[16:00:10.512] (II) DAEMON: Adding cookie to "/var/run/sddm/{553bedf8-f234-4739-8938-5c5971a85b73}"
[16:00:10.514] (II) DAEMON: Running: /usr/local/bin/X -nolisten tcp -auth /var/run/sddm/{553bedf8-f234-4739-8938-5c5971a85b73} -background none -noreset -displayfd 20 -seat seat0 vt9
[16:00:10.653] (II) HELPER: [PAM] Closing session
[16:00:10.654] (II) HELPER: [PAM] Ended.
[16:00:11.077] (II) DAEMON: Setting default cursor
[16:00:11.078] (WW) DAEMON: Could not setup default cursor
[16:00:11.078] (II) DAEMON: Running display setup script  "/usr/local/share/sddm/scripts/Xsetup"
[16:00:11.079] (II) DAEMON: Display server started.
[16:00:11.079] (II) DAEMON: Socket server starting...
[16:00:11.080] (II) DAEMON: Socket server started.
[16:00:11.080] (II) DAEMON: Loading theme configuration from "/usr/local/share/sddm/themes/breeze/theme.conf"
[16:00:11.080] (II) DAEMON: Greeter starting...
[16:00:11.081] (II) DAEMON: Greeter stopping...
[16:00:11.081] (WW) DAEMON: QProcess: Destroyed while process ("/usr/local/libexec/sddm-helper") is still running.
[16:00:11.088] (II) HELPER: [PAM] Starting...
[16:00:11.088] (II) HELPER: [PAM] Authenticating...
[16:00:11.088] (II) HELPER: [PAM] returning.
[16:00:11.089] (II) HELPER: Starting: "/usr/local/share/sddm/scripts/Xsession /usr/local/bin/sddm-greeter --socket /tmp/sddm-:0-fwRyhP --theme /usr/local/share/sddm/themes/breeze"
[16:00:11.090] (II) DAEMON: Greeter session started successfully
[16:00:11.143] (II) DAEMON: Message received from greeter: Connect
[16:09:01.517] (II) DAEMON: Message received from greeter: Login

(The last line there, 16:09, was the beginning of a successful Plasma (X11) session, which I used to gather the data.)

Does anything in this sddm.log help to explain why the User Session fails?

(SDDM aside: the same user grahamperrin has no trouble with startx run in ttyv4.)
 
OP
grahamperrin

grahamperrin

Daemon

Reaction score: 368
Messages: 1,221

Cross reference:

 
OP
grahamperrin

grahamperrin

Daemon

Reaction score: 368
Messages: 1,221

… FreeBSD sddm is quite broken

Not that I can see: <https://bugs.freebsd.org/bugzilla/buglist.cgi?component=Individual Port(s)&list_id=428585&product=Ports & Packages&query_format=advanced&resolution=---&short_desc=x11/sddm&short_desc_type=allwordssubstr>

just replace it with another display manager …

Which one would you recommend?

A first alternative failed (now solved):

 
OP
grahamperrin

grahamperrin

Daemon

Reaction score: 368
Messages: 1,221

… FreeBSD sddm is quite broken just replace it with another display manager and black screen after login is gone.

With SLiM instead of SDDM, login was followed by:
  1. some error dialogues, to which I paid no attention (busy with other things at the time)
  2. a black screen with a movable pointer – desktop environment not working.
 

DanDare

Member

Reaction score: 30
Messages: 53

Nice tests.
Here I just love using xfce4. I have it now 13.0-RELEASE I boot bare metal but also use it as guest (windows host virtualbox 6.0 https://www.virtualbox.org/manual/ch09.html#rawdisk). Was getting black screen trying to startx, changed from virtualbox-ose-additions-6.1.18_1 to virtualbox-ose-additions-legacy-5.2.44_3. Working flawlessly for me.
 
OP
grahamperrin

grahamperrin

Daemon

Reaction score: 368
Messages: 1,221

Do you make a test of your .ISO?

Yes, I nearly always check the checksums of disk images etc. after download, before first use.

… virtualbox-ose-additions-legacy-5.2.44_3. Working flawlessly for me.

I might have found one case where the screen could not be resized.

… black screen trying to startx, …

That's extraordinary, I never found a problem with simple use of startx(1).
 
Top