Use dummy driver in headless Xorg
This commit is contained in:
@@ -1,20 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -z "${VGL_DISPLAY-}" ]; then
|
if [ -z "${VGL_DISPLAY-}" ]; then
|
||||||
# Use the dummy X server if it is enabled
|
# Try to use the EGL backend
|
||||||
if [ "${SERVICE_XORG_HEADLESS_ENABLED:?}" = 'true' ]; then
|
for card in /dev/dri/card*; do
|
||||||
export VGL_DISPLAY=:0.0
|
if /opt/VirtualGL/bin/eglinfo -B "${card:?}" 2>/dev/null; then
|
||||||
else
|
export VGL_DISPLAY="${card:?}"
|
||||||
# Otherwise try to use the EGL backend
|
break
|
||||||
for card in /dev/dri/card*; do
|
|
||||||
if /opt/VirtualGL/bin/eglinfo -B "${card:?}" 2>/dev/null; then
|
|
||||||
export VGL_DISPLAY="${card:?}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
# And fallback to DISPLAY if the EGL backend is not available
|
|
||||||
if [ -z "${VGL_DISPLAY-}" ] && [ -n "${DISPLAY-}" ]; then
|
|
||||||
export VGL_DISPLAY="${DISPLAY:?}"
|
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
# And fallback to DISPLAY if the EGL backend is not available
|
||||||
|
if [ -z "${VGL_DISPLAY-}" ] && [ -n "${DISPLAY-}" ]; then
|
||||||
|
export VGL_DISPLAY="${DISPLAY:?}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,30 +1,20 @@
|
|||||||
Section "Module"
|
Section "Module"
|
||||||
Load "xorgxrdp"
|
Disable "glx"
|
||||||
EndSection
|
|
||||||
|
|
||||||
Section "ServerLayout"
|
|
||||||
Identifier "ServerLayout0"
|
|
||||||
Screen "Screen0"
|
|
||||||
EndSection
|
EndSection
|
||||||
|
|
||||||
Section "ServerFlags"
|
Section "ServerFlags"
|
||||||
Option "DefaultServerLayout" "ServerLayout0"
|
Option "DefaultServerLayout" "ServerLayout0"
|
||||||
Option "DontVTSwitch" "on"
|
Option "DontVTSwitch" "on"
|
||||||
|
Option "PciForceNone" "on"
|
||||||
Option "AutoAddDevices" "off"
|
Option "AutoAddDevices" "off"
|
||||||
Option "AutoAddGPU" "off"
|
Option "AutoAddGPU" "off"
|
||||||
EndSection
|
EndSection
|
||||||
|
|
||||||
Section "Monitor"
|
Section "ServerLayout"
|
||||||
Identifier "Monitor0"
|
Identifier "ServerLayout0"
|
||||||
VendorName "Unknown"
|
Screen "Screen0"
|
||||||
ModelName "Unknown"
|
InputDevice "Keyboard0"
|
||||||
EndSection
|
InputDevice "Mouse0"
|
||||||
|
|
||||||
Section "Device"
|
|
||||||
Identifier "Device0"
|
|
||||||
Driver "xrdpdev"
|
|
||||||
Option "DRMDevice" "/dev/dri/renderD128"
|
|
||||||
Option "DRI3" "1"
|
|
||||||
EndSection
|
EndSection
|
||||||
|
|
||||||
Section "Screen"
|
Section "Screen"
|
||||||
@@ -35,3 +25,26 @@ Section "Screen"
|
|||||||
Modes "800x600"
|
Modes "800x600"
|
||||||
EndSubSection
|
EndSubSection
|
||||||
EndSection
|
EndSection
|
||||||
|
|
||||||
|
Section "Monitor"
|
||||||
|
Identifier "Monitor0"
|
||||||
|
VendorName "Unknown"
|
||||||
|
ModelName "Unknown"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Device"
|
||||||
|
Identifier "Device0"
|
||||||
|
Driver "dummy"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "InputDevice"
|
||||||
|
Identifier "Keyboard0"
|
||||||
|
Driver "void"
|
||||||
|
Option "CoreKeyboard" "true"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "InputDevice"
|
||||||
|
Identifier "Mouse0"
|
||||||
|
Driver "void"
|
||||||
|
Option "CorePointer" "true"
|
||||||
|
EndSection
|
||||||
|
|||||||
Reference in New Issue
Block a user