xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Opened 9 months ago

Closed 9 months ago

Last modified 8 months ago

#2978 closed defect (needinfo)

Error: failed to convert svg icon

Reported by: mviereck Owned by: mviereck
Priority: major Milestone: 4.1
Component: server Version: 4.0.x
Keywords: Cc:

Description

xpra v4.1-r28110 from winswitch repository on debian bullseye/testing

The log shows dozens of identical error messages:

2020-12-13 15:46:30,186 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 15:46:30,249 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available

Nothing special is needed to trigger the error: xpra start :50
Attaching with xpra attach :50 works.

Attachments (1)

qmidinet.svg (69.9 KB) - added by mviereck 9 months ago.
icon reported in log to cause issue

Download all attachments as: .zip

Change History (18)

comment:1 Changed 9 months ago by mviereck

Special case:

Xvfb :50 &
DISPLAY=:50 xpra start :50 --no-daemon --use-display

This triggers the error to appear earlier and more often.
It slows down the server start until 'xpra is ready' up to 50s.
Setting variable DISPLAY to the target display makes the difference here. In my setups I do this along with variable XAUTHORITY to allow X access for xpra.

In this case an xpra attach :50 started at the same time fails because it waits 20s only.

Last edited 9 months ago by mviereck (previous) (diff)

comment:2 Changed 9 months ago by mviereck

Full xpra server log output for the example in the second post:

$ DISPLAY=:50 xpra start :50 --use-display --no-daemon
2020-12-13 17:00:23,564 Error: cannot enable SSH socket upgrades:
2020-12-13 17:00:23,564  No module named 'paramiko'
2020-12-13 17:00:23,704 created unix domain socket '/run/user/1000/xpra/debianlaptop-50'
2020-12-13 17:00:23,704 cannot create group socket '/run/xpra/debianlaptop-50'
2020-12-13 17:00:23,705  [Errno 13] Permission denied
2020-12-13 17:00:23,705 created unix domain socket '/home/lauscher/.xpra/debianlaptop-50'
2020-12-13 17:00:23,866 pointer device emulation using XTest
Error: cannot find directory '/usr/share/xpra/css'
2020-12-13 17:00:24,032 serving html content from '/usr/share/xpra/www'
2020-12-13 17:00:24,048 Warning: no XShm support on display :50
2020-12-13 17:00:24,080 xvfb pid not found
2020-12-13 17:00:26,288 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:00:26,339 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:00:34,331 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:00:34,499 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:00:39,580 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:00:39,632 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:00:43,231 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:00:43,270 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:00:46,023 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:00:47,670 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:00:47,719 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:00:55,885 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:00:56,058 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:01:01,215 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:01:01,267 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:01:04,703 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:01:04,737 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:01:07,728 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 114, in load_icon_from_file
    gi.require_version('Rsvg', '2.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Rsvg not available
2020-12-13 17:01:10,004 loaded 78 start menu entries from 13 sub-menus
2020-12-13 17:01:10,004 Warning: found 8 large icons:
2020-12-13 17:01:10,004  '/home/lauscher/.local/share/icons/rosa-icons/72x72/apps/system-run.svg' (73 KB)
2020-12-13 17:01:10,004  '/usr/share/icons/hicolor/scalable/apps/redshift.svg' (95 KB)
2020-12-13 17:01:10,004  '/home/lauscher/.local/share/icons/rosa-icons/72x72/apps/camera-photo.svg' (79 KB)
2020-12-13 17:01:10,004  '/usr/share/icons/hicolor/scalable/apps/org.gnome.gThumb.svg' (322 KB)
2020-12-13 17:01:10,005  '/usr/share/icons/hicolor/scalable/apps/qjackctl.svg' (89 KB)
2020-12-13 17:01:10,005  '/usr/share/icons/hicolor/scalable/apps/qmidinet.svg' (69 KB)
2020-12-13 17:01:10,005  '/home/lauscher/.local/share/icons/rosa-icons/72x72/apps/system-lock-screen.svg' (138 KB)
2020-12-13 17:01:10,005  '/home/lauscher/.local/share/icons/rosa-icons/72x72/apps/preferences-system-network.svg' (238 KB)
2020-12-13 17:01:10,005  more bandwidth will be used by the start menu data
2020-12-13 17:01:10,028 Warning: failed to load the mdns publisher
2020-12-13 17:01:10,030  No module named 'avahi'
2020-12-13 17:01:10,031  either install the 'python-avahi' module
2020-12-13 17:01:10,031  or use the 'mdns=no' option
2020-12-13 17:01:10,067 Warning: cannot forward notifications,
2020-12-13 17:01:10,067  the interface is already claimed
2020-12-13 17:01:10,067  if you do not have a dedicated dbus session for this xpra instance,
2020-12-13 17:01:10,067  use the 'notifications=no' option
2020-12-13 17:01:10,103 pulseaudio server started with pid 220956
2020-12-13 17:01:10,104  private server socket path:
2020-12-13 17:01:10,105  '/run/user/1000/xpra/pulse-50/pulse/native'

(Xpra:220941): Gtk-CRITICAL **: 17:01:10.268: gtk_widget_realize: assertion 'widget->priv->anchored || GTK_IS_INVISIBLE (widget)' failed
2020-12-13 17:01:10,287 Warning: webcam forwarding is disabled
2020-12-13 17:01:10,287  the virtual video directory '/sys/devices/virtual/video4linux' was not found
2020-12-13 17:01:10,288  make sure that the 'v4l2loopback' kernel module is installed and loaded
2020-12-13 17:01:10,288  or use the 'webcam=no' option
2020-12-13 17:01:10,288 found 0 virtual video devices for webcam forwarding
2020-12-13 17:01:10,382 xpra is ready.
2020-12-13 17:01:10,384 xpra GTK3 X11 version 4.1-r28110 64-bit
2020-12-13 17:01:10,690  uid=1000 (lauscher), gid=1000 (lauscher)
2020-12-13 17:01:10,691  running with pid 220941 on Linux Debian testing bullseye
2020-12-13 17:01:10,692  connected to X11 display :50 with 24 bit colors
2020-12-13 17:01:10,816 GStreamer version 1.18.2 for Python 3.9.1 64-bit
/usr/lib/python3/dist-packages/gi/overrides/Gtk.py:1649: Warning: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
  return _Gtk_main(*args, **kwargs)
2020-12-13 17:01:14,554 printer forwarding enabled using postscript and pdf
2020-12-13 17:01:14,622 watching for applications menu changes in:
2020-12-13 17:01:14,622  '/usr/share/xfce4/applications'
2020-12-13 17:01:14,623  '/usr/share/applications'
2020-12-13 17:01:14,623  '/usr/share/applications'
2020-12-13 17:01:14,716 vpx: vp9 encoding failed: failed to instantiate vp9 encoder with ABI version 23: Invalid parameter
2020-12-13 17:01:15,216 found 1 vaapi codecs: h264
2020-12-13 17:01:15,320 found 1 vaapi codecs: h264
2020-12-13 17:01:15,351 6.8GB of system memory
2020-12-13 17:01:17,084 OpenGL is supported on display ':50'
2020-12-13 17:01:17,085  using 'llvmpipe (LLVM 11.0.0, 256 bits)' renderer

comment:3 Changed 9 months ago by Antoine Martin

Status: newassigned

Thanks, I think there's just a missing dependency on the rsvg gi bindings.

BTW, what's the rationale for --auto: default to --nxagent instead of --xpra in seamless mode?

Last edited 9 months ago by Antoine Martin (previous) (diff)

comment:4 Changed 9 months ago by Antoine Martin

Owner: changed from Antoine Martin to mviereck
Status: assignednew

r28122 will now warn just once if the Rsvg library is missing.

The missing dependency should be fixed in r28123.
Until I upload newer packages, you can verify by installing gir1.2-rsvg-2.0 by hand.

comment:5 Changed 9 months ago by mviereck

The issue persists with much less error messages, still with a long delay, after installing gir1.2.-rsvg-2.0.
The message looks sligthly different:

2020-12-13 17:27:16,290 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 118, in load_icon_from_file
    handle = Rsvg.Handle.new_from_data(icondata)
gi.repository.GLib.GError: rsvg-error-quark: XML parse error: error code=201 (3) in (null):186:49: Namespace prefix inkscape for label on g is not defined
 (0)
2020-12-13 17:27:37,811 Error: failed to convert svg icon
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 118, in load_icon_from_file
    handle = Rsvg.Handle.new_from_data(icondata)
gi.repository.GLib.GError: rsvg-error-quark: XML parse error: error code=201 (3) in (null):186:49: Namespace prefix inkscape for label on g is not defined
 (0)

BTW, what's the rationale for ​--auto: default to --nxagent instead of --xpra in seamless mode?

It was a reaction to this issue. I wanted to provide a working default until I could trace down the xpra issue. Wasn't easy to figure out the delay trigger with a proceeding DISPLAY.
And, I admit, over the years it occured more than once that the --xpra option of x11docker broke after an xpra update. Though, a long time before today that this happened the last time.

comment:6 Changed 9 months ago by Antoine Martin

Owner: changed from mviereck to Antoine Martin
Status: newassigned

The issue persists with much less error messages

This is a different error, and by the looks of things, not one we can do much about: the system rsvg library is unable to load an svg icon installed on your system's menu.
This looks related to: Illustrator SVG export not working (namespace prefix inkscape not defined) - so perhaps hot-patching (yuk) the svg data will allow rsvg to parse it.

still with a long delay
Wasn't easy to figure out the delay trigger with a proceeding DISPLAY.

What delay?
Do you mean that loading these icons takes too long?

Then you may want to just turn off the feature completely: XPRA_XDG_EXPORT_ICONS=0.
The systray menus will lose the icons for the server's start menu.

the --xpra option of x11docker broke after an xpra update

The xpra command line is supposed to be backwards compatible, all the way to pre-v1 versions - sorry if it broke, I was not aware of it.
(edit: except for the beta channel - this sometimes break, especially with new dependencies like this one)

Last edited 9 months ago by Antoine Martin (previous) (diff)

comment:7 Changed 9 months ago by mviereck

With XPRA_XDG_EXPORT_ICONS=0 the error message disappears. But now the delay increases to 5 minutes (marked in the log). Previously/without XPRA_XDG_EXPORT_ICONS=0 the error messages appeared within this delay that was at about 50s when I opened the ticket.
Before my update there was no notable delay. But I am not sure which xpra version it was before, its a long time since my last system update.

$ XPRA_XDG_EXPORT_ICONS=0 DISPLAY=:50 xpra start :50 --use-display --no-daemon
2020-12-13 18:06:44,799 Error: cannot enable SSH socket upgrades:
2020-12-13 18:06:44,799  No module named 'paramiko'
2020-12-13 18:06:44,937 created unix domain socket '/run/user/1000/xpra/debianlaptop-50'
2020-12-13 18:06:44,938 cannot create group socket '/run/xpra/debianlaptop-50'
2020-12-13 18:06:44,938  [Errno 13] Permission denied
2020-12-13 18:06:44,939 created unix domain socket '/home/lauscher/.xpra/debianlaptop-50'
2020-12-13 18:06:45,106 pointer device emulation using XTest
Error: cannot find directory '/usr/share/xpra/css'
2020-12-13 18:06:45,270 serving html content from '/usr/share/xpra/www'
2020-12-13 18:06:45,286 Warning: no XShm support on display :50
2020-12-13 18:06:45,319 xvfb pid not found

>>> Delay 5 minutes

2020-12-13 18:11:42,297 loaded 78 start menu entries from 13 sub-menus
2020-12-13 18:11:42,297 Warning: found 3 large icons:
2020-12-13 18:11:42,297  '/home/lauscher/.local/share/icons/OldBrownWoodIcons/256x256/apps/aeskulap.png' (72 KB)
2020-12-13 18:11:42,297  '/home/lauscher/.local/share/icons/OldBrownWoodIcons/256x256/apps/chromium.png' (72 KB)
2020-12-13 18:11:42,297  '/home/lauscher/.local/share/icons/OldBrownWoodIcons/256x256/apps/xine.png' (69 KB)
2020-12-13 18:11:42,297  more bandwidth will be used by the start menu data
2020-12-13 18:11:42,305 Missing property or wrong property type _MOTIF_WM_HINTS (motif-hints)
2020-12-13 18:11:42,305  no such window
2020-12-13 18:11:42,315 Warning: failed to load the mdns publisher
2020-12-13 18:11:42,315  No module named 'avahi'
2020-12-13 18:11:42,316  either install the 'python-avahi' module
2020-12-13 18:11:42,316  or use the 'mdns=no' option
2020-12-13 18:11:42,346 Warning: cannot forward notifications,
2020-12-13 18:11:42,346  the interface is already claimed
2020-12-13 18:11:42,346  if you do not have a dedicated dbus session for this xpra instance,
2020-12-13 18:11:42,346  use the 'notifications=no' option
2020-12-13 18:11:42,380 pulseaudio server started with pid 221529
2020-12-13 18:11:42,382  private server socket path:
2020-12-13 18:11:42,384  '/run/user/1000/xpra/pulse-50/pulse/native'

(Xpra:221501): Gtk-CRITICAL **: 18:11:42.563: gtk_widget_realize: assertion 'widget->priv->anchored || GTK_IS_INVISIBLE (widget)' failed
2020-12-13 18:11:42,579 Warning: webcam forwarding is disabled
2020-12-13 18:11:42,580  the virtual video directory '/sys/devices/virtual/video4linux' was not found
2020-12-13 18:11:42,581  make sure that the 'v4l2loopback' kernel module is installed and loaded
2020-12-13 18:11:42,581  or use the 'webcam=no' option
2020-12-13 18:11:42,582 found 0 virtual video devices for webcam forwarding
2020-12-13 18:11:42,688 xpra is ready.

For the 50s delay look at the log in the third post, timestamps:

2020-12-13 17:00:26,288 Error: failed to convert svg icon
2020-12-13 17:01:10,004 loaded 78 start menu entries from 13 sub-menus

(edit: except for the beta channel - this sometimes break, especially with new dependencies like this one)

Indeed, I am using the beta branch. I thought I would be on the stable branch, sorry. Of course, beta versions can have sudden issues. I'll check the stable version again.

comment:8 Changed 9 months ago by Antoine Martin

But now the delay increases to 5 minutes

That's completely crazy!
The only thing that XPRA_XDG_EXPORT_ICONS=0 does is to skip the part of the code that loads the icons. Why would it take longer to not do something?

But I am not sure which xpra version it was before, its a long time since my last system update.

Ah, so perhaps it's the loading of the system menus that is really slow on your system. It takes 2.5 seconds on mine:

$ time python3 ./xpra/platform/xposix/xdg_helper.py
(..)
real	0m2.402s
user	0m2.000s
sys	0m0.401s

Which isn't great but bearable. Running from an NVME drive may have something to do with it.

FYI, this is done semi-asynchronously: the server is ready to accept connections before it finishes loading the startup menu, but it won't be able to actually service and reply to those connections until this menu loading is complete.
I think we should be able to use the fully asynchronous mode with newer clients.

If you don't need to have the start menu available in your session, then you should just turn off the feature completely:

XPRA_EXPORT_XDG_MENU_DATA=0 xpra start ..

This will skip loading the menu.

Or even:

xpra start --start-new-commands=no ..

Makes it impossible to start new commands in an existing session, which also skips loading the system menu.
(this has been available since v0.15.x)

comment:9 Changed 9 months ago by mviereck

If you don't need to have the start menu available in your session, then you should just turn off the feature completely:

XPRA_EXPORT_XDG_MENU_DATA=0 xpra start ..
This will skip loading the menu.
Or even:
xpra start --start-new-commands=no ..
Makes it impossible to start new commands in an existing session, which also skips loading the system menu.

I've included both in my command, it doesn't help:

env  DISPLAY=:112 XAUTHORITY=/home/lauscher/.cache/x11docker/x11docker-check-40686989904/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X112 XDG_RUNTIME_DIR=/run/user/1000 \
  GDK_BACKEND=x11 \
  NO_AT_BRIDGE=1 \
  XPRA_EXPORT_ICON_DATA=0 \
  XPRA_ICON_OVERLAY=0 \
  XPRA_EXPORT_XDG_MENU_DATA=0 \
  XPRA_MENU_ICONS=0 \
  XPRA_UINPUT=0 \
   xpra start :112 --use-display \
  --csc-modules=none \
  --encodings=rgb \
  --microphone=no \
  --notifications=no \
  --pulseaudio=no \
  --socket-dirs='/home/lauscher/.cache/x11docker/x11docker-check-40686989904' \
  --speaker=no \
  --start-via-proxy=no \
  --webcam=no \
  --xsettings=no \
  --clipboard=yes\
  --dbus-proxy=no \
  --daemon=no \
  --fake-xinerama=no \
  --file-transfer=off \
  --html=off \
  --opengl=noprobe \
  --mdns=no \
  --printing=no \
  --session-name='x11docker-check' \
  --start-new-commands=no \
  --systemd-run=no \
  --video-encoders=none \
  --dpi='96'

Please note that the leading DISPLAY pointing to the already running Xvfb makes a big difference. Please try if you can reproduce the delays:

# 50s delay
Xvfb :50 &
sleep 2
DISPLAY=:50 xpra start :50 --no-daemon --use-display
# 5 minutes delay
Xvfb :50 &
sleep 2
DISPLAY=:50 XPRA_XDG_EXPORT_ICONS=0 xpra start :50 --no-daemon --use-display

comment:10 Changed 9 months ago by mviereck

I found that I can avoid the delay issues if I set XAUTHORITY only and omit DISPLAY. Setting XPRA_XDG_EXPORT_ICONS does not hurt in that case.
xpra succeeds to access the display with XAUTHORITY only.
So I have a usable workaround.

comment:11 Changed 9 months ago by Antoine Martin

Owner: changed from Antoine Martin to mviereck
Status: assignednew

Looked into it: #2815 includes "r26797 xdg menu loading in parallel", which means that we don't wait for the menus to be loaded to accept new client connections (as long as the clients are new enough) - and I have tested this by adding a 30 seconds delay in the menu loading code.
The server is ready within seconds, including printing xpra is ready, no matter how long it takes to load the menu.

I have also tested the latest beta builds in a Debian Bullseye virtual machine and xpra is ready is printed long before it starts loading the menus. And even in a VM, that only took 1.5 seconds.

I found that I can avoid the delay issues if I set XAUTHORITY only and omit DISPLAY.

Hmm. Wait.

$ XPRA_XDG_EXPORT_ICONS=0 DISPLAY=:50 xpra start :50 --use-display --no-daemon

You probably should not set DISPLAY here.
It could be the splash screen (#2540) that is slowing things down somehow - if that's the case, --splash=no will fix it.
Or perhaps it is the python-xdg library that is trying to access the display (to get the DE name?) and timing out. You could verify this one by running the xdg menu test script with and without DISPLAY set:

DISPLAY= python3 ./xpra/platform/xposix/xdg_helper.py

comment:12 Changed 9 months ago by mviereck

Or perhaps it is the python-xdg library that is trying to access the display (to get the DE name?) and timing out. You could verify this one by running the xdg menu test script with and without DISPLAY set:

DISPLAY= python3 ./xpra/platform/xposix/xdg_helper.py

This one is getting close, at least for XPRA_XDG_EXPORT_ICONS=0.

The content of DISPLAY does not make a difference in this tests, always takes 60s.
Setting XPRA_XDG_EXPORT_ICONS=0 takes 6 minutes regardless of DISPLAY.

Test runs with DISPLAY (valid/empty/unset):

lauscher@debianlaptop:/$ echo $DISPLAY; time python3 ./usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py >/dev/null
:0.0
2020-12-14 12:48:42,888 Error: failed to convert svg icon
Traceback (most recent call last):
  File "//./usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 124, in load_icon_from_file
    handle = Rsvg.Handle.new_from_data(icondata)
gi.repository.GLib.GError: rsvg-error-quark: XML parse error: error code=201 (3) in (null):186:49: Namespace prefix inkscape for label on g is not defined
 (0)
2020-12-14 12:49:11,317 Error: failed to convert svg icon
Traceback (most recent call last):
  File "//./usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 124, in load_icon_from_file
    handle = Rsvg.Handle.new_from_data(icondata)
gi.repository.GLib.GError: rsvg-error-quark: XML parse error: error code=201 (3) in (null):186:49: Namespace prefix inkscape for label on g is not defined
 (0)
2020-12-14 12:49:23,195 loaded 78 start menu entries from 13 sub-menus
2020-12-14 12:49:23,195 Warning: found 1 large icon:
2020-12-14 12:49:23,195  '/usr/share/icons/hicolor/scalable/apps/qmidinet.svg' (69 KB)
2020-12-14 12:49:23,195  more bandwidth will be used by the start menu data

real	1m0,425s
user	0m41,393s
sys	0m18,418s
lauscher@debianlaptop:/$ time env DISPLAY= python3 ./usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py >/dev/null
2020-12-14 12:30:39,092 Error: failed to convert svg icon
Traceback (most recent call last):
  File "//./usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 124, in load_icon_from_file
    handle = Rsvg.Handle.new_from_data(icondata)
gi.repository.GLib.GError: rsvg-error-quark: XML parse error: error code=201 (3) in (null):186:49: Namespace prefix inkscape for label on g is not defined
 (0)
2020-12-14 12:31:06,763 Error: failed to convert svg icon
Traceback (most recent call last):
  File "//./usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 124, in load_icon_from_file
    handle = Rsvg.Handle.new_from_data(icondata)
gi.repository.GLib.GError: rsvg-error-quark: XML parse error: error code=201 (3) in (null):186:49: Namespace prefix inkscape for label on g is not defined
 (0)
2020-12-14 12:31:17,716 loaded 78 start menu entries from 13 sub-menus
2020-12-14 12:31:17,716 Warning: found 1 large icon:
2020-12-14 12:31:17,716  '/usr/share/icons/hicolor/scalable/apps/qmidinet.svg' (69 KB)
2020-12-14 12:31:17,716  more bandwidth will be used by the start menu data

real	0m59,276s
user	0m40,081s
sys	0m18,842s
lauscher@debianlaptop:/$ unset DISPLAY; time python3 ./usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py >/dev/null
2020-12-14 12:49:54,149 Error: failed to convert svg icon
Traceback (most recent call last):
  File "//./usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 124, in load_icon_from_file
    handle = Rsvg.Handle.new_from_data(icondata)
gi.repository.GLib.GError: rsvg-error-quark: XML parse error: error code=201 (3) in (null):186:49: Namespace prefix inkscape for label on g is not defined
 (0)
2020-12-14 12:50:21,545 Error: failed to convert svg icon
Traceback (most recent call last):
  File "//./usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 124, in load_icon_from_file
    handle = Rsvg.Handle.new_from_data(icondata)
gi.repository.GLib.GError: rsvg-error-quark: XML parse error: error code=201 (3) in (null):186:49: Namespace prefix inkscape for label on g is not defined
 (0)
2020-12-14 12:50:32,692 loaded 78 start menu entries from 13 sub-menus
2020-12-14 12:50:32,692 Warning: found 1 large icon:
2020-12-14 12:50:32,692  '/usr/share/icons/hicolor/scalable/apps/qmidinet.svg' (69 KB)
2020-12-14 12:50:32,693  more bandwidth will be used by the start menu data

real	0m58,603s
user	0m40,215s
sys	0m18,085s

Test runs with DISPLAY and XPRA_XDG_EXPORT_ICONS=0:

lauscher@debianlaptop:/$ echo $DISPLAY; time env XPRA_XDG_EXPORT_ICONS=0 python3 ./usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py >/dev/null
:0.0
2020-12-14 13:02:36,030 loaded 78 start menu entries from 13 sub-menus
2020-12-14 13:02:36,030 Warning: found 3 large icons:
2020-12-14 13:02:36,030  '/home/lauscher/.local/share/icons/OldBrownWoodIcons/256x256/apps/aeskulap.png' (72 KB)
2020-12-14 13:02:36,030  '/home/lauscher/.local/share/icons/OldBrownWoodIcons/256x256/apps/chromium.png' (72 KB)
2020-12-14 13:02:36,030  '/home/lauscher/.local/share/icons/OldBrownWoodIcons/256x256/apps/xine.png' (69 KB)
2020-12-14 13:02:36,031  more bandwidth will be used by the start menu data

real	6m4,896s
user	3m48,997s
sys	2m12,130s
lauscher@debianlaptop:/$ time env DISPLAY= XPRA_XDG_EXPORT_ICONS=0 python3 ./usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py >/dev/null
2020-12-14 12:41:45,011 loaded 78 start menu entries from 13 sub-menus
2020-12-14 12:41:45,011 Warning: found 3 large icons:
2020-12-14 12:41:45,011  '/home/lauscher/.local/share/icons/OldBrownWoodIcons/256x256/apps/aeskulap.png' (72 KB)
2020-12-14 12:41:45,012  '/home/lauscher/.local/share/icons/OldBrownWoodIcons/256x256/apps/chromium.png' (72 KB)
2020-12-14 12:41:45,012  '/home/lauscher/.local/share/icons/OldBrownWoodIcons/256x256/apps/xine.png' (69 KB)
2020-12-14 12:41:45,012  more bandwidth will be used by the start menu data

real	6m5,283s
user	3m48,645s
sys	2m12,267s
lauscher@debianlaptop:/$ unset DISPLAY; time env XPRA_XDG_EXPORT_ICONS=0 python3 ./usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py >/dev/null
2020-12-14 13:07:33,262 loaded 78 start menu entries from 13 sub-menus
2020-12-14 13:07:33,262 Warning: found 3 large icons:
2020-12-14 13:07:33,262  '/home/lauscher/.local/share/icons/OldBrownWoodIcons/256x256/apps/aeskulap.png' (72 KB)
2020-12-14 13:07:33,262  '/home/lauscher/.local/share/icons/OldBrownWoodIcons/256x256/apps/chromium.png' (72 KB)
2020-12-14 13:07:33,263  '/home/lauscher/.local/share/icons/OldBrownWoodIcons/256x256/apps/xine.png' (69 KB)
2020-12-14 13:07:33,263  more bandwidth will be used by the start menu data

real	6m7,030s
user	3m50,992s
sys	2m12,203s

comment:13 Changed 9 months ago by Antoine Martin

OK, I think I know what it is: XPRA_XDG_EXPORT_ICONS=0 was skipping the loading from the icon theme, but then later on we have fallback code that tries harder to find an icon anyway using a file glob.
And this must be the slow path that you're hitting.
I bet that if you run with XPRA_XDG_LOAD_GLOB=0 then the speed will be fine.

Why so many of your applications don't have icons in the default theme, I do not know.
And why your system slows down so much when the disk cache should be hot and be able to glob without touching the drive, again I do not know.

So here are some updates to try to improve things:

  • r28140 will now log the filename when failing on an SVG, you could then upload one of those failing images so that I could conjure up a workaround
  • r28142 potential bug
  • r28143 also honour XPRA_XDG_EXPORT_ICONS=0 from the glob code path (will backport - that's a fix)
  • r28144 log the number of filename hits from globs - so you could see which globs are costly

The latest beta Debian Bullseye builds have those changes.

Changed 9 months ago by mviereck

Attachment: qmidinet.svg added

icon reported in log to cause issue

comment:14 Changed 9 months ago by mviereck

I bet that if you run with XPRA_XDG_LOAD_GLOB=0 then the speed will be fine.

Yes, that fixed the issue with XPRA_XDG_EXPORT_ICONS=0!
The update with r28143 fixes it, too, XPRA_XDG_LOAD_GLOB=0 is no longer needed.

r28144 log the number of filename hits from globs - so you could see which globs are costly

I don't see this in the logs below.

r28140 will now log the filename when failing on an SVG, you could then upload one of those failing images so that I could conjure up a workaround

Only one file showed up, is attached: /usr/share/icons/hicolor/scalable/apps/qmidinet.svg

Note the difference between the following logs. The second one with leading DISPLAY=:50 needs 50s longer until 'xpra is ready' appears (xpra v4.1-r28147
):

lauscher@debianlaptop:/$ xpra start :50 --no-daemon --use-display
Error: cannot find directory '/usr/share/xpra/css'
2020-12-14 20:05:42,548 created unix domain socket '/run/user/1000/xpra/debianlaptop-50'
2020-12-14 20:05:42,548 cannot create group socket '/run/xpra/debianlaptop-50'
2020-12-14 20:05:42,549  [Errno 13] Permission denied
2020-12-14 20:05:42,549 created unix domain socket '/home/lauscher/.xpra/debianlaptop-50'
2020-12-14 20:05:42,691 pointer device emulation using XTest
2020-12-14 20:05:42,813 serving html content from '/usr/share/xpra/www'
2020-12-14 20:05:42,858 xvfb pid not found
2020-12-14 20:05:42,896 Warning: failed to load the mdns publisher
2020-12-14 20:05:42,896  No module named 'avahi'
2020-12-14 20:05:42,896  either install the 'python-avahi' module
2020-12-14 20:05:42,897  or use the 'mdns=no' option
2020-12-14 20:05:42,928 Warning: cannot forward notifications,
2020-12-14 20:05:42,928  the interface is already claimed
2020-12-14 20:05:42,928  if you do not have a dedicated dbus session for this xpra instance,
2020-12-14 20:05:42,928  use the 'notifications=no' option
2020-12-14 20:05:42,965 pulseaudio server started with pid 138368
2020-12-14 20:05:42,965  private server socket path:
2020-12-14 20:05:42,965  '/run/user/1000/xpra/pulse-50/pulse/native'

(Xpra:138309): Gtk-CRITICAL **: 20:05:43.174: gtk_widget_realize: assertion 'widget->priv->anchored || GTK_IS_INVISIBLE (widget)' failed
2020-12-14 20:05:43,189 Warning: webcam forwarding is disabled
2020-12-14 20:05:43,190  the virtual video directory '/sys/devices/virtual/video4linux' was not found
2020-12-14 20:05:43,190  make sure that the 'v4l2loopback' kernel module is installed and loaded
2020-12-14 20:05:43,190  or use the 'webcam=no' option
2020-12-14 20:05:43,190 found 0 virtual video devices for webcam forwarding
2020-12-14 20:05:43,299 xpra is ready.
2020-12-14 20:05:43,300 xpra GTK3 X11 version 4.1-r28147 64-bit
2020-12-14 20:05:43,661  uid=1000 (lauscher), gid=1000 (lauscher)
2020-12-14 20:05:43,662  running with pid 138309 on Linux Debian testing bullseye
2020-12-14 20:05:43,663  connected to X11 display :50 with 24 bit colors
2020-12-14 20:05:43,842 GStreamer version 1.18.2 for Python 3.9.1 64-bit
2020-12-14 20:05:47,813 printer forwarding enabled using postscript and pdf
2020-12-14 20:05:47,884 watching for applications menu changes in:
2020-12-14 20:05:47,884  '/usr/share/xfce4/applications'
2020-12-14 20:05:47,884  '/usr/share/applications'
2020-12-14 20:05:47,884  '/usr/share/applications'
2020-12-14 20:05:48,006 vpx: vp9 encoding failed: failed to instantiate vp9 encoder with ABI version 23: Invalid parameter
2020-12-14 20:05:48,449 found 1 vaapi codecs: h264
2020-12-14 20:05:48,554 found 1 vaapi codecs: h264
2020-12-14 20:05:48,589 6.8GB of system memory
2020-12-14 20:05:50,452 OpenGL is supported on display ':50'
2020-12-14 20:05:50,453  using 'llvmpipe (LLVM 11.0.0, 256 bits)' renderer
2020-12-14 20:06:05,987 Error: failed to convert svg icon
2020-12-14 20:06:05,987  '/usr/share/icons/hicolor/scalable/apps/qmidinet.svg':
2020-12-14 20:06:05,987  71584 bytes, b'<?xml version="1.0" encoding="UTF-8" standalon ..  markers stroke" />\n    </g>\n  </g>\n</svg>\n'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 136, in load_icon_from_file
    handle = Rsvg.Handle.new_from_data(icondata)
gi.repository.GLib.GError: rsvg-error-quark: XML parse error: error code=201 (3) in (null):186:49: Namespace prefix inkscape for label on g is not defined
 (0)
2020-12-14 20:06:29,893 Error: failed to convert svg icon
2020-12-14 20:06:29,893  '/usr/share/icons/hicolor/scalable/apps/qmidinet.svg':
2020-12-14 20:06:29,894  71584 bytes, b'<?xml version="1.0" encoding="UTF-8" standalon ..  markers stroke" />\n    </g>\n  </g>\n</svg>\n'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 136, in load_icon_from_file
    handle = Rsvg.Handle.new_from_data(icondata)
gi.repository.GLib.GError: rsvg-error-quark: XML parse error: error code=201 (3) in (null):186:49: Namespace prefix inkscape for label on g is not defined
 (0)
2020-12-14 20:06:39,646 loaded 78 start menu entries from 13 sub-menus in 51.8 seconds
2020-12-14 20:06:39,646 Warning: found 1 large icon:
2020-12-14 20:06:39,646  '/usr/share/icons/hicolor/scalable/apps/qmidinet.svg' (69 KB)
2020-12-14 20:06:39,646  more bandwidth will be used by the start menu data
lauscher@debianlaptop:/$ DISPLAY=:50 xpra start :50 --no-daemon --use-display
Error: cannot find directory '/usr/share/xpra/css'
2020-12-14 20:04:20,019 created unix domain socket '/run/user/1000/xpra/debianlaptop-50'
2020-12-14 20:04:20,020 cannot create group socket '/run/xpra/debianlaptop-50'
2020-12-14 20:04:20,020  [Errno 13] Permission denied
2020-12-14 20:04:20,021 created unix domain socket '/home/lauscher/.xpra/debianlaptop-50'
2020-12-14 20:04:20,175 pointer device emulation using XTest
2020-12-14 20:04:20,298 serving html content from '/usr/share/xpra/www'
2020-12-14 20:04:20,340 xvfb pid not found
2020-12-14 20:04:37,512 Error: failed to convert svg icon
2020-12-14 20:04:37,513  '/usr/share/icons/hicolor/scalable/apps/qmidinet.svg':
2020-12-14 20:04:37,513  71584 bytes, b'<?xml version="1.0" encoding="UTF-8" standalon ..  markers stroke" />\n    </g>\n  </g>\n</svg>\n'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 136, in load_icon_from_file
    handle = Rsvg.Handle.new_from_data(icondata)
gi.repository.GLib.GError: rsvg-error-quark: XML parse error: error code=201 (3) in (null):186:49: Namespace prefix inkscape for label on g is not defined
 (0)
2020-12-14 20:05:00,941 Error: failed to convert svg icon
2020-12-14 20:05:00,942  '/usr/share/icons/hicolor/scalable/apps/qmidinet.svg':
2020-12-14 20:05:00,942  71584 bytes, b'<?xml version="1.0" encoding="UTF-8" standalon ..  markers stroke" />\n    </g>\n  </g>\n</svg>\n'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 136, in load_icon_from_file
    handle = Rsvg.Handle.new_from_data(icondata)
gi.repository.GLib.GError: rsvg-error-quark: XML parse error: error code=201 (3) in (null):186:49: Namespace prefix inkscape for label on g is not defined
 (0)
2020-12-14 20:05:10,427 loaded 78 start menu entries from 13 sub-menus in 50.0 seconds
2020-12-14 20:05:10,427 Warning: found 1 large icon:
2020-12-14 20:05:10,427  '/usr/share/icons/hicolor/scalable/apps/qmidinet.svg' (69 KB)
2020-12-14 20:05:10,428  more bandwidth will be used by the start menu data
2020-12-14 20:05:10,451 Warning: failed to load the mdns publisher
2020-12-14 20:05:10,451  No module named 'avahi'
2020-12-14 20:05:10,451  either install the 'python-avahi' module
2020-12-14 20:05:10,452  or use the 'mdns=no' option
2020-12-14 20:05:10,492 Warning: cannot forward notifications,
2020-12-14 20:05:10,493  the interface is already claimed
2020-12-14 20:05:10,493  if you do not have a dedicated dbus session for this xpra instance,
2020-12-14 20:05:10,493  use the 'notifications=no' option
2020-12-14 20:05:10,529 pulseaudio server started with pid 138086
2020-12-14 20:05:10,529  private server socket path:
2020-12-14 20:05:10,530  '/run/user/1000/xpra/pulse-50/pulse/native'

(Xpra:137910): Gtk-CRITICAL **: 20:05:10.547: gtk_widget_realize: assertion 'widget->priv->anchored || GTK_IS_INVISIBLE (widget)' failed
2020-12-14 20:05:10,589 Warning: webcam forwarding is disabled
2020-12-14 20:05:10,590  the virtual video directory '/sys/devices/virtual/video4linux' was not found
2020-12-14 20:05:10,591  make sure that the 'v4l2loopback' kernel module is installed and loaded
2020-12-14 20:05:10,591  or use the 'webcam=no' option
2020-12-14 20:05:10,592 found 0 virtual video devices for webcam forwarding
2020-12-14 20:05:10,715 xpra is ready.
2020-12-14 20:05:10,717 xpra GTK3 X11 version 4.1-r28147 64-bit
2020-12-14 20:05:11,049  uid=1000 (lauscher), gid=1000 (lauscher)
2020-12-14 20:05:11,050  running with pid 137910 on Linux Debian testing bullseye
2020-12-14 20:05:11,051  connected to X11 display :50 with 24 bit colors
2020-12-14 20:05:11,414 GStreamer version 1.18.2 for Python 3.9.1 64-bit
/usr/lib/python3/dist-packages/gi/overrides/Gtk.py:1649: Warning: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
  return _Gtk_main(*args, **kwargs)
2020-12-14 20:05:15,138 printer forwarding enabled using postscript and pdf
2020-12-14 20:05:15,209 watching for applications menu changes in:
2020-12-14 20:05:15,209  '/usr/share/xfce4/applications'
2020-12-14 20:05:15,209  '/usr/share/applications'
2020-12-14 20:05:15,210  '/usr/share/applications'
2020-12-14 20:05:15,296 vpx: vp9 encoding failed: failed to instantiate vp9 encoder with ABI version 23: Invalid parameter
2020-12-14 20:05:15,752 found 1 vaapi codecs: h264
2020-12-14 20:05:15,856 found 1 vaapi codecs: h264
2020-12-14 20:05:15,884 6.8GB of system memory
2020-12-14 20:05:17,591 OpenGL is supported on display ':50'
2020-12-14 20:05:17,592  using 'llvmpipe (LLVM 11.0.0, 256 bits)' renderer
Version 0, edited 9 months ago by mviereck (next)

comment:15 Changed 9 months ago by Antoine Martin

Thanks for the logs, got lots of small fixes committed.

r28144 log the number of filename hits from globs - so you could see which globs are costly

I don't see this in the logs below.

Oops, forgot to mention that you need -d menu to show this rather verbose debug output.

Only one file showed up, is attached: /usr/share/icons/hicolor/scalable/apps/qmidinet.svg

Thanks, I've cooked up a workaround: r28151 + r28152.
This now allows Debian Bullseye to parse SVG files like this one.

FWIW:

  • google chrome also fails to display this file, even with the latest beta builds (same complaint about inkscape)
  • Fedora has no problem with it (perhaps it is using a newer librsvg?)
  • so the workaround is only applied when loading the unmodified files fails

The second one with leading DISPLAY=:50 needs 50s longer until 'xpra is ready' appears. The delay does not occur if I add XPRA_XDG_LOAD_GLOB=0

I've tried it here in my Debian Bullseye VM, no difference.
My best guess is that something in GTK is accessing the X11 server when loading icons from file and that this is only / more triggered when we find icons using the glob, not when loading from the icon theme.

Unfortunately, we can't just unset DISPLAY temporarily whilst loading the menus and icons, because this is a global and it is used by other components running in other threads.

Maybe it's the xpm conversion that's causing problems, in which case this would "fix" it:

--- xpra/platform/xposix/xdg_helper.py	(revision 28154)
+++ xpra/platform/xposix/xdg_helper.py	(working copy)
@@ -94,6 +94,7 @@
 def load_icon_from_file(filename):
     log("load_icon_from_file(%s)", filename)
     if filename.endswith("xpm"):
+        return None
         from PIL import Image
         try:
             img = Image.open(filename)

Or maybe it's the svg parsing that's slow, then this will skip it:

--- xpra/platform/xposix/xdg_helper.py	(revision 28154)
+++ xpra/platform/xposix/xdg_helper.py	(working copy)
@@ -142,6 +142,7 @@
     return icondata, os.path.splitext(filename)[1].lstrip(".")
 
 def svg_to_png(filename, icondata, w=128, h=128):
+    return None
     Rsvg = load_Rsvg()
     if not Rsvg:
         return None

2020-12-14 20:05:11,414 GStreamer version 1.18.2 for Python 3.9.1 64-bit
2020-12-14 20:05:15,138 printer forwarding enabled using postscript and pdf

FYI: This is also quite slow.
My system completes the printing subsystem initialization even before it starts the GStreamer probing.

comment:16 Changed 9 months ago by Antoine Martin

Resolution: needinfo
Status: newclosed

comment:17 Changed 8 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2978

Note: See TracTickets for help on using tickets.