xpra icon
Bug tracker and wiki

Opened 2 weeks ago

Closed 10 days ago

Last modified 9 days ago

#2870 closed defect (invalid)

xpra with nvidia

Reported by: devin Owned by: Antoine Martin
Priority: major Milestone: 4.1
Component: server Version: 4.0.x
Keywords: HPC, renderer, virtualGL, nvidia Cc:

Description

Hi there,

I'm attempting to make the nvidia GPU card the renderer used for xpra, and haven't had much luck so far following the instructions for using VirtualGL with xpra.

What I've tried.

nvidia-xconfig -a --allow-empty-initial-configuration --virtual=1920x1200 --busid PCI:32:0:0 


which gave back

WARNING: Unable to locate/open X configuration file.
Option "AllowEmptyInitialConfiguration" "True" added to Screen "Screen0".
Option "AllowEmptyInitialConfiguration" "True" added to Screen "Screen1".
New X configuration file written to '/etc/X11/xorg.conf'

the output of the xorg.conf is

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 450.51.06

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Tesla K20Xm"
    BusID          "PCI:32:0:0"
EndSection

Option "HardDPMS" "false"
Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Tesla K20Xm"
    BusID          "PCI:32:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Virtual     1920 1200
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Virtual     1920 1200
        Depth       24
    EndSubSection
EndSection


but upon setup of the xpra server I still see the llvm pipe as the renderer

Singularity> xpra start --start="vglrun glxspheres64" --daemon=no


2020-09-04 14:57:21,433 Warning: failed to create script directory '/run/user/25391/xpra':
2020-09-04 14:57:21,433  [Errno 2] No such file or directory: '/run/user/25391/xpra'
2020-09-04 14:57:21,433  ($XDG_RUNTIME_DIR has not been created?)
2020-09-04 14:57:21,493 cannot access python uinput module:
2020-09-04 14:57:21,493  No module named 'uinput'
Failed to rename log file "/tmp/Xorg.S14604.log" to "/tmp/Xorg.S14604.log": No such file or directory

X.Org X Server 1.19.6
Release Date: 2017-12-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-168-generic x86_64 Ubuntu
Current Operating System: Linux gpu24 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64
Kernel command line: kernel ro initrd=initfs.gz wwhostname=gpu24 quiet nouveau.modeset=0 rd.driver.blacklist=nouveau console=tty0 console=ttyS0,115200 wwmaster=10.140.86.2 wwipaddr=10.140.86.34 wwnetmask=255.255.254.0 wwnetdev=eno1 wwhwaddr=40:f2:e9:04:ba:a8 wwgateway=10.140.86.1
Build Date: 14 November 2019  06:20:00PM
xorg-server 2:1.19.6-1ubuntu4.4 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.34.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/Xorg.S14604.log", Time: Fri Sep  4 14:57:21 2020
(++) Using config file: "/etc/xpra/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
2020-09-04 14:57:26,259 created unix domain socket '/tmp/gpu24-0'
2020-09-04 14:57:26,327 pointer device emulation using XTest
2020-09-04 14:57:26,381 serving html content from '/usr/share/xpra/www'
2020-09-04 14:57:26,438 Warning: failed to load the mdns publisher
2020-09-04 14:57:26,438  No module named 'avahi'
2020-09-04 14:57:26,439  either install the 'python-avahi' module
2020-09-04 14:57:26,439  or use the 'mdns=no' option
2020-09-04 14:57:26,460 D-Bus notification forwarding is available
2020-09-04 14:57:26,466 Warning: the runtime directory '%s' does not exist,
2020-09-04 14:57:26,466  cannot start a private pulseaudio server
2020-09-04 14:57:26,471 pulseaudio server started with pid 14664
pulseaudio: error while loading shared libraries: libspeexdsp.so.1: cannot open shared object file: No such file or directory
2020-09-04 14:57:26,984 GStreamer version 1.14.5 for Python 3.6.9 64-bit

(Xpra:14604): Gtk-CRITICAL **: 14:57:27.206: gtk_widget_realize: assertion 'widget->priv->anchored || GTK_IS_INVISIBLE (widget)' failed
2020-09-04 14:57:27,213 Warning: webcam forwarding is disabled
2020-09-04 14:57:27,214  the virtual video directory '/sys/devices/virtual/video4linux' was not found
2020-09-04 14:57:27,214  make sure that the 'v4l2loopback' kernel module is installed and loaded
2020-09-04 14:57:27,214 found 0 virtual video devices for webcam forwarding
2020-09-04 14:57:27,236 Warning: lpinfo command failed and returned 1
2020-09-04 14:57:27,237  command used: '/usr/sbin/lpinfo --make-and-model Generic PDF Printer -m'
2020-09-04 14:57:27,237 printer forwarding enabled using postscript and pdf
2020-09-04 14:57:27,244 Warning: cannot watch for application menu changes without pyinotify:
2020-09-04 14:57:27,244  No module named 'pyinotify'
2020-09-04 14:57:27,269 Error parsing xdg menu data:
2020-09-04 14:57:27,269  ParsingError in file '/etc/xdg/menus/kde-debian-menu.menu', File not found
2020-09-04 14:57:27,270  this is either a bug in python-xdg,
2020-09-04 14:57:27,270  or an invalid system menu configuration
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
2020-09-04 14:57:27,375 xpra is ready.
2020-09-04 14:57:27,375 xpra GTK3 X11 version 4.0.2-r26625 64-bit
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: llvmpipe (LLVM 9.0, 256 bits)
2020-09-04 14:57:27,462  uid=25391 (baylyd), gid=339 (student)
2020-09-04 14:57:27,463  running with pid 14604 on Linux Ubuntu 18.04 bionic
2020-09-04 14:57:27,464  connected to X11 display :0 with 24 bit colors
2020-09-04 14:57:27,495 251.9GB of system memory
2020-09-04 14:57:28,217 OpenGL is supported on display ':0'
2020-09-04 14:57:28,218  using 'llvmpipe (LLVM 9.0, 256 bits)' renderer
2020-09-04 14:57:28,376 Warning: pulseaudio has terminated shortly after startup.
2020-09-04 14:57:28,377  pulseaudio is limited to a single instance per user account,
2020-09-04 14:57:28,377  and one may be running already for user 'baylyd'.
2020-09-04 14:57:28,377  To avoid this warning, either fix the pulseaudio command line
2020-09-04 14:57:28,377  or use the 'pulseaudio=no' option.
29.796385 frames/sec - 33.252765 Mpixels/sec
31.088880 frames/sec - 34.695191 Mpixels/sec
31.022620 frames/sec - 34.621244 Mpixels/sec
31.309291 frames/sec - 34.941169 Mpixels/sec
30.941725 frames/sec - 34.530965 Mpixels/sec
30.167239 frames/sec - 33.666638 Mpixels/sec
30.894015 frames/sec - 34.477721 Mpixels/sec
30.968096 frames/sec - 34.560396 Mpixels/sec
29.312689 frames/sec - 32.712961 Mpixels/sec
27.697855 frames/sec - 30.910806 Mpixels/sec
29.540577 frames/sec - 32.967283 Mpixels/sec
30.320799 frames/sec - 33.838012 Mpixels/sec
30.353443 frames/sec - 33.874443 Mpixels/sec
30.527323 frames/sec - 34.068492 Mpixels/sec
32.249786 frames/sec - 35.990761 Mpixels/sec
30.435375 frames/sec - 33.965878 Mpixels/sec
29.622691 frames/sec - 33.058923 Mpixels/sec
31.079721 frames/sec - 34.684968 Mpixels/sec
30.599813 frames/sec - 34.149391 Mpixels/sec
30.744711 frames/sec - 34.311097 Mpixels/sec
31.496396 frames/sec - 35.149977 Mpixels/sec
30.860095 frames/sec - 34.439866 Mpixels/sec
30.834748 frames/sec - 34.411578 Mpixels/sec
32.232426 frames/sec - 35.971388 Mpixels/sec
30.948383 frames/sec - 34.538395 Mpixels/sec
30.989930 frames/sec - 34.584762 Mpixels/sec
31.073650 frames/sec - 34.678193 Mpixels/sec
31.385706 frames/sec - 35.026448 Mpixels/sec
31.735342 frames/sec - 35.416642 Mpixels/sec
31.497880 frames/sec - 35.151634 Mpixels/sec
31.788991 frames/sec - 35.476514 Mpixels/sec
31.262555 frames/sec - 34.889012 Mpixels/sec
30.843664 frames/sec - 34.421529 Mpixels/sec
30.640609 frames/sec - 34.194920 Mpixels/sec
31.355174 frames/sec - 34.992374 Mpixels/sec
30.970789 frames/sec - 34.563400 Mpixels/sec
31.196091 frames/sec - 34.814837 Mpixels/sec
31.322418 frames/sec - 34.955819 Mpixels/sec
31.731632 frames/sec - 35.412502 Mpixels/sec
31.167684 frames/sec - 34.783135 Mpixels/sec
31.035526 frames/sec - 34.635647 Mpixels/sec
31.119412 frames/sec - 34.729264 Mpixels/sec
30.651613 frames/sec - 34.207201 Mpixels/sec
30.917350 frames/sec - 34.503762 Mpixels/sec
31.245706 frames/sec - 34.870208 Mpixels/sec
31.305712 frames/sec - 34.937174 Mpixels/sec
31.236091 frames/sec - 34.859478 Mpixels/sec
31.532875 frames/sec - 35.190689 Mpixels/sec
31.487219 frames/sec - 35.139737 Mpixels/sec
31.394043 frames/sec - 35.035752 Mpixels/sec
31.285911 frames/sec - 34.915077 Mpixels/sec
31.557471 frames/sec - 35.218138 Mpixels/sec
31.362353 frames/sec - 35.000386 Mpixels/sec
31.149927 frames/sec - 34.763318 Mpixels/sec
30.781878 frames/sec - 34.352576 Mpixels/sec
31.415852 frames/sec - 35.060091 Mpixels/sec
31.079194 frames/sec - 34.684381 Mpixels/sec
31.431181 frames/sec - 35.077198 Mpixels/sec
31.539485 frames/sec - 35.198065 Mpixels/sec
30.812822 frames/sec - 34.387110 Mpixels/sec
30.581083 frames/sec - 34.128488 Mpixels/sec
30.990551 frames/sec - 34.585455 Mpixels/sec
31.398027 frames/sec - 35.040199 Mpixels/sec
31.996724 frames/sec - 35.708343 Mpixels/sec
31.341715 frames/sec - 34.977354 Mpixels/sec
31.346188 frames/sec - 34.982345 Mpixels/sec
31.144210 frames/sec - 34.756939 Mpixels/sec
30.595032 frames/sec - 34.144056 Mpixels/sec
31.151410 frames/sec - 34.764974 Mpixels/sec
31.486919 frames/sec - 35.139402 Mpixels/sec
31.876361 frames/sec - 35.574019 Mpixels/sec
31.547739 frames/sec - 35.207277 Mpixels/sec
30.852629 frames/sec - 34.431534 Mpixels/sec
30.984893 frames/sec - 34.579140 Mpixels/sec
31.713199 frames/sec - 35.391930 Mpixels/sec
30.663866 frames/sec - 34.220875 Mpixels/sec
31.485507 frames/sec - 35.137826 Mpixels/sec
31.582269 frames/sec - 35.245813 Mpixels/sec
30.010620 frames/sec - 33.491852 Mpixels/sec
30.868044 frames/sec - 34.448737 Mpixels/sec
30.499861 frames/sec - 34.037845 Mpixels/sec
30.220873 frames/sec - 33.726495 Mpixels/sec
31.381594 frames/sec - 35.021859 Mpixels/sec
31.629549 frames/sec - 35.298576 Mpixels/sec
30.837669 frames/sec - 34.414839 Mpixels/sec
31.755837 frames/sec - 35.439514 Mpixels/sec
31.830979 frames/sec - 35.523373 Mpixels/sec
30.644808 frames/sec - 34.199606 Mpixels/sec

Any ideas about what else I should change to have xpra make use of the proprietary hardware on the machine? I

Change History (7)

comment:1 Changed 2 weeks ago by Antoine Martin

Resolution: invalid
Status: newclosed

Assuming that vglrun glxspheres runs from within an xterm that you launch via xpra, then everything is already working.

All X11 applications can use it, you just have not told xpra that you want it to do that, so it uses the default gl renderer when probing.

Try: xpra --exec-wrapper=vglrun.

comment:2 Changed 10 days ago by devin

Resolution: invalid
Status: closedreopened

Sorry to reopen, but the 2 methods still lead to the opengl renderer being the llvmpipe and the gpu on the xpra server not getting used to render. I don't know if there's more configuration that we have to do before the xpra stuff "just works".

Assuming that vglrun glxspheres runs from within an xterm that you launch via xpra, then everything is already working.

I was able to start an Xterm from the xpra server, where there was an /etc/X11/xorg.conf the same as the first post above (different PCI bus, but that's set when using nvidia-xconfigure). inside the graphic Xterm I typed vglrun glxspheres64 and got the following before a list of render speeds with fps in the 20s

Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: llvmpipe (LLVM 9.0, 256 bits)

I'm assuming since the llvm pipe was still there, and the fps was low, something still went wrong.

Try: xpra --exec-wrapper=vglrun.

I also tested this out using
xpra start --start="glxinfo" --daemon=no --exec-wrapper=/usr/bin/vglrun
, and although the vendor string now says
client glx vendor string: VirtualGL instead of client glx vendor string: Mesa Project and SGI the renderer string is the same in both cases
OpenGL renderer string: llvmpipe (LLVM 9.0, 256 bits)

I'm puzzled, is there a step that I'm missing? Is there a way to provide vglrun more info about which renderer I want it to use instead of the default one?

comment:3 Changed 10 days ago by Antoine Martin

Resolution: invalid
Status: reopenedclosed

This is not an xpra question then, but a virtualgl one.

I was able to start an Xterm from the xpra server, where there was an /etc/X11/xorg.conf the same as the first post above
...
I'm puzzled, is there a step that I'm missing?
Is there a way to provide vglrun more info about which renderer I want it to use instead of the default one?

Having an xorg.conf is not sufficient, you need an actual X11 server instance running.
My guess is that all your displays are using the software renderer (llvmpipe), so you're using virtualgl to relay from one to the other, which is pointless.

If you are still having problems, please read the virtualgl documentation.

comment:4 Changed 10 days ago by Antoine Martin

comment:5 Changed 10 days ago by devin

Gotcha, sorry yes this does seem more like a virtualgl question you're right. I'll seek more information on their issue tracker. Thanks!

comment:6 Changed 10 days ago by Antoine Martin

You also failed to mention that this is using a singularity container.

(the os: Linux Ubuntu 18.04 bionic, etc)

comment:7 Changed 9 days ago by Florian Feldhaus

VirtualGL very recently got EGL support which does not require an X-server anymore. That makes running virtualgl inside docker or singularity a lot easier. For details check:
https://github.com/VirtualGL/virtualgl/issues/10

I have an example for docker here which also explains how to use the VirtualGL development version which is necessary until VirtualGL 3 will be released in the near future:
https://github.com/ffeldhaus/docker-xpra-html5-opengl-minimal

Check especially the README, Dockerfile and docker-entrypoint.sh

Note: See TracTickets for help on using tickets.