* [PATCH] xserver-nodm-init: Respawn service in case of failure @ 2018-04-10 11:20 Ramon Fried 2018-04-10 19:48 ` Nicolas Dechesne 0 siblings, 1 reply; 4+ messages in thread From: Ramon Fried @ 2018-04-10 11:20 UTC (permalink / raw) To: openembedded-core; +Cc: Ramon Fried From: Ramon Fried <rfried@codeaurora.org> 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. Signed-off-by: Ramon Fried <rfried@codeaurora.org> --- .../x11-common/xserver-nodm-init/xserver-nodm.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in index 324a26f549..87dc4f8fcd 100644 --- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in @@ -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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] xserver-nodm-init: Respawn service in case of failure 2018-04-10 11:20 [PATCH] xserver-nodm-init: Respawn service in case of failure Ramon Fried @ 2018-04-10 19:48 ` Nicolas Dechesne 2018-04-12 15:55 ` Khem Raj 0 siblings, 1 reply; 4+ messages in thread From: Nicolas Dechesne @ 2018-04-10 19:48 UTC (permalink / raw) To: Ramon Fried; +Cc: Ramon Fried, Patches and discussions about the oe-core layer On Tue, Apr 10, 2018 at 1:20 PM, Ramon Fried <ramon.fried@linaro.org> wrote: > From: Ramon Fried <rfried@codeaurora.org> > > 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. > > Signed-off-by: Ramon Fried <rfried@codeaurora.org> 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. Reviewed-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> > --- > .../x11-common/xserver-nodm-init/xserver-nodm.service.in | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in > index 324a26f549..87dc4f8fcd 100644 > --- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in > +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in > @@ -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 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xserver-nodm-init: Respawn service in case of failure 2018-04-10 19:48 ` Nicolas Dechesne @ 2018-04-12 15:55 ` Khem Raj 2018-04-12 16:27 ` Nicolas Dechesne 0 siblings, 1 reply; 4+ messages in thread From: Khem Raj @ 2018-04-12 15:55 UTC (permalink / raw) To: Nicolas Dechesne, Ramon Fried Cc: Ramon Fried, Patches and discussions about the oe-core layer On 4/10/18 12:48 PM, Nicolas Dechesne wrote: > On Tue, Apr 10, 2018 at 1:20 PM, Ramon Fried <ramon.fried@linaro.org> wrote: >> From: Ramon Fried <rfried@codeaurora.org> >> >> 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. >> >> Signed-off-by: Ramon Fried <rfried@codeaurora.org> > > 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. 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. > > Reviewed-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> > >> --- >> .../x11-common/xserver-nodm-init/xserver-nodm.service.in | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in >> index 324a26f549..87dc4f8fcd 100644 >> --- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in >> +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in >> @@ -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 >> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xserver-nodm-init: Respawn service in case of failure 2018-04-12 15:55 ` Khem Raj @ 2018-04-12 16:27 ` Nicolas Dechesne 0 siblings, 0 replies; 4+ messages in thread From: Nicolas Dechesne @ 2018-04-12 16:27 UTC (permalink / raw) To: Khem Raj; +Cc: Ramon Fried, Patches and discussions about the oe-core layer On Thu, Apr 12, 2018 at 5:55 PM, Khem Raj <raj.khem@gmail.com> wrote: > On 4/10/18 12:48 PM, Nicolas Dechesne wrote: >> On Tue, Apr 10, 2018 at 1:20 PM, Ramon Fried <ramon.fried@linaro.org> wrote: >>> From: Ramon Fried <rfried@codeaurora.org> >>> >>> 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. >>> >>> Signed-off-by: Ramon Fried <rfried@codeaurora.org> >> >> 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. > > 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.. > >> >> Reviewed-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> >> >>> --- >>> .../x11-common/xserver-nodm-init/xserver-nodm.service.in | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in >>> index 324a26f549..87dc4f8fcd 100644 >>> --- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in >>> +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in >>> @@ -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 >>> > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-04-12 16:28 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-04-10 11:20 [PATCH] xserver-nodm-init: Respawn service in case of failure Ramon Fried 2018-04-10 19:48 ` Nicolas Dechesne 2018-04-12 15:55 ` Khem Raj 2018-04-12 16:27 ` Nicolas Dechesne
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.