Add support for Xlibre#406
Conversation
|
I'll set up a FreeBSD 14.3 VM and try to reproduce this. Based on my previous experiences with Enrico Weigelt (see e.g. #362) I think it likely that some of the functions we need have been removed from the public module interface. I'll have a look and try to get more analysis of the problem first. |
|
These PRs seem to have caused this based on the log. I've not tested reverting them yet:
@jsorg71 - if we want to get Glamor working with XLibre do we have any alternative than to ask for these to be re-added into the public interface? |
|
Alternatively, we can drop support glamor with Xlibre. Not many people want Xlibre support, so it will be fine limited support. |
|
I don't think anyone knows how successful Xlibre is going to be, so it's hard to know if it's worth expending the effort to fix it. It's possible over time that xorgxrdp will have more problems with Xlibre than just Glamor. |
|
I agree. But it appears Enrico Weigelt is cooperative in creating the APIs if we need them, as done in #364. Could you also check the |
|
@metalefty - what exactly is the I've had a play, and if I make this change: diff --git a/module/rdpMain.c b/module/rdpMain.c
index cca3d6f..0b1909a 100644
--- a/module/rdpMain.c
+++ b/module/rdpMain.c
@@ -488,6 +488,7 @@ xorgxrdpDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, pointer ptr)
int
xorgxrdpCheckWrap(void)
{
+#if 0
if (g_nvidia_wrap_done)
{
return 0;
@@ -510,6 +511,7 @@ xorgxrdpCheckWrap(void)
xf86DriverList[0]->platformProbe = xorgxrdpPlatformProbe;
xf86DriverList[0]->driverFunc = xorgxrdpDriverFunc;
}
+#endif
return 0;
}
Everything builds and tests without With the code in, we get the following error on This is down to this commit: I can't think of a clean way around this. There's a hacky way, but I'd rather not suggest it! Any thoughts, @jsorg71? |
|
The xorgxrdpCheckWrap issue I meant is |
|
Yes, that's the same issue.
Line 495 in 7abffbf On Xorg (Ubuntu 24.02): On XLibre (FreeBSD 14.3): |
|
Hello! I skimmed through Xorgxrdp's code, did some testing, and it seams to me that this issue is caused by the lack of some glamor_* functions that are used in xrdpdri.c (added in 6660fad) in XLibre's version of the xorg/glamor.h SDK header (X11Libre/xserver@0644764 et. al.). These functions were removed from XLibre's driver API in a continuous process of trying to minimize the X server's driver API and better define and organize it, and since these functions were not at use by any driver at the time, they were "unexported". Since it looks like they are needed now, I think we should perhaps create an issue over at https://github.com/X11Libre/xserver/ or maybe a PR and add them back? |
|
Can you raise an issue or PR to Xlibre upstream? Honestly, we welcome adding support for Xlibre as long as it can be handled with changes on the xorgxrdp side, but we're not particularly enthusiastic about negotiating with the Xlibre upstream to request API changes. If someone else is willing to handle such negotiations, we'd be happy to continue working on our side. |
|
@metalefty I patched up the upcoming XLibre 25.1.4 release for FBSD/DFBSD adding the required functions back at b-aaz/xlibre-ports@7d28dad for allowing xorgxrdp-devel to compile. The overlay build (which includes the latest xorgxrdp-devel) has been successful on both FBSD & DFBSD: logs This new release, with the patches included, will hopefully also get pushed to FreeBSD latest soon. |
|
@metalefty |
|
Thank you, I'll check it. |
PR: 291596 Obtained from: neutrinolabs/xorgxrdp#406
|
@b-aaz Our CI depends on the pkg. Currently, our FreeBSD CI refers to the quarterly branch. It will take some time until we can pass the CI, even if we change it to refer to the main branch. |
These were dropped from public API, because no drivers were using them. In the longer run I'd prefer having the RDP video driver upstreamed, so we don't have to care about ABIs anymore (quite the same reason as in the Linux kernel ;-)) |
NullClient macro is dropped in Xlibre [1] [1] X11Libre/xserver#415 (cherry picked from commit f5a07e9)
(cherry picked from commit 1c93081)
(cherry picked from commit 58e6a64)
Xorg -showDefaultModulepath cannot get proper xlibre moduledir in FreeBSD. The moduledir differ like below: xlibre: /usr/local/lib/xorg/modules/xlibre-25 xorg: /usr/local/lib/xorg/modules
|
@metux It would be nice if it is backported to the next 25.1.x release. Regarding upstreaming, I personally keep our own release cycles but it is a good idea to include xorgxrdp build in upstream CI. Please note that xorgxrdp isn't a RDP driver, but a driver that provides specific interfaces to communicate with xrdp. |
|
The Xlibre CI will pass when freebsd/freebsd-ports@439ad72 comes to the CI environment. |
|
We're all done. Just need to wait until CI passes. |
Sure. But since Xserver drivers are deeply interwoven with the core Xserver (unfortunately, there's no clearly defined API), both sides need to be carefully kept in sync. If there instead was a stable API to the actual RDP protocol handling layer, which is just called by the driver, and the driver being upstreamed (in-tree on our side), those trouble would go away. By my quick scan through the code it looks like you're operating on a virtual framebuffer (not an actual HW display) and transmitting the render operations/results to the RDP client, correct ? |
Yes, as far as I understand, and receive keyboard/mouse events from the RDP client, as shown in the figure in the README. |
PR: 291596 Obtained from: neutrinolabs/xorgxrdp#406
|
The new xlibre has come to the CI environment. It builds but test-suite is failing. I'll look into that later. |
|
CI is failing due to |
|
This may be the problem: |
Adding Xlibre support on devel branch is a bit complicated. Need some work on glamor.
@jsorg71 @matt335672 Can you help?