neutrinolabs / xorgxrdp

Xorg drivers for xrdp
Other
451 stars 111 forks source link

Current xorg.conf always pulls hardware drives #248

Closed timtas closed 1 year ago

timtas commented 1 year ago

I ran into a lot of problems when trying to run xrdp with xrdpxorg on a box with a real intel graphics card and another already running an X serveron the real display, with xorg version 21.1.6.

The reason seemed to be that the currently distributed config fails to exclude the real intel drivers, leading to permission problems on the tty's.

On another box with an intel graphics card, but no X server running, xrdp/xorgxrpd worked fine, but as it pulled the intel hardware driver, then displayed movies on the real screen instead of inside the rdp session.

It turned that that the option

Option "AutoAddDevices" "off"

actually does not prevent xorg from still loading the actual hardware GPU driver, instead the option

Option "AutoAddGPU" "off"

is needed.

My now working xorg.conf looks as follows (only the changed sections):

Section "ServerLayout"
    Identifier "xrdp"
   # This was:  Identifier "X11 Server", needs sesman.ini to be changed to:
   # param=-layout
   # param=xrdp
    Screen "Screen (xrdpdev)"
    InputDevice "xrdpMouse" "CorePointer"
    InputDevice "xrdpKeyboard" "CoreKeyboard"
EndSection

Section "ServerFlags"
    # This line prevents "ServerLayout" sections in xorg.conf.d files
    # overriding the "X11 Server" layout (xrdp #1784)
    Option "DefaultServerLayout" "xrdp"
   # Should also work with:  Option "DefaultServerLayout" "X11 Server"
    Option "DontVTSwitch" "on"
    Option "AutoAddGPU" "off"
EndSection

Section "Module"
    Load "dbe"
    Load "ddc"
    Load "extmod"
    Load "glx"
    Load "int10"
    Load "record"
    Load "vbe"
    Load "xorgxrdp"
    Load "fb"
   # Add the following if you have compiled with --enable-gl
    Load "glamoregl"
EndSection

Section "Device"
    Identifier "Video Card (xrdpdev)"
    Driver "xrdpdev"
    Option "DRMDevice" "/dev/dri/renderD128"
    Option "DRI3" "1"
    Option "AutoAddGPU" "off"
EndSection

Section "Screen"
    Identifier "Screen (xrdpdev)"
    Device "Video Card (xrdpdev)"
    GPUDevice "Video Card (xrdpdev)"
    Monitor "Monitor"
    DefaultDepth 24
    SubSection "Display"
        Depth 24
        Modes "640x480" "800x600" "1024x768" "1280x720" "1280x1024" "1600x900" "1920x1080"
    EndSubSection
EndSection

Like this, it all works now like a charm.

matt335672 commented 1 year ago

Thanks @timtas

We merged a fix for this in #241. As ever, it will take a while to bubble through to the distros.