summaryrefslogtreecommitdiff
path: root/recipes-lxde/lxdm/lxdm/0001-lxdm.service-kill-lxsession-explicitely-with-sigkill.patch
blob: a0c7f21e8d40a4cf93624eebd5463ce55a447ce7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 597507f6a6a05140d01db9fa16351ac158674960 Mon Sep 17 00:00:00 2001
From: Max Krummenacher <max.krummenacher@toradex.com>
Date: Tue, 10 Jan 2017 18:15:18 +0100
Subject: [PATCH] lxdm.service: kill lxsession explicitely with sigkill

When shuting down on a Colibri iMX6 we often see that the shutdown gets
delayed with:

[  OK  ] Removed slice system-serial\x2dgetty.slice.
[    **] A stop job is running for Session c1 of user root (8s / 1min 30s)

When one examines this one or several process of lxdm/lxde are still running.
After the timeout runs out the process(es) get killed with SIGKILL, often
triggering

[   77.886935] [drm:drm_legacy_unlock] *ERROR* Process 536 using kernel context 0

Killing lxsession seems to cure the issue.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---
 systemd/lxdm.service | 1 +
 1 file changed, 1 insertion(+)

diff --git a/systemd/lxdm.service b/systemd/lxdm.service
index bf4a0a8..a116f9d 100644
--- a/systemd/lxdm.service
+++ b/systemd/lxdm.service
@@ -5,6 +5,7 @@ After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service
 
 [Service]
 ExecStart=/usr/sbin/lxdm
+ExecStop=/usr/bin/killall -9 lxsession
 Restart=always
 IgnoreSIGPIPE=no
 
-- 
2.5.5