Comments (10)
The commit above should fix this particular issue, but there are some other issues I am working through.
Mostly to do with deciding when to load X11
bindings and when not to, which is not as easy as it sounds..
from xpra.
Thanks for the update, I can certainly remain patient if this aspect is a work in progress. I usually struggle with when to report something or not 😛
I'm now seeing this in server.log
and it feels like it falls into "... deciding when to load X11 bindings ..." 👍 ::
$ cat server.log
2024-02-09 10:50:05,614 created tcp socket '192.168.68.12:10000'
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
xpra main error:
Traceback (most recent call last):
File "/usr/lib64/python3.11/site-packages/xpra/scripts/main.py", line 136, in main
return run_mode(script_file, cmdline, err, options, args, mode, defaults)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/xpra/scripts/main.py", line 512, in run_mode
return do_run_mode(script_file, cmdline, error_cb, options, args, mode, defaults)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/xpra/scripts/main.py", line 594, in do_run_mode
return run_server(script_file, cmdline, error_cb, options, args, mode, defaults)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/xpra/scripts/main.py", line 2070, in run_server
return do_run_server(script_file, cmdline, error_cb, options, args, mode, str(display or ""), defaults)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/xpra/scripts/server.py", line 759, in do_run_server
return _do_run_server(script_file, cmdline,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/xpra/scripts/server.py", line 1494, in _do_run_server
app = make_shadow_server(display_name, multi_window=mode == "shadow")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/xpra/scripts/server.py", line 338, in make_shadow_server
return ShadowServer(display, multi_window)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/xpra/platform/posix/shadow_server.py", line 82, in ShadowServer
return shadow_server(multi_window)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/xpra/platform/posix/remotedesktop.py", line 24, in __init__
super().__init__(multi_window)
File "/usr/lib64/python3.11/site-packages/xpra/platform/posix/fd_portal_shadow.py", line 50, in __init__
GTKShadowServerBase.__init__(self, multi_window=multi_window)
File "/usr/lib64/python3.11/site-packages/xpra/server/shadow/gtk_shadow_server_base.py", line 67, in __init__
ShadowServerBase.__init__(self, get_default_root_window())
File "/usr/lib64/python3.11/site-packages/xpra/server/shadow/shadow_server_base.py", line 45, in __init__
super().__init__()
File "/usr/lib64/python3.11/site-packages/xpra/server/rfb/server.py", line 37, in __init__
self.X11Keyboard = X11KeyboardBindings()
^^^^^^^^^^^^^^^^^^^^^
File "xpra/x11/bindings/keyboard.pyx", line 249, in xpra.x11.bindings.keyboard.X11KeyboardBindings
File "xpra/x11/bindings/core.pyx", line 63, in xpra.x11.bindings.core.X11CoreBindingsInstance.__cinit__
RuntimeError: X11 display is not set
from xpra.
Mostly to do with deciding when to load X11 bindings and when not to
RuntimeError: X11 display is not set
That's one of them!
And here's the patch that fixes this - which I don't like, because we need a more generic solution for this:
diff --git a/xpra/server/rfb/server.py b/xpra/server/rfb/server.py
index c324a5feae..1dc47c9f0c 100644
--- a/xpra/server/rfb/server.py
+++ b/xpra/server/rfb/server.py
@@ -3,6 +3,7 @@
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.
# pylint: disable-msg=E1101
+import os
from xpra.util.str_fn import repr_ellipsized, bytestostr
from xpra.util.system import is_X11
@@ -31,11 +32,11 @@ class RFBServer:
self.rfb_buttons = 0
self.x11_keycodes_for_keysym = {}
self.X11Keyboard = None
- if is_X11():
+ if os.environ.get("DISPLAY") and is_X11():
try:
from xpra.x11.bindings.keyboard import X11KeyboardBindings
self.X11Keyboard = X11KeyboardBindings()
- except ImportError:
+ except (ImportError, RuntimeError):
log("RFBServer", exc_info=True)
log.warn("Warning: no x11 bindings")
log.warn(" some RFB keyboard events may be missing")
from xpra.
I applied this patch and now the shadow session starts up, doing xpra attach tcp://<local_ip_of_remote_host>:10000
causes this:
If it matters:
- client has a Radeon 680M in it.
- shadow server has an NVIDIA T1000 in it, using an NVIDIA driver - I can switch it over to integrated Intel graphics if that's useful.
$ cat /run/user/1000/xpra/0/server.log
2024-02-09 12:55:47,703 created tcp socket '192.168.68.12:10000'
2024-02-09 12:55:47,846 Warning: no x11 bindings
2024-02-09 12:55:47,846 some RFB keyboard events may be missing
2024-02-09 12:55:47,859 wrote pid 7793 to '/run/user/1000/xpra/0/server.pid'
2024-02-09 12:55:47,863 some GStreamer elements are missing or unavailable on this system:
2024-02-09 12:55:47,863 vaapih264enc, vaapih265enc, amfh264enc, amfh265enc
2024-02-09 12:55:47,867 Warning: failed to get X11 root property '_NET_SUPPORTING_WM_CHECK'
2024-02-09 12:55:47,867 X11 display is not set
2024-02-09 12:55:47,869 Error: <class 'RuntimeError'>, X11 display is not set
2024-02-09 12:55:47,869 Error: <class 'RuntimeError'>, X11 display is not set
2024-02-09 12:55:47,869 Error: <class 'RuntimeError'>, X11 display is not set
2024-02-09 12:55:47,869 Error: <class 'RuntimeError'>, X11 display is not set
2024-02-09 12:55:47,870 Error: <class 'RuntimeError'>, X11 display is not set
2024-02-09 12:55:47,870 Error: <class 'RuntimeError'>, X11 display is not set
2024-02-09 12:55:47,871 Error: <class 'RuntimeError'>, X11 display is not set
2024-02-09 12:55:47,871 Error: <class 'RuntimeError'>, X11 display is not set
2024-02-09 12:55:47,871 Error: <class 'RuntimeError'>, X11 display is not set
2024-02-09 12:55:47,871 Error: <class 'RuntimeError'>, X11 display is not set
2024-02-09 12:55:47,871 Error: <class 'RuntimeError'>, X11 display is not set
2024-02-09 12:55:47,871 Error: <class 'RuntimeError'>, X11 display is not set
2024-02-09 12:55:47,877 cannot create group socket '/run/xpra/dell-win11suse.smhm.net-0'
2024-02-09 12:55:47,877 [Errno 13] Permission denied
2024-02-09 12:55:47,877 created unix domain sockets:
2024-02-09 12:55:47,877 '/run/user/1000/xpra/dell-win11suse.smhm.net-0'
2024-02-09 12:55:47,877 '/home/scott/.xpra/dell-win11suse.smhm.net-0'
2024-02-09 12:55:47,877 '/run/user/1000/xpra/0/socket'
2024-02-09 12:55:47,877 created abstract sockets:
2024-02-09 12:55:47,877 '@xpra/0'
2024-02-09 12:55:47,878 Warning: the unix domain socket cannot be found:
2024-02-09 12:55:47,878 '/@xpra/0'
2024-02-09 12:55:47,878 was it deleted by mistake?
2024-02-09 12:55:47,883 notification forwarding is not available
2024-02-09 12:55:47,883 the interface is already claimed
2024-02-09 12:55:47,887 Error: failed to setup clipboard helper
Traceback (most recent call last):
File "/usr/lib64/python3.11/site-packages/xpra/server/mixins/clipboard.py", line 114, in init_clipboard
module = __import__(mod, {}, {}, [parts[-1]])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/xpra/x11/gtk_x11/clipboard.py", line 35, in <module>
X11Window = X11WindowBindings()
^^^^^^^^^^^^^^^^^^^
File "xpra/x11/bindings/window.pyx", line 340, in xpra.x11.bindings.window.X11WindowBindings
File "xpra/x11/bindings/core.pyx", line 63, in xpra.x11.bindings.core.X11CoreBindingsInstance.__cinit__
RuntimeError: X11 display is not set
/usr/lib/python3.11/site-packages/pyinotify.py:71: DeprecationWarning: The asyncore module is deprecated and will be removed in Python 3.12. The recommended replacement is asyncio
import asyncore
/usr/lib/python3.11/site-packages/pyinotify.py:1476: DeprecationWarning: isSet() is deprecated, use is_set() instead
while not self._stop_event.isSet():
2024-02-09 12:55:47,907 watching for applications menu changes in:
2024-02-09 12:55:47,907 '/usr/share/applications'
2024-02-09 12:55:47,912 Warning: webcam forwarding is disabled
2024-02-09 12:55:47,912 the virtual video directory '/sys/devices/virtual/video4linux' was not found
2024-02-09 12:55:47,912 make sure that the 'v4l2loopback' kernel module is installed and loaded
2024-02-09 12:55:47,912 or use the 'webcam=no' option
2024-02-09 12:55:47,912 found 0 virtual video devices for webcam forwarding
2024-02-09 12:55:47,937 xpra is ready.
2024-02-09 12:55:48,053 GStreamer version 1.22.9
(Xpra:7793): Gdk-CRITICAL **: 12:55:48.073: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
2024-02-09 12:55:48,098 printer forwarding enabled using postscript and pdf
2024-02-09 12:55:48,139 31.0GB of system memory
2024-02-09 12:55:48,386 loaded 64 start menu entries from 8 sub-menus in 0.4 seconds
2024-02-09 12:55:49,021 OpenGL is supported on display ':0'
2024-02-09 12:55:49,022 using 'Quadro T1000/PCIe/SSE2' renderer
2024-02-09 12:55:49,022 Warning: failed to get X11 root property '_NET_SUPPORTING_WM_CHECK'
2024-02-09 12:55:49,022 X11 display is not set
2024-02-09 12:55:49,022 Warning: failed to get X11 root property '_NET_SUPPORTING_WM_CHECK'
2024-02-09 12:55:49,022 X11 display is not set
2024-02-09 12:55:51,235 python-zeroconf: '::' IPv6 loopback address is not supported
2024-02-09 12:55:52,853 xpra pipewire shadow server version 6.0-r35120M (g48bb2e95) beta
2024-02-09 12:55:52,853 uid=1000 (scott), gid=100 (users)
2024-02-09 12:55:52,854 running with pid 7793 on Linux openSUSE 20240208 n/a
2024-02-09 12:55:52,854 cpython 3.11
2024-02-09 12:55:52,854 on X11 display :0 of size 1920x1080
2024-02-09 12:56:04,243 New tcp connection received
2024-02-09 12:56:04,244 from '192.168.68.18:59302'
2024-02-09 12:56:04,244 on '192.168.68.12:10000'
2024-02-09 12:56:04,248 Handshake complete; enabling connection
2024-02-09 12:56:04,258 Python/GTK3 Linux openSUSE 20240208 n/a X11 client version 6.0
2024-02-09 12:56:04,258 OpenGL is enabled using glx backend with AMD Radeon Graphics radeonsi, rembrandt, LLVM 17.0.6, DRM 3.56, 6.7.2-1-default
2024-02-09 12:56:04,260 Error: processing new connection from Protocol(tcp socket: 192.168.68.12:10000 <- 192.168.68.18:59302):
Traceback (most recent call last):
File "/usr/lib64/python3.11/site-packages/xpra/server/base.py", line 441, in process_hello_ui
self.notify_new_user(ss)
File "/usr/lib64/python3.11/site-packages/xpra/platform/posix/fd_portal_shadow.py", line 71, in notify_new_user
self.create_session()
File "/usr/lib64/python3.11/site-packages/xpra/platform/posix/fd_portal_shadow.py", line 139, in create_session
remotedesktop_dbus_call(
File "/usr/lib64/python3.11/site-packages/xpra/platform/posix/fd_portal.py", line 47, in remotedesktop_dbus_call
dbus_desktop_call(REMOTEDESKTOP_IFACE, method, callback, *args, options=options)
File "/usr/lib64/python3.11/site-packages/xpra/platform/posix/fd_portal.py", line 65, in dbus_desktop_call
method(*(args + (options,)), dbus_interface=interface)
File "/usr/lib/python3.11/site-packages/dbus/proxies.py", line 141, in __call__
return self._connection.call_blocking(self._named_service,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/dbus/connection.py", line 634, in call_blocking
reply_message = self.send_message_with_reply_and_block(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
2024-02-09 12:56:04,261 Disconnecting client 192.168.68.18:59302:
2024-02-09 12:56:04,261 connection error (error accepting new connection)
2024-02-09 12:56:04,262 Python/GTK3 client 1 disconnected.
2024-02-09 12:56:04,263 Warning: failed to get X11 root property '_NET_SUPPORTING_WM_CHECK'
2024-02-09 12:56:04,263 X11 display is not set
from xpra.
@sbradnick 3d16560 is a better fix.
from xpra.
Thanks for the heads up :) I built it and installed it on 2 machines:
[server]: laptop w/ 9th Gen Intel and NVIDIA T1000 (but dGPU isn't being used, display uses Intel iGPU)
[client]: desktop w/ 7800x3d and NVIDIA RTX3070ti (again, dGPU isn't being used, display uses Radeon APU)
Both machines have their NVIDIA GPUs dedicated to vfio for gpu-passthrough for KVM/libvirtd ~ so hopefully they're not a part of this picture, I don't expect them to come into play for using xpra.
xpra shadow --bind-tcp=192.168.68.12:10000
starts right up 👍 but there are errors in the log for the server and printed on the client running xpra attach tcp://192.168.68.12:10000
--
server error:
2024-03-20 14:36:25,780 OpenGL is enabled using glx backend with AMD Radeon Graphics radeonsi, raphaelmendocino, LLVM 18.1.1, DRM 3.57, 6.7.9-1-default
2024-03-20 14:36:25,782 Error: processing new connection from Protocol(tcp socket: 192.168.68.12:10000 <- 192.168.68.23:60888):
Traceback (most recent call last):
File "/usr/lib64/python3.11/site-packages/xpra/server/base.py", line 441, in process_hello_ui
self.notify_new_user(ss)
File "/usr/lib64/python3.11/site-packages/xpra/platform/posix/fd_portal_shadow.py", line 72, in notify_new_user
self.create_session()
File "/usr/lib64/python3.11/site-packages/xpra/platform/posix/fd_portal_shadow.py", line 140, in create_session
remotedesktop_dbus_call(
File "/usr/lib64/python3.11/site-packages/xpra/platform/posix/fd_portal.py", line 47, in remotedesktop_dbus_call
dbus_desktop_call(REMOTEDESKTOP_IFACE, method, callback, *args, options=options)
File "/usr/lib64/python3.11/site-packages/xpra/platform/posix/fd_portal.py", line 65, in dbus_desktop_call
method(*(args + (options,)), dbus_interface=interface)
File "/usr/lib/python3.11/site-packages/dbus/proxies.py", line 141, in __call__
return self._connection.call_blocking(self._named_service,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/dbus/connection.py", line 634, in call_blocking
reply_message = self.send_message_with_reply_and_block(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop”
on object at path /org/freedesktop/portal/desktop
2024-03-20 14:36:25,783 Disconnecting client 192.168.68.23:60888:
2024-03-20 14:36:25,783 connection error (error accepting new connection)
client error:
self.pipeline = Gst.parse_launch(self.pipeline_str)
2024-03-20 14:36:25,603 Error setting up the pipeline:
2024-03-20 14:36:25,603 gst_parse_error: no property "name" in element "nvh264dec" (2)
2024-03-20 14:36:25,603 GStreamer pipeline for:
2024-03-20 14:36:25,603 appsrc name=src emit-signals=1 block=0 is-live=1 do-timestamp=1 stream-type=0 format=2 caps=video/x-h264,width=128,height=128,profile=(string)main,stream-format=(string)byte-stream,alignment=(string)au ! \
2024-03-20 14:36:25,603 nvh264dec name=decoder ! \
2024-03-20 14:36:25,603 appsink name=sink emit-signals=1 max-buffers=10 drop=False sync=False async=True qos=False caps=video/x-raw,width=128,height=128,format=(string)NV12
2024-03-20 14:36:25,603 Error creating context h264 128x128 YUV420P
2024-03-20 14:36:25,603 gstreamer: h264 decoding failed: failed to setup gstreamer pipeline
2024-03-20 14:36:25,733 OpenGL enabled on 'AMD Radeon Graphics'
2024-03-20 14:36:25,742 keyboard settings: rules=evdev, model=pc105inet, layout=us
2024-03-20 14:36:25,754 desktop size is 2560x1440:
2024-03-20 14:36:25,754 :0.0 (677x381 mm - DPI: 96x96)
2024-03-20 14:36:25,754 MSI DP-2 (698x393 mm - DPI: 93x93)
2024-03-20 14:36:25,790 removing unix domain socket '/run/user/1000/xpra/clients/smbfractal.smhm.net-30440'
2024-03-20 14:36:27,790 Warning: server connection failure:
2024-03-20 14:36:27,790 Connection failed: disconnected before the session could be established
2024-03-20 14:36:27,790 connection error
2024-03-20 14:36:27,790 error accepting new connection
I also tried each option in the list here:
$ xpra attach --video-decoders=help
the following video-decoders are defined: openh264, vpx, gstreamer, nvdec
And while I didn't get red errors printed for openh264, vpx, nvdec; a connection wasn't successful and they all seem to throw that same server error. Seems "gstreamer" might be the default.
from xpra.
This is a server-side error.
For some reason, xpra is choosing to use the "remotedesktop" dbus interface, but it isn't found or available:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop”
How many displays are running on this system? Are they wayland or X11? What DE?
from xpra.
Just 1 display for both; client has 1 1440p monitor connected via displayport, server has laptop screen at 1080p.
Both are X11; client is using i3 and server is using icewm.
I do have xdg-desktop-portal
installed and something vaguely approaching what it's complaining about available :P
$ rpm -qf /usr/share/dbus-1/interfaces/org.freedesktop.portal.RemoteDesktop.xml
xdg-desktop-portal-1.18.2-3.2.x86_64
from xpra.
@sbradnick is this still an issue?
I've modified a lot of the guessing code lately, so it should pick up the correct X11 / non-X11 backend and avoid trying to load X11 components when not running in X11 mode.
(made more difficult by the fact that we can do mixed mode: use freedesktop's RemoteDesktop
protocol on an X11 display..)
from xpra.
As of e2d97e3, this is also working again :) - awesome stuff!
from xpra.
Related Issues (20)
- Unable to set window title HOT 2
- take content-type into account when choosing an upscaling sampling filter HOT 7
- Segmentation fault in WSL2 with Intel GPU VA-API HOT 12
- start-desktop does not work with cinnamon X11 session (black screen) HOT 9
- make it possible to completely disable all of GStreamer at runtime HOT 2
- downscale just once HOT 2
- pycuda 2024.1.2 fails to build on Fedora 41 HOT 2
- Is there a release/version available for 32bit windows? HOT 1
- Causing Debian GUI first login failure HOT 1
- system tray forwarding causes crash HOT 3
- invalid encoding for tray: 'rgb' - message repeating continuously HOT 1
- too many keyboard error messages HOT 1
- macos client-only builds fail HOT 1
- Menu by mouse right click doesn't render correctly. HOT 29
- No connection possible with HTML5 client via proxy HOT 5
- ffmpeg decoder breakage HOT 3
- nvenc is now padding video frames HOT 1
- On windows client, change Picture -> Quality will only take effect on GUI after the second clicking HOT 1
- Unable to launch XPRA from web browser after updating from v5.0.9 to latest release (v6.1.2) HOT 14
- handle transient and permanent cuda failures differently HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xpra.