You are not logged in.

#1 2015-11-01 15:29:55

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

Restarting LightDM without crashing Kodi

So, my HTPC starts an autologin Kodi session with LightDM upon boot.
When I need to restart the X server for some reason, Kodi crashes instead of exiting gracefully. I restart LightDM with systemctl.

Is there a way to restart the display manager and have the running graphical applications exit gracefully?

Offline

#2 2015-11-02 12:04:37

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Restarting LightDM without crashing Kodi

Send the appeopriate signal to Kodi before killing X. Write a wrapper script, that does both.

Find out why Kodi is unable to terminate in time and needs to be killed.

Start Kodi from a systemd user unit that slows down the process on exit.

Research LightDM problems and use SDDM instead.

Realize, that Kodi is a heavy software system, that runs its own SQL server instance and cannot be zapped like this without going over timeouts of something like an X zap or a DM service kill.

Offline

#3 2015-11-03 14:49:58

rlees85
Member
From: Daventry, UK
Registered: 2015-04-29
Posts: 98
Website

Re: Restarting LightDM without crashing Kodi

I have the exact same setup as you and Kodi can take normally 10 seconds to quit, sometimes up to 2 minutes. Fortunately I never need to restart X or lightdm but if I did I would find it easier to use Kodi to just restart the entire PC.

I have found that Kodi can hang occasionally and a killall -9 kodi.bin seems to fix this (to save having to button the PC).

But yeah to answer your question, do what Awebb says smile send a TERM signal to kodi first to ask it to exit gracefully and then restart lightdm.

Offline

Board footer

Powered by FluxBB