Skip to content
Unix Server Solutions
  • Server
  • Apple
  • Database
  • Ubuntu
  • Linux

Ubuntu – LightDM & SDDM fight on greeter screen

lightdmlogin-screensddmsystemdupgrade

I had installed Kubuntu 15.04 sometime ago. I upgraded to 15.10, things were going fine till I added ubuntu-desktop to use Unity DE.

When booting with systemd, on startup or login, I get black or white screen for all Virtual Terminamls (TV's / TTY's) including TV7 graphical one. In some rare cases flickering screen between lightdm & sddm GUI, and that's how I got to know that both were running and may be the cause of this problem (black screen).

It works fine: when booting with upstart or switching DM back to sddm.

  • Flickering screen between KDE/sddm Unity/lightdm

    https://youtu.be/xI1fpTyklNo
    https://youtu.be/HpH309GqFcU

  • ps ax | grep dm

     1377 ?        SLsl   0:00 /usr/sbin/lightdm
     1459 tty7     Ssl+   1:10 /usr/bin/X -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
     1526 ?        Ssl    0:00 /usr/bin/sddm
     1626 ?        SLl    0:00 lightdm --session-child 12 19
     3843 pts/2    S+     0:00 grep --color=auto dm
    
  • systemctl status default.target

    ● graphical.target - Graphical Interface
       Loaded: loaded (/lib/systemd/system/graphical.target; static; vendor preset: enabled)
       Active: active since Fri 2015-11-13 09:46:21 CET; 50min ago
         Docs: man:systemd.special(7)
    
    Nov 13 09:46:21 BlueSkies systemd[1]: Reached target Graphical Interface.
    
  • sudo dpkg-reconfigure lightdm

    Default display manager:
        gdm
      * lightdm
        sddm
        xdm
    
  • ls -l /etc/systemd/system/display-manager.service

    lrwxrwxrwx 1 root root 35 Nov 13 17:26 /etc/systemd/system/display-manager.service -> /lib/systemd/system/lightdm.service
    

I don't want to remove any DM, also I do want to keep LightDM as default. So, is there a canonical answer to How to set the default DM for this mixed release 15.10 (systemd/upstart)?

I could find many similar question without the answer I'm looking for:

  • lightdm black screen after installing plasma5 in Ubuntu
  • lightdm doesn't show up
  • kubuntu 15.04 upgrade: many problems
  • No login screen on startup, works after logging in and logging out again
  • Dual boot ubunuty/windows 10 partition on Dell xps 13, see Palantir's answer:

    I found the kubuntu installer would not handle full disk encryption
    correctly, so I installed with Ubuntu installer, and added the
    kubuntu-desktop package later. I had serious problems with LightDM (it
    would appear and immediately disappear after boot, also it would not
    allow me to switch VTs), so I switched to KDE's sddm and its login
    manager (hint: sudo dpkg-reconfigure lightdm).

Best Answer

I end up adding a ExecStartPre line to check for default display manager on legacy settings /etc/X11/default-display-manager, now it's working well:

/lib/systemd/system/sddm.service

[Unit]
Description=Simple Desktop Display Manager
Documentation=man:sddm(1) man:sddm.conf(5)
After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service

[Service]
ExecStartPre=/bin/sh -c '[ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "sddm" ]'
ExecStart=/usr/bin/sddm
Restart=always
#PrivateTmp=yes

[Install]
Alias=display-manager.service
WantedBy=graphical.target

Reference: Copied from /lib/systemd/system/lightdm.service

I'm not familiar with systemd, so no idea why sddm was started on boot. I have gdm too, it does not start by itself.

Update: I Could find a related bug report

  • Launchpad Bug-report #1446760: SDDM and LightDM can run at the same time

Related Solutions

Ubuntu – Can’t use lightdm-webkit-greeter

Just edit the greeter-session option in /etc/lightdm/lightdm.conf to the desired greeter.

Open up /etc/lightdm/lightdm.conf with any editor as root. For example sudo nano /etc/lightdm/lightdm.conf then change the line

greeter-session=unity-greeter

to

greeter-session=lightdm-webkit-greeter

If the file does not exist, let it contain

[SeatDefaults]
greeter-session=lightdm-webkit-greeter
Ubuntu – Login Loop – unable to run unity – not Xauthority ownership but may be related to display

Though you have given answer in your question, writing this for the record. Type ctrl + alt + F1 and login with your username at command prompt.

user@dell$ ls -l ~/.ICEauthority
-rw------- root root 3668 May 28 09:28 /home/user/.ICEauthority
user@dell$ sudo chmod 777 ~/.ICEauthority
password:
user@dell$ ls -l ~/.ICEauthority
-rwxrwxrwx root root 3668 May 28 09:28 /home/user/.ICEauthority

ctrl + alt + F7 and login worked.

Related Question
  • Ubuntu – Can’t use lightdm-webkit-greeter
  • Ubuntu – Login Loop – unable to run unity – not Xauthority ownership but may be related to display
  • Ubuntu – Screen turning black after switching users