OpenBSD Xenocara supports "dummy" driver for headless X? (wd support FB resizing, Xvfb does not)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenBSD Xenocara supports "dummy" driver for headless X? (wd support FB resizing, Xvfb does not)

Tinker
Hi misc@,

I did not find any mentioning of OpenBSD Xenocara use of the "dummy"
video driver on mailing list nor web. Digging into code and
documentation, I think it looks like it's available and should work.

I'll try this out soon, this is mostly to mention the topic and to
check if anyone has any comments.


The idea is to run a dummy framebuffer X server which is resizeable,
as backend for X11Vnc. Support for dynamic resizing of the X
framebuffer, which is delivered through Xrandr by the VNC framebuffer
resize feature, is great when you VNC in from computers with different
resolutions.

The conventional way to resize the X framebuffer would be to restart
Xvfb(1) (http://man.openbsd.org/Xvfb.1) with the new resolution
specified as command line argument.


I got the idea of the existence of a dynamically resizeable virtual X
backend from the X11vnc's manual page (https://linux.die.net/man/1/x11vnc)
mentioning of the author's "Xdummy" script where "an advantage of
Xdummy over Xvfb is that Xdummy supports RANDR dynamic screen
resizing."

The script's sourcecode is at http://www.karlrunge.com/x11vnc/Xdummy ,
X11vnc's manual goes on to say that it "only works on Linux", derp, and
the script has shellscript and C parts that seem to implement privilege
separation logics that OpenBSD already provides, and what it does
overall seems to be to generate the xorg.conf(5) configuration attached
below.

The "Display drivers:" section in http://man.openbsd.org/xorg.conf.5#SEE_ALSO
lists no dummy driver, however, a "xf86-video-dummy" driver is located
in the source tree
(https://cvsweb.openbsd.org/cgi-bin/cvsweb/xenocara/driver/).

So I guess this should be tested and experimented with. Any comments
are welcome.

The X11vnc command line to deliver resizing should be "x11vnc -display
:0 -localhost -xrandr resize".

I presume that the xorg.conf below neither works nor is practical on
OpenBSD, but probably a good one can be created easily with it as
inspiration.

Thanks,
Tinker

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "freetype"
    Load           "glx"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       30.0 - 130.0
    VertRefresh     50.0 - 250.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "dummy"
    VideoRam       24000
    VendorName     "foovideo Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes      "1280x1024"
    EndSubSection
EndSection

Section "ServerFlags"
  Option "DontVTSwitch"       "true"
  Option "AllowMouseOpenFail" "true"
  Option "PciForceNone"       "true"
EndSection

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Xenocara supports "dummy" driver for headless X? (wd support FB resizing, Xvfb does not)

Jiri B-2
Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD Xenocara supports "dummy" driver for headless X? (wd support FB resizing, Xvfb does not)

Tinker
On March 29, 2018 5:00 PM, Jiri B <[hidden email]> wrote:
> See https://marc.info/?l=openbsd-misc&m=151877018030790&w=2
>
> Is it relevant?
>
> Jiri

Hi Jiri B!

Thanks for highlighting your post from last month! I skimmed it through
then but couldn't recall it now.

So the whole thread is at https://marc.info/?t=151873992400002&r=1&w=2 .

So, in the earlier post in the same thread
https://marc.info/?l=openbsd-misc&m=151873989824579&w=2 , you say that
you got the dummy driver going on a headless OpenBSD installation, that
you took your xorg.conf from https://xpra.org/xorg.conf , and that the
only caveat was that it works on baremetal but not in a VMM.

Awesome that you got it to work!

Did you see dynamic resizing working (from X11vnc via Xrandr to X
server)?

Did you notice any constraints/limits/bugs other than the VMM failure?

I'll test dummy X + X11vnc soon (on baremetal) soon and report back.

Thanks,
Tinker