xserver-nodm-init: Respawn service in case of failure
PATCH 1/1 xserver-nodm-init: Respawn service in case of failure
From: Ramon Fried <[email protected]>
It appears that sometimes xserver-nodm.service is starting before display driver finished loading causing the following failure in Xorg log:
(EE) open /dev/dri/card0: No such file or directory
The introduced by this patch is to restart the service, hopefully the display driver will finish loading.
--- .../x11-common/xserver-nodm-init/xserver-nodm.service.in | 1 + 1 file changed, 1 insertion(+)
meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in +1 -0
@@ -5,6 +5,7 @@ Description=Xserver startup without a display manager EnvironmentFile=/etc/default/xserver-nodm User=@USER@ ExecStart=/etc/xserver-nodm/Xserver +Restart=always [Install] Alias=display-manager.service
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 11 lines · Ramon Fried
From: Ramon Fried <[email protected]>
It appears that sometimes xserver-nodm.service is starting before display driver finished loading causing the following failure in Xorg log:
(EE) open/dev/dri/card0: No such file or directoryThe introduced by this patch is to restart the service, hopefully the display driver will finish loading.
Signed-off-by Ramon Fried <[email protected]>
we are seeing this issue on Dragonboard with meta-qcom BSP, where all drivers needed for display/gpu are modules, so the display initialization comes up 'late' in the boot. I had a discussion with some upstream gnome folks who indicated that a similar race can be observed on any hardware, it is not uncommon, and that's why they use Restart=always in gdm.service as well, so that it keep trying until the display comes up.
it sounds reasonable change to me.
Quoted 20 lines
--- .../x11-common/xserver-nodm-init/xserver-nodm.service.in | 1 + 1 file changed, 1 insertion(+)meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in +1
-1@@ -5,6 +5,7 @@ Description=Xserver startup without a display manager EnvironmentFile=/etc/default/xserver-nodm User=@USER@ ExecStart=/etc/xserver-nodm/Xserver +Restart=always [Install] Alias=display-manager.service --The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 21 lines · Nicolas Dechesne
Quoted 11 lines · Ramon Fried
From: Ramon Fried <[email protected]>
It appears that sometimes xserver-nodm.service is starting before display driver finished loading causing the following failure in Xorg log:
(EE) open/dev/dri/card0: No such file or directoryThe introduced by this patch is to restart the service, hopefully the display driver will finish loading.
Signed-off-by Ramon Fried <[email protected]>we are seeing this issue on Dragonboard with meta-qcom BSP, where all drivers needed for display/gpu are modules, so the display initialization comes up 'late' in the boot. I had a discussion with some upstream gnome folks who indicated that a similar race can be observed on any hardware, it is not uncommon, and that's why they use Restart=always in gdm.service as well, so that it keep trying until the display comes up.
Quoted 1 line
it sounds reasonable change to me.
Restarting service always seems like a workaround here. I wonder if the kernel modules tied themselves to systemd-modules-load.service then the dependencies should
sort themselves out. Alternatively we can also create a dependency on device being made available.
Quoted 23 lines
Reviewed-by Nicolas Dechesne <[email protected]>Quoted 20 lines
--- .../x11-common/xserver-nodm-init/xserver-nodm.service.in | 1 + 1 file changed, 1 insertion(+)meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in +1
-1@@ -5,6 +5,7 @@ Description=Xserver startup without a display manager EnvironmentFile=/etc/default/xserver-nodm User=@USER@ ExecStart=/etc/xserver-nodm/Xserver +Restart=always [Install] Alias=display-manager.service --The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 22 lines · Khem Raj
Quoted 21 lines · Nicolas Dechesne
Quoted 11 lines · Ramon Fried
From: Ramon Fried <[email protected]>
It appears that sometimes xserver-nodm.service is starting before display driver finished loading causing the following failure in Xorg log:
(EE) open/dev/dri/card0: No such file or directoryThe introduced by this patch is to restart the service, hopefully the display driver will finish loading.
Signed-off-by Ramon Fried <[email protected]>we are seeing this issue on Dragonboard with meta-qcom BSP, where all drivers needed for display/gpu are modules, so the display initialization comes up 'late' in the boot. I had a discussion with some upstream gnome folks who indicated that a similar race can be observed on any hardware, it is not uncommon, and that's why they use Restart=always in gdm.service as well, so that it keep trying until the display comes up.
Quoted 7 lines
Quoted 1 line
it sounds reasonable change to me.
Restarting service always seems like a workaround here. I wonder if the kernel modules tied themselves to systemd-modules-load.service then the dependencies should
sort themselves out. Alternatively we can also create a dependency on device being made available.
I would tend to agree that restart is a workaround, but since gdm.service does that too, i thought it wasn't so bad..
we tried with a udev rule like that:
ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xserver-nodm.service"
and it works well too.
between the two, i still prefer the restart=always..
Quoted 25 lines
Quoted 24 lines
Reviewed-by Nicolas Dechesne <[email protected]>Quoted 20 lines
--- .../x11-common/xserver-nodm-init/xserver-nodm.service.in | 1 + 1 file changed, 1 insertion(+)meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in +1
-1@@ -5,6 +5,7 @@ Description=Xserver startup without a display manager EnvironmentFile=/etc/default/xserver-nodm User=@USER@ ExecStart=/etc/xserver-nodm/Xserver +Restart=always [Install] Alias=display-manager.service --The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project