Desktop randomly freezing at startup (lightdm issue?)

I’ve been managing more than 500 RPIs 3B running Ubuntu Mate 16.04.1 for more than a year now.
No updates (they run on local networks without Internet access), everything works just fine.

I recently created a new image based on 16.04.2 with all packages up to date.
Since then, some RPIs are randomly freezing when desktop starts:

  • Screen is either:
    • Black
    • Displaying my wallpaper
    • Displaying my wallpaper but darker (freeze happening during the fade-in transition I guess?)
  • Mouse is responsive (cursor is a “X” cross)
  • I can’t open a terminal using Ctrl+Alt+T…
  • …but SSH is working & I can log in
  • Any command needing an access to the X server (xrandr, mate-screenshot…) just hangs, doing absolutely nothing (having run export DISPLAY=:0 before)

I didn’t find anything special in X or lightdm logs and have no clue where to start looking next.
Two days of Googling & testing haven’t been helping much.

Only thing I’ve found so far is that restarting lightdm service properly restarts the desktop.
(sudo service lightdm stop; sudo service lightdm start)

Could anyone help me on this one please?

That sounds like an X11 issue. You might try deleting xorg.conf on one of the bad machines. I recently had a problem where my xorg.conf file was in a bad state, and I had a black screen with an x for the mouse pointer. I could move it around but the screen was black. Somehow, I had two screens set to absolute, and they were sitting on top of one another. After I deleted the file and rebooted, everything was back to normal.

Thanks a lot for your answer.
It seems that I don’t have any xorg.conf file. I checked /usr/share/X11/xorg.conf.d/ & /etc/X11/Xsession.d, but I couldn’t find any weird or custom configuration in there.

I think the issue would be less random if it was due to config (I would say that the problem occurs roughly once in a hundred reboots).

I think I’m gonna try to replace lightdm with gdm and hope it changes something (?).

The problem still occurs with gdm (less than with lightdm, but it might be a coincidence) :confused:

Check /etc/X11/xorg.conf
You should find it there. If not touch /etc/X11/xorg.conf.

Try removing DM’s altogether and replace with xinit.

I read on Ubuntu Wiki that xset could freeze X and thought I nailed it (I’m using xset to disable DPMS on startup)… but no luck.

I finally found a “solution” (sort of :confused: ):
I made a new image from ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img, but this time without running apt upgrade.
This is far from ideal, but it’s been 2 hours that my 10 test RPIs reboot again & again without any problem.

@verndog:
I think removing DM completely is a great idea. I’m no expert and I don’t know if it might have side effects for my project, but it’ll definitely try that on my next image.
Thanks for the suggestion!

1 Like