All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] xorg with nodm/xdm init.d script conflicts causes blank screen
@ 2019-09-13  6:24 Tudor Holton
  2019-09-13 17:41 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Tudor Holton @ 2019-09-13  6:24 UTC (permalink / raw)
  To: buildroot

Hello awesome buildroot people, :-)

If I select the X.org server BR2_PACKAGE_XSERVER_XORG_SERVER and a 
display manager like BR2_PACKAGE_NODM, then I get 2 files in 
/etc/init.d:

S40xorg which starts the server /usr/sbin/Xorg first and
S90nodm which then tries to start another copy of Xorg (to call 
/etc/X11/Xsession and get everything on the display).

Obviously, this doesn't work because nodm can't start a second X server, 
and the visual result is a black screen.  The only solution I can see is 
a post-build script to remove the S40xorg script to disable X and allow 
nodm to manage X.

I've tried looking for:
(a) A way to tell Xorg that nodm is the default application
(b) A way to tell nodm that an Xorg is already running (the S90nodm 
script reads /etc/default/* but NODM_XINIT is now ignored and there 
aren't any other obvious options to nodm)
(c) To use a different display manager, xdm, but they all seem to insert 
an init.d file that's in the range S90-S99 and follow the same 
presumption (that X has not started)

What's the best (future-proof) approach to getting a display manager 
working with X in buildroot?

Cheers,
Tudor


P.S. (As an aside, why don't more buildroot init scripts use 
/etc/default config files?)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] xorg with nodm/xdm init.d script conflicts causes blank screen
  2019-09-13  6:24 [Buildroot] xorg with nodm/xdm init.d script conflicts causes blank screen Tudor Holton
@ 2019-09-13 17:41 ` Thomas Petazzoni
  2019-09-13 21:08   ` Ezequiel Garcia
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2019-09-13 17:41 UTC (permalink / raw)
  To: buildroot

Hello Tudor,

Thanks for your report. I'm adding in Cc Bernd who added the Xorg init
script, and Ezequiel Garcia, who contributed the nodm package.

On Fri, 13 Sep 2019 16:24:52 +1000
Tudor Holton <tudor@smartguide.com.au> wrote:

> Hello awesome buildroot people, :-)
> 
> If I select the X.org server BR2_PACKAGE_XSERVER_XORG_SERVER and a 
> display manager like BR2_PACKAGE_NODM, then I get 2 files in 
> /etc/init.d:
> 
> S40xorg which starts the server /usr/sbin/Xorg first and
> S90nodm which then tries to start another copy of Xorg (to call 
> /etc/X11/Xsession and get everything on the display).
> 
> Obviously, this doesn't work because nodm can't start a second X server, 
> and the visual result is a black screen.  The only solution I can see is 
> a post-build script to remove the S40xorg script to disable X and allow 
> nodm to manage X.

So it means that starting /usr/bin/nodm in fact starts another X.org
server. I would have expected S40xorg to start the X.org server, and
then S90nodm to start the display manager inside the X.org server
started by S40xorg, but apparently it's not the case.

> I've tried looking for:
> (a) A way to tell Xorg that nodm is the default application
> (b) A way to tell nodm that an Xorg is already running (the S90nodm 
> script reads /etc/default/* but NODM_XINIT is now ignored and there 
> aren't any other obvious options to nodm)
> (c) To use a different display manager, xdm, but they all seem to insert 
> an init.d file that's in the range S90-S99 and follow the same 
> presumption (that X has not started)

So if all display manager all start their own X.org server instance, it
means that perhaps S40xorg should only be installed if there's no
display manager enabled ?

> What's the best (future-proof) approach to getting a display manager 
> working with X in buildroot?

Bernd, Ezequiel, any suggestion here ?

> P.S. (As an aside, why don't more buildroot init scripts use 
> /etc/default config files?)

Because we need more contributions to make our init scripts consistent
and use /etc/default config files! :-)

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] xorg with nodm/xdm init.d script conflicts causes blank screen
  2019-09-13 17:41 ` Thomas Petazzoni
@ 2019-09-13 21:08   ` Ezequiel Garcia
  2019-11-09 16:11     ` Ezequiel Garcia
  2019-11-17 19:28     ` Arnout Vandecappelle
  0 siblings, 2 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2019-09-13 21:08 UTC (permalink / raw)
  To: buildroot

Hello everyone,

On Fri, 2019-09-13 at 19:41 +0200, Thomas Petazzoni wrote:
> Hello Tudor,
> 
> Thanks for your report. I'm adding in Cc Bernd who added the Xorg init
> script, and Ezequiel Garcia, who contributed the nodm package.
> 

Thanks for the report and thanks for Ccing me. See my comments
below, but beware: it's been a long while, so the little
X understanding I ever had is today even smaller.

> On Fri, 13 Sep 2019 16:24:52 +1000
> Tudor Holton <tudor@smartguide.com.au> wrote:
> 
> > Hello awesome buildroot people, :-)
> > 
> > If I select the X.org server BR2_PACKAGE_XSERVER_XORG_SERVER and a 
> > display manager like BR2_PACKAGE_NODM, then I get 2 files in 
> > /etc/init.d:
> > 
> > S40xorg which starts the server /usr/sbin/Xorg first and
> > S90nodm which then tries to start another copy of Xorg (to call 
> > /etc/X11/Xsession and get everything on the display).
> > 
> > Obviously, this doesn't work because nodm can't start a second X server, 
> > and the visual result is a black screen.  The only solution I can see is 
> > a post-build script to remove the S40xorg script to disable X and allow 
> > nodm to manage X.
> 
> So it means that starting /usr/bin/nodm in fact starts another X.org
> server. I would have expected S40xorg to start the X.org server, and
> then S90nodm to start the display manager inside the X.org server
> started by S40xorg, but apparently it's not the case.
> 

Normally, display managers start X. E.g.:

gdm:
https://github.com/GNOME/gdm/blob/master/daemon/gdm-server.c#L710

nodm:
https://github.com/spanezz/nodm/blob/master/xserver.c#L159

> > I've tried looking for:
> > (a) A way to tell Xorg that nodm is the default application
> > (b) A way to tell nodm that an Xorg is already running (the S90nodm 
> > script reads /etc/default/* but NODM_XINIT is now ignored and there 
> > aren't any other obvious options to nodm)
> > (c) To use a different display manager, xdm, but they all seem to insert 
> > an init.d file that's in the range S90-S99 and follow the same 
> > presumption (that X has not started)
> 
> So if all display manager all start their own X.org server instance, it
> means that perhaps S40xorg should only be installed if there's no
> display manager enabled ?
> 

I guess that's right.

> > What's the best (future-proof) approach to getting a display manager 
> > working with X in buildroot?
> 

Keep in mind that nodm is _not_ a display manager, just as it's name implies.
It's for embedded devices that don't want to login.

> Bernd, Ezequiel, any suggestion here ?
> 

When nodm was introduced, xorg-server didn't have the sysv init script.
I assume it was added because Bernd needed to launch X without any session,
but I don't truly understand the reasons for that route, as opposed to
using a display manager. Or nodm, in case a fixed user login, no security
is needed, as in a e.g. kiosk thing.

I haven't checked if it's possible, but I guess we can make some hidden
config symbol PROVIDES_X_DISPLAY_MANAGER for display managers to select,
and then use it to restrict the xorg server sysv init so it's available
only if no display manager was selected.

Curious about the unfolding,
Ezequiel

> > P.S. (As an aside, why don't more buildroot init scripts use 
> > /etc/default config files?)
> 
> Because we need more contributions to make our init scripts consistent
> and use /etc/default config files! :-)
> 
> Best regards,
> 
> Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] xorg with nodm/xdm init.d script conflicts causes blank screen
  2019-09-13 21:08   ` Ezequiel Garcia
@ 2019-11-09 16:11     ` Ezequiel Garcia
  2019-11-17 19:28     ` Arnout Vandecappelle
  1 sibling, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2019-11-09 16:11 UTC (permalink / raw)
  To: buildroot

Hi everyone,

On Fri, 13 Sep 2019 at 18:09, Ezequiel Garcia <ezequiel@collabora.com> wrote:
>
> Hello everyone,
>
> On Fri, 2019-09-13 at 19:41 +0200, Thomas Petazzoni wrote:
> > Hello Tudor,
> >
> > Thanks for your report. I'm adding in Cc Bernd who added the Xorg init
> > script, and Ezequiel Garcia, who contributed the nodm package.
> >
>
> Thanks for the report and thanks for Ccing me. See my comments
> below, but beware: it's been a long while, so the little
> X understanding I ever had is today even smaller.
>
> > On Fri, 13 Sep 2019 16:24:52 +1000
> > Tudor Holton <tudor@smartguide.com.au> wrote:
> >
> > > Hello awesome buildroot people, :-)
> > >
> > > If I select the X.org server BR2_PACKAGE_XSERVER_XORG_SERVER and a
> > > display manager like BR2_PACKAGE_NODM, then I get 2 files in
> > > /etc/init.d:
> > >
> > > S40xorg which starts the server /usr/sbin/Xorg first and
> > > S90nodm which then tries to start another copy of Xorg (to call
> > > /etc/X11/Xsession and get everything on the display).
> > >
> > > Obviously, this doesn't work because nodm can't start a second X server,
> > > and the visual result is a black screen.  The only solution I can see is
> > > a post-build script to remove the S40xorg script to disable X and allow
> > > nodm to manage X.
> >
> > So it means that starting /usr/bin/nodm in fact starts another X.org
> > server. I would have expected S40xorg to start the X.org server, and
> > then S90nodm to start the display manager inside the X.org server
> > started by S40xorg, but apparently it's not the case.
> >
>
> Normally, display managers start X. E.g.:
>
> gdm:
> https://github.com/GNOME/gdm/blob/master/daemon/gdm-server.c#L710
>
> nodm:
> https://github.com/spanezz/nodm/blob/master/xserver.c#L159
>
> > > I've tried looking for:
> > > (a) A way to tell Xorg that nodm is the default application
> > > (b) A way to tell nodm that an Xorg is already running (the S90nodm
> > > script reads /etc/default/* but NODM_XINIT is now ignored and there
> > > aren't any other obvious options to nodm)
> > > (c) To use a different display manager, xdm, but they all seem to insert
> > > an init.d file that's in the range S90-S99 and follow the same
> > > presumption (that X has not started)
> >
> > So if all display manager all start their own X.org server instance, it
> > means that perhaps S40xorg should only be installed if there's no
> > display manager enabled ?
> >
>
> I guess that's right.
>
> > > What's the best (future-proof) approach to getting a display manager
> > > working with X in buildroot?
> >
>
> Keep in mind that nodm is _not_ a display manager, just as it's name implies.
> It's for embedded devices that don't want to login.
>
> > Bernd, Ezequiel, any suggestion here ?
> >
>
> When nodm was introduced, xorg-server didn't have the sysv init script.
> I assume it was added because Bernd needed to launch X without any session,
> but I don't truly understand the reasons for that route, as opposed to
> using a display manager. Or nodm, in case a fixed user login, no security
> is needed, as in a e.g. kiosk thing.
>
> I haven't checked if it's possible, but I guess we can make some hidden
> config symbol PROVIDES_X_DISPLAY_MANAGER for display managers to select,
> and then use it to restrict the xorg server sysv init so it's available
> only if no display manager was selected.
>
> Curious about the unfolding,
> Ezequiel
>
> > > P.S. (As an aside, why don't more buildroot init scripts use
> > > /etc/default config files?)
> >
> > Because we need more contributions to make our init scripts consistent
> > and use /etc/default config files! :-)
> >

What happened with this issue?

Regards,
Ezequiel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] xorg with nodm/xdm init.d script conflicts causes blank screen
  2019-09-13 21:08   ` Ezequiel Garcia
  2019-11-09 16:11     ` Ezequiel Garcia
@ 2019-11-17 19:28     ` Arnout Vandecappelle
  1 sibling, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-11-17 19:28 UTC (permalink / raw)
  To: buildroot



On 13/09/2019 23:08, Ezequiel Garcia wrote:
> Hello everyone,
> 
> On Fri, 2019-09-13 at 19:41 +0200, Thomas Petazzoni wrote:
[snip]
>> So it means that starting /usr/bin/nodm in fact starts another X.org
>> server. I would have expected S40xorg to start the X.org server, and
>> then S90nodm to start the display manager inside the X.org server
>> started by S40xorg, but apparently it's not the case.
>>
> 
> Normally, display managers start X. E.g.:
> 
> gdm:
> https://github.com/GNOME/gdm/blob/master/daemon/gdm-server.c#L710
> 
> nodm:
> https://github.com/spanezz/nodm/blob/master/xserver.c#L159
[snip]
>> So if all display manager all start their own X.org server instance, it
>> means that perhaps S40xorg should only be installed if there's no
>> display manager enabled ?
[snip]
> When nodm was introduced, xorg-server didn't have the sysv init script.
> I assume it was added because Bernd needed to launch X without any session,
> but I don't truly understand the reasons for that route, as opposed to
> using a display manager. Or nodm, in case a fixed user login, no security
> is needed, as in a e.g. kiosk thing.
> 
> I haven't checked if it's possible, but I guess we can make some hidden
> config symbol PROVIDES_X_DISPLAY_MANAGER for display managers to select,
> and then use it to restrict the xorg server sysv init so it's available
> only if no display manager was selected.

 Indeed, the proper way is probably to create a virtual package for display
managers, make the different display managers implementations of that virtual
package, and install the xorg init script only when there is no display manager.

 The virtual package will also make sure that there is only 1 display manager.

 Regards,
 Arnout

> 
> Curious about the unfolding,
> Ezequiel
> 
>>> P.S. (As an aside, why don't more buildroot init scripts use 
>>> /etc/default config files?)
>>
>> Because we need more contributions to make our init scripts consistent
>> and use /etc/default config files! :-)
>>
>> Best regards,
>>
>> Thomas
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-17 19:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-13  6:24 [Buildroot] xorg with nodm/xdm init.d script conflicts causes blank screen Tudor Holton
2019-09-13 17:41 ` Thomas Petazzoni
2019-09-13 21:08   ` Ezequiel Garcia
2019-11-09 16:11     ` Ezequiel Garcia
2019-11-17 19:28     ` Arnout Vandecappelle

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.