neutrinolabs / xorgxrdp

Xorg drivers for xrdp
Other
451 stars 111 forks source link

0.10 version AUR not starting #294

Closed pwn0r closed 6 months ago

pwn0r commented 6 months ago

Since AUR version of both beta xrdp and xorgxrdp was released on AUR, decided to try.

Previously xrdp+xorg was working fine on that machine, using recommended modifications (xinitrc and xwrapper).

Now even uninstalling xrdp and xorgxrpd and installing beta versions the x server does not start. Also used a hotfix for waitforx as in one of the issues on xrdp repo.

I guess the xrdp package is currently broken on AUR?

The main problem is always the same, the x server is not starting. Trying various things but the result is always same. e.g. used both Xorg and /usr/lib/Xorg in the sesman.ini etc. Does not matter if you remote login right after VM restart or after logging on console first (which works).

[   275.571] 
X.Org X Server 1.21.1.11
X Protocol Version 11, Revision 0
[   275.571] Current Operating System: Linux 6.7.7-1-MANJARO #1 SMP PREEMPT_DYNAMIC Fri Mar  1 18:26:06 UTC 2024 x86_64
[   275.571] Kernel command line: BOOT_IMAGE=/vmlinuz-6.7-x86_64 root=UUID=8a2888af-bced-4bae-aa7b-da0b9159a080 rw quiet udev.log_priority=3
[   275.571]  
[   275.571] Current version of pixman: 0.43.4
[   275.571]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   275.571] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   275.571] (++) Log file: ".xorgxrdp.10.log", Time: Tue Mar 12 11:24:42 2024
[   275.571] (++) Using config file: "/etc/X11/xrdp/xorg.conf"
[   275.571] (==) Using config directory: "/etc/X11/xorg.conf.d"
[   275.571] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   275.571] (**) Option "defaultserverlayout" "X11 Server"
[   275.571] (**) ServerLayout "X11 Server"
[   275.571] (**) |-->Screen "Screen (xrdpdev)" (0)
[   275.571] (**) |   |-->Monitor "Monitor"
[   275.571] (**) |   |-->Device "Video Card (xrdpdev)"
[   275.571] (**) |-->Input Device "xrdpMouse"
[   275.571] (**) |-->Input Device "xrdpKeyboard"
[   275.571] (**) Option "DontVTSwitch" "on"
[   275.571] (**) Option "AutoAddDevices" "off"
[   275.571] (**) Option "AutoAddGPU" "off"
[   275.571] (**) Not automatically adding devices
[   275.571] (==) Automatically enabling devices
[   275.571] (**) Not automatically adding GPU devices
[   275.571] (==) Automatically binding GPU devices
[   275.571] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   275.571] (WW) The directory "/usr/share/fonts/misc" does not exist.
[   275.571]    Entry deleted from font path.
[   275.571] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/TTF".
[   275.571]    Entry deleted from font path.
[   275.571]    (Run 'mkfontdir' on "/usr/share/fonts/TTF").
[   275.571] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[   275.571]    Entry deleted from font path.
[   275.571] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[   275.571]    Entry deleted from font path.
[   275.571] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[   275.571]    Entry deleted from font path.
[   275.571] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[   275.571]    Entry deleted from font path.
[   275.571] (==) FontPath set to:

[   275.571] (==) ModulePath set to "/usr/lib/xorg/modules"
[   275.571] (II) Module ABI versions:
[   275.571]    X.Org ANSI C Emulation: 0.4
[   275.571]    X.Org Video Driver: 25.2
[   275.571]    X.Org XInput driver : 24.4
[   275.571]    X.Org Server Extension : 10.0
[   275.573] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_39
[   275.573] (II) xfree86: Adding drm device (/dev/dri/card1)
[   275.573] (II) Platform probe for /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0004:00/VMBUS:00/5620e0c7-8062-4dce-aeb7-520c7ef76171/drm/card1
[   275.574] (EE) systemd-logind: failed to take device /dev/dri/card1: Operation not permitted
[   275.574] (II) no primary bus or device found
[   275.574] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[   275.574] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[   275.574] (II) LoadModule: "dbe"
[   275.574] (II) Module "dbe" already built-in
[   275.574] (II) LoadModule: "ddc"
[   275.574] (II) Module "ddc" already built-in
[   275.574] (II) LoadModule: "extmod"
[   275.574] (II) Module "extmod" already built-in
[   275.574] (II) LoadModule: "glx"
[   275.574] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   275.575] (II) Module glx: vendor="X.Org Foundation"
[   275.575]    compiled for 1.21.1.11, module version = 1.0.0
[   275.575]    ABI class: X.Org Server Extension, version 10.0
[   275.575] (II) LoadModule: "int10"
[   275.575] (II) Loading /usr/lib/xorg/modules/libint10.so
[   275.575] (II) Module int10: vendor="X.Org Foundation"
[   275.575]    compiled for 1.21.1.11, module version = 1.0.0
[   275.575]    ABI class: X.Org Video Driver, version 25.2
[   275.575] (II) LoadModule: "record"
[   275.575] (II) Module "record" already built-in
[   275.575] (II) LoadModule: "vbe"
[   275.575] (II) Loading /usr/lib/xorg/modules/libint10.so
[   275.575] (II) Module int10: vendor="X.Org Foundation"
[   275.575]    compiled for 1.21.1.11, module version = 1.0.0
[   275.575]    ABI class: X.Org Video Driver, version 25.2
[   275.575] (II) LoadModule: "xorgxrdp"
[   275.575] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[   275.577] (EE) Failed to load /usr/lib/xorg/modules/libxorgxrdp.so: /usr/lib/xorg/modules/libxorgxrdp.so: undefined symbol: glamor_xv_init
[   275.577] (EE) Failed to load module "xorgxrdp" (loader failed, 0)
[   275.577] (II) LoadModule: "fb"
[   275.577] (II) Module "fb" already built-in
[   275.577] (II) LoadModule: "xrdpdev"
[   275.577] (II) Loading /usr/lib/xorg/modules/drivers/xrdpdev_drv.so
[   275.577] (EE) Failed to load /usr/lib/xorg/modules/drivers/xrdpdev_drv.so: /usr/lib/xorg/modules/drivers/xrdpdev_drv.so: undefined symbol: rdpRRModeDestroy
[   275.577] (EE) Failed to load module "xrdpdev" (loader failed, 0)
[   275.577] (II) LoadModule: "xrdpmouse"
[   275.578] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[   275.578] (EE) Failed to load /usr/lib/xorg/modules/input/xrdpmouse_drv.so: /usr/lib/xorg/modules/input/xrdpmouse_drv.so: undefined symbol: rdpUnregisterInputCallback
[   275.578] (EE) Failed to load module "xrdpmouse" (loader failed, 0)
[   275.578] (II) LoadModule: "xrdpkeyb"
[   275.578] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[   275.578] (EE) Failed to load /usr/lib/xorg/modules/input/xrdpkeyb_drv.so: /usr/lib/xorg/modules/input/xrdpkeyb_drv.so: undefined symbol: rdpUnregisterInputCallback
[   275.578] (EE) Failed to load module "xrdpkeyb" (loader failed, 0)
[   275.578] (EE) No drivers available.
[   275.578] (EE) 
Fatal server error:
[   275.578] (EE) no screens found(EE) 
[   275.578] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[   275.578] (EE) Please also check the log file at ".xorgxrdp.10.log" for additional information.
[   275.578] (EE) 
[   275.578] (EE) Server terminated with error (1). Closing log file.
metalefty commented 6 months ago

BTW, you should use

this

instead of

this

when pasting log.

matt335672 commented 6 months ago

Looks like your xorgxrdp is missing #254

Are you in a position to check that the AUR version is up to date?

pwn0r commented 6 months ago

Looks like your xorgxrdp is missing #254

Are you in a position to check that the AUR version is up to date?

uptodate as per https://aur.archlinux.org/packages/xorgxrdp i.e. I had xorgxrdp 0.10.0-1 installed and built via pamac. Removing and rebuilding xrpd and xorgxrpd with pamac did not fix the issue. something along these lines:

pamac remove xrdp xorgxrdp
pamac clean -b
pamac install xrdp xorgxrdp

xrdp btw works just fine, the errors as per log above (sorry used quote before ) seems to suggest broken xorgxrdp package? As drivers do not load. I did see comments on the main xrdp AUR package and in the process of testing a workaround. Just that the package that is broken is not xrdp per se, but xrdpxorg.

HubKing commented 6 months ago

Is there a way to go back to the previous version? Mine is not starting with [ERROR] waitforx: Unable to open display :10. In my case, it was automatically installed when updating the system, and I don't think the updated version has any new interesting feature/changes for me.

metalefty commented 6 months ago

@HubKing That's the area of Arch Linux. You'll get better answers if you ask that in Arch Linux forum or somewhere. We're not responsible the package of each distribution.

pwn0r commented 6 months ago

Is there a way to go back to the previous version? Mine is not starting with [ERROR] waitforx: Unable to open display :10. In my case, it was automatically installed when updating the system, and I don't think the updated version has any new interesting feature/changes for me.

waitforx is not responsible here, I applied a "nop fix" as per one xrdp repo issue, that is replacing waitforx binary with a script which has "exit 0". The problem is that xorgxrdp does not start, so you need to check the actual log of this, ~/.xorgxrdp.10.log for example. This log is the only one here which details what exactly is not working.

HubKing commented 6 months ago

~/.xorgxrdp.10.log

Thanks. I checked the file and the content was like the following. Is this the same issue?

[  4522.726] X.Org X Server 1.21.1.11 X Protocol Version 11, Revision 0
[  4522.726] Current Operating System: Linux server 6.6.19-1-MANJARO #1 SMP PREEMPT_DYNAMIC Fri Mar  1 18:16:16 UTC 2024 x86_64
[  4522.726] Kernel command line: BOOT_IMAGE=/@/boot/vmlinuz-6.6-x86_64 root=UUID=1dd96095-f3b8-47bc-baf0-ca17a50794fd rw rootflags=subvol=@ rd.driver.pre=vfio-pci intel_iommu=on quiet udev.log_priority=3
[  4522.726]  
[  4522.726] Current version of pixman: 0.43.4
[  4522.726]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[  4522.726] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  4522.726] (++) Log file: ".xorgxrdp.10.log", Time: Tue Mar 12 22:00:36 2024
[  4522.726] (++) Using config file: "/etc/X11/xrdp/xorg.conf"
[  4522.726] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  4522.726] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  4522.727] (**) Option "defaultserverlayout" "X11 Server"
[  4522.727] (**) ServerLayout "X11 Server"
[  4522.727] (**) |-->Screen "Screen (xrdpdev)" (0)
[  4522.727] (**) |   |-->Monitor "Monitor"
[  4522.727] (**) |   |-->Device "Video Card (xrdpdev)"
[  4522.727] (**) |-->Input Device "xrdpMouse"
[  4522.727] (**) |-->Input Device "xrdpKeyboard"
[  4522.727] (**) Option "DontVTSwitch" "on"
[  4522.727] (**) Option "AutoAddDevices" "off"
[  4522.727] (**) Option "AutoAddGPU" "off"
[  4522.727] (**) Not automatically adding devices
[  4522.727] (==) Automatically enabling devices
[  4522.727] (**) Not automatically adding GPU devices
[  4522.727] (==) Automatically binding GPU devices
[  4522.727] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  4522.727] (WW) The directory "/usr/share/fonts/misc" does not exist.
[  4522.727]    Entry deleted from font path.
[  4522.727] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[  4522.727]    Entry deleted from font path.
[  4522.727] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[  4522.727]    Entry deleted from font path.
[  4522.727] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[  4522.727]    Entry deleted from font path.
[  4522.727] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[  4522.727]    Entry deleted from font path.
[  4522.727] (==) FontPath set to:
    /usr/share/fonts/TTF
[  4522.727] (==) ModulePath set to "/usr/lib/xorg/modules"
[  4522.727] (II) Module ABI versions:
[  4522.727]    X.Org ANSI C Emulation: 0.4
[  4522.727]    X.Org Video Driver: 25.2
[  4522.727]    X.Org XInput driver : 24.4
[  4522.727]    X.Org Server Extension : 10.0
[  4522.729] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_310
[  4522.730] (II) no primary bus or device found
[  4522.730] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[  4522.730] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[  4522.730] (II) LoadModule: "dbe"
[  4522.730] (II) Module "dbe" already built-in
[  4522.730] (II) LoadModule: "ddc"
[  4522.730] (II) Module "ddc" already built-in
[  4522.730] (II) LoadModule: "extmod"
[  4522.730] (II) Module "extmod" already built-in
[  4522.730] (II) LoadModule: "glx"
[  4522.730] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  4522.731] (II) Module glx: vendor="X.Org Foundation"
[  4522.731]    compiled for 1.21.1.11, module version = 1.0.0
[  4522.731]    ABI class: X.Org Server Extension, version 10.0
[  4522.731] (II) LoadModule: "int10"
[  4522.732] (II) Loading /usr/lib/xorg/modules/libint10.so
[  4522.732] (II) Module int10: vendor="X.Org Foundation"
[  4522.732]    compiled for 1.21.1.11, module version = 1.0.0
[  4522.732]    ABI class: X.Org Video Driver, version 25.2
[  4522.732] (II) LoadModule: "record"
[  4522.732] (II) Module "record" already built-in
[  4522.732] (II) LoadModule: "vbe"
[  4522.732] (II) Loading /usr/lib/xorg/modules/libint10.so
[  4522.732] (II) Module int10: vendor="X.Org Foundation"
[  4522.732]    compiled for 1.21.1.11, module version = 1.0.0
[  4522.732]    ABI class: X.Org Video Driver, version 25.2
[  4522.732] (II) LoadModule: "xorgxrdp"
[  4522.732] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[  4522.734] (EE) Failed to load /usr/lib/xorg/modules/libxorgxrdp.so: /usr/lib/xorg/modules/libxorgxrdp.so: undefined symbol: glamor_xv_init
[  4522.734] (EE) Failed to load module "xorgxrdp" (loader failed, 0)
[  4522.734] (II) LoadModule: "fb"
[  4522.734] (II) Module "fb" already built-in
[  4522.734] (II) LoadModule: "xrdpdev"
[  4522.734] (II) Loading /usr/lib/xorg/modules/drivers/xrdpdev_drv.so
[  4522.734] (EE) Failed to load /usr/lib/xorg/modules/drivers/xrdpdev_drv.so: /usr/lib/xorg/modules/drivers/xrdpdev_drv.so: undefined symbol: rdpRRModeDestroy
[  4522.734] (EE) Failed to load module "xrdpdev" (loader failed, 0)
[  4522.734] (II) LoadModule: "xrdpmouse"
[  4522.734] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[  4522.734] (EE) Failed to load /usr/lib/xorg/modules/input/xrdpmouse_drv.so: /usr/lib/xorg/modules/input/xrdpmouse_drv.so: undefined symbol: rdpUnregisterInputCallback
[  4522.734] (EE) Failed to load module "xrdpmouse" (loader failed, 0)
[  4522.734] (II) LoadModule: "xrdpkeyb"
[  4522.734] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[  4522.735] (EE) Failed to load /usr/lib/xorg/modules/input/xrdpkeyb_drv.so: /usr/lib/xorg/modules/input/xrdpkeyb_drv.so: undefined symbol: rdpUnregisterInputCallback
[  4522.735] (EE) Failed to load module "xrdpkeyb" (loader failed, 0)
[  4522.735] (EE) No drivers available.
[  4522.735] (EE) 
Fatal server error:
[  4522.735] (EE) no screens found(EE) 
[  4522.735] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[  4522.735] (EE) Please also check the log file at ".xorgxrdp.10.log" for additional information.
[  4522.735] (EE) 
[  4522.735] (EE) Server terminated with error (1). Closing log file.
pwn0r commented 6 months ago

I guess we can close the issue now :D it is as I assumed initially, seems to be a broken package on AUR.

provided that all your xrdp/sesman settings are correct otherwise, you can fix the problem with just one line:

pamac install xorgxrdp-glamor

which is also the same version on the current AUR, but it actually works unlike the generic xorgxrdp package.

HubKing commented 6 months ago

pamac install xorgxrdp-glamor

Well, I installed xorgxrdp-glamor, which removed xorgxrdp. The description says Only works on Intel and AMD GPUs., but somehow it worked on my computer which has no GPU at all.

PS: Also, the mouse cursor is no longer clipped. on 4K

matt335672 commented 6 months ago

I need to investigate this a little more before we close it I think.

The most likely reason for the failure of the vanilla package is there's a combination of compile switches for 0.10.x which doesn't work, and which we haven't come across in user-acceptance testing.

matt335672 commented 6 months ago

I've had a look at this, and it looks like a packaging issue.

I got off to a bad start, because I had a preconception about the cause of this, which was why I mentioned #254. That's nothing to do with it, and I apologise if I misled anyone.

@HubKing - your log file is consistent with that of @pwn0r

The packages xorgxrdp 0.10.0-3 and xorgxrdp-glamor 0.10.0-1 appear to be fundamentally the same:-

Both packages are built with the same source and --enable-glamor.

However, xorgxrdp-glamor has an extra patch which amongst other things modifies the linker path used to pick up modules. I'm guessing slightly, but I reckon that's the cause of the failure as everything else is the same.

The description 'Only works on Intel and AMD GPUs' for xorgxrdp-glamor is incorrect BTW.

matt335672 commented 6 months ago

xorgxrdp-0.10.0-4 is now out, so I'm closing this.

Chocobo1 commented 6 months ago

However, xorgxrdp-glamor has an extra patch which amongst other things modifies the linker path used to pick up modules. I'm guessing slightly, but I reckon that's the cause of the failure as everything else is the same.

If some patch (for fixing the missing flags, paths, etc.) is required for glamor to be working correctly, shouldn't upstream (this repo) consider picking up the patch instead? If not, please elaborate why.

matt335672 commented 6 months ago

Hi @Chocobo1

It depends on your platform.

Debian doesn't need a patch (rules file here) and neither does Fedora/EPEL (spec file here). I haven't looked into the Arch failure in any great detail, so I'm assuming it's the runtime linker path.

The extra patch used by xorgxrdp-glamor is assuming the linker uses specific flags rather than using the libtool-specific facilities. It's not suitable for direct inclusion in upstream. That's not to say that a suitable patch couldn't be developed.

matt335672 commented 6 months ago

@Chocobo1 - I've had a think about this and you're right - there's more we should be doing here.

I've had another look at the patch file used by xorgxrdp-glamor and it looks reasonably simple to upstream the important bits. A PR will be raised shortly.