Score:0

Kubuntu 21.04 in VMware: SDDM will not start X server. startx works fine as user to bring up Plasma

in flag

The title says it, basically. Did a fresh install of Kubuntu into a VMware Workstation VM. Upon booting the VM, the text console on tty1 remains, and the login manager never starts. I'm able to switch to another console, and SSH works too.

Here is all that SDDM is putting into the syslog:

Jul 19 13:19:11 ubuntu-vm systemd[1]: sddm.service: Succeeded.
Jul 19 13:43:31 ubuntu-vm sddm[24607]: Initializing...
Jul 19 13:43:31 ubuntu-vm sddm[24607]: Starting...
Jul 19 13:43:31 ubuntu-vm sddm[24607]: Adding new display on vt 1 ...
Jul 19 13:43:31 ubuntu-vm sddm[24607]: Loading theme configuration from ""
Jul 19 13:43:31 ubuntu-vm sddm[24607]: Display server starting...
Jul 19 13:43:31 ubuntu-vm sddm[24607]: Adding cookie to "./{8509a6d5-1038-4ff5-b48a-64dcea20dfc7}"
Jul 19 13:43:31 ubuntu-vm sddm[24607]: Failed to start display server process.
Jul 19 13:43:31 ubuntu-vm sddm[24607]: Could not start Display server on vt 1

The X binary is never started. xauth is never called. It just fails there with no detail at all.

I tried forcing it to run as the sddm user (the systemd unit just runs it as root) and that brought up a possibly more informative message:

root@ubuntu-vm:/var/log# sudo -u sddm sddm --test-mode
[13:50:15.277] (II) DAEMON: Initializing...
[13:50:15.281] (II) DAEMON: Starting...
[13:50:15.281] (II) DAEMON: Adding new display on vt 1 ...
[13:50:15.281] (II) DAEMON: Loading theme configuration from ""
[13:50:15.281] (II) DAEMON: Display server starting...
[13:50:15.281] (II) DAEMON: Adding cookie to "./{f2a6bd23-93bb-4aa7-b57a-d23ffebc1841}"
/usr/bin/xauth:  timeout in locking authority file ./{f2a6bd23-93bb-4aa7-b57a-d23ffebc1841}
[13:50:35.360] (EE) DAEMON: Failed to write xauth file
[13:50:35.361] (EE) DAEMON: Could not start Display server on vt 1

However, running it as root at the command prompt with --test-mode yields the same result as when it runs under systemd:

root@ubuntu-vm:/var/log# sddm --test-mode
^Croot@ubuntu-vm:/var/log# cat sddm.log
[13:51:22.698] (II) DAEMON: Initializing...
[13:51:22.703] (II) DAEMON: Starting...
[13:51:22.703] (II) DAEMON: Adding new display on vt 1 ...
[13:51:22.703] (II) DAEMON: Loading theme configuration from ""
[13:51:22.703] (II) DAEMON: Display server starting...
[13:51:22.703] (II) DAEMON: Adding cookie to "./{22e1ee32-441a-4681-abfe-e0a35bdac4fa}"
[13:51:22.705] (EE) DAEMON: Failed to start display server process.
[13:51:22.705] (EE) DAEMON: Could not start Display server on vt 1
[13:51:28.112] (WW) DAEMON: Signal received: SIGINT

I've seen many other posts about similar issues but all of them include some other error after "Display server starting".

With strace I found that sddm is trying to launch Xephyr, so I tried installing that. This simply threw sddm into a loop, where it keeps trying to launch Xephyr, which exits (Xephyr cannot open host display. Is DISPLAY set?), but still does not launch X itself (it never starts /usr/bin/X). It does run xauth once Xephyr is available, but I don't see any errors there. The error now seems to be that Xephyr can't run since X isn't being started by sddm. In either case, I don't believe Xephyr is actually required, I think it's just called if it's available on the system. The root cause is that sddm is not starting the X server.

I have no config file (no /etc/sddm.conf) so everything should be using defaults. The default for the X server is /usr/bin/X, which does exist on my system. Indeed, as I said I am able to login to the console as my user account and type startx and Plasma starts up just fine. (I can't seem to set the resolution higher than 1280x1024, but one problem at a time...)

Other than the above, I have tried:

  • dpkg --reconfigure sddm
  • apt install --reinstall sddm && dpkg-reconfigure sddm
  • apt purge kubuntu-desktop && apt autoclean && apt install -y kubuntu-desktop && dpkg --configure -a

None of these had any effect.

Please advise me if more logs would be helpful. This is just a normal VMware Workstation 16 VM, graphics acceleration enabled, running on Windows as the host OS.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.