[LightDM] launch xvfb if no monitor detected
Adam Nielsen
a.nielsen at shikadi.net
Sat May 9 00:51:57 UTC 2020
> I am not sure if this is the right mailing list to ask this but I will
> try. I am creating a Fedora remix for blind and visually impaired users.
> Some of these users have desktop computers without monitors, because
> they simply don't need them.
All LightDM does is start X-Windows, so your problem and solution will
be configuring X-Windows to run without a monitor present. X has quite
an extensive configuration so I expect this is possible. While you're
working on this, reviewing the X log files will be very helpful to find
out why it is not starting when expected. They can be a bit confusing
to read, but all the answers are there.
> Unfortunately, this causes a problem because the grahpical environment
> refuses to start at all if no monitor is detected.
This is a a bit surprising but maybe it depends on the video card in
the system. Although I have never tried it, I would've expected the
Linux kernel to create a framebuffer device which is then made
available to for X to use, with or without a monitor.
So possibly the framebuffer device is not enabled (a reasonable option
if one does not need a monitor) so enabling this is probably where I
would start. You may need to force a display mode through a kernel
parameter, as I am not sure what the kernel does if it detects no
monitor present.
Another option is that some drivers like nVidia's closed-source one
have options to start X without any display devices. I am not sure
entirely how they work - I suspect they may report a dummy display
device that later changes when the monitors are detected, so this could
be an option too. Possible drawbacks are that applications may
misbehave if they try to run with this dummy display (maybe the
resolution is too small so they crash when calculating widget sizes)
and of course it requires the users have an nVidia video card in their
PCs, which is an expense I would certainly forego if I didn't need to
connect a monitor!
> Do you think that lightdm can somehow solve this? Or should I solve it
> through some different component?
>
> I would like to use xvfb to simulate the monitor.
I think forcing the kernel to use a framebuffer device is probably the
way to go. X should detect this and use it with no further
configuration, in theory at least!
If you see any options relating to ignoring EDID or DDC I suggest they
be enabled, as this is used to query the presence of a monitor and list
the resolutions it is capable of, so likely this feature will have to be
disabled to reliably output a picture with no monitor connected.
Cheers,
Adam.
More information about the LightDM
mailing list