How to efficiently use 3D via a remote connection?
Solution 1
You could check out VirtualGL together with TurboVNC should provide you with 20fps @ 1280x1024 on 100 Mbit (see wikipedia).
Do note that it might not work with all applications, it depends on how they use OpenGL.
Solution 2
This is an old question but it is still relevant. There is a step by step manual on how to configure and troubleshoot X11 3D rendering of remote application on local hardware: OpenGL hardware acceleration through remote x11 ssh connection
The Chromium B.S.U. game is used in the article as an example. It runs with 5-8 FPS with default software rendering through SSH connection, 30 FPS with indirect hardware rendering and >30 FPS with unencrypted TCP X11 connection. Note that it only works for some applications.
Brief summary of the article
Indirect rendering and TCP connections are disabled in default X11 server configuration. +iglx and -listen tcp
parameters enable them. There is also LIBGL_ALWAYS_INDIRECT=1
variable that forces indirect rendering on the X11 client.
Comments
-
Tobias Kienzler over 1 year
I have one weak PC (client) but with acceptable 3D performance, and one strong PC (server) which should be capable of running an application using OpenGL twice, i.e. once locally and once remotely for the client. Currently, I
ssh -X
into it, but the client's console output states software rendering is used and I only get 3 frames per second (fps). Actually, ssh's encryption is not necessary since this is on a LAN, but it's what I already know for remote applications...So, how can the client performance be increased? My ideas are
- use hardware acceleration, but the server's or the client's one and how?
- use something different than ssh
I know, in full resolution and without sophisticated compression a 100 Mbit/s LAN won't make more fps, but it's a windowed application of ca. 800x450, so theoretically up to 12 fps (at 24 bits/pixel) should be possible using uncompressed graphical data. And maybe something better is possible using the client's own GPU or some smart compression.
--
edit Turns out what I want is basically a local version of what e.g. onlive and gaikai offers. Is there something like this for Linux (and possibly free)?
--
edit2 VirtualGL looks like the best solution (though currently not working for me), but I wonder if it is possible to do hardware rendering on the client, too
-
Tobias Kienzler over 13 yearsI found this rather old but related question at SO: How can I run an OpenGL application installed on a linux machine from my windows machine? and at SF: How can OpenGL graphics be displayed remotely using VNC?
-
Tobias Kienzler over 13 yearsFollow-up since the the PCs are next to each other anyway and I wonder why not using one PC for two users: Can one PC be used by two users at the same time via dual-monitor?
-
Tobias Kienzler over 13 yearsThank you. So is there an alternative for the X protocol to transmit 3D? Sorry, I should have put server and client in quotes, I only meant to have shorter words for the strong and weak PC - both PC's should be used as front-ends at the same time as if they were desktop PCs but with all CPU work and RAM access done by the better PC. The weak PC doesn't have enough CPU power and RAM to run the application itself
-
Keith over 13 yearsNot that I am aware of. The kind of 3D you are thinking of requires a LOT of bandwidth.
-
Tobias Kienzler over 13 years
-
Keith over 13 yearsOk, I took a look. I don't think they are transmitting the frames that way, either. They are downloading and running local, and only transceiving control and update information, just like existing online games.Even if they did, it would have to be low resolution for high compression.
-
Tobias Kienzler over 13 yearsThe way I understand it, they run the game remotely and just transmit a HD stream of the video while receiving keyboard and mouse events. But of course one couldn't transmit 30 fps in HD over the internet without any compression...
-
Tobias Kienzler over 13 years+1 this sound exactly like what I'm looking for, thank you! (I'll accept the answer after (hopefully) successful testing)
-
Tobias Kienzler over 13 yearsaww, my Radeon doesn't seem to support pbuffer which is required :(
-
Tobias Kienzler over 13 yearsI have a new PC now which supports pbuffer, but unfortunately vglrun segfaults now. Could this be because the server runs on 64 bit while the client is on 32 bit?
-
Tobias Kienzler over 13 years(accepted since the answer is correct and the segfault is a separate question)
-
Tobias Kienzler about 7 yearsThanks for your answer. It is greatly appreciated to note the gist of linked blog posts here in case the link ever goes dead though (even if you e.g. just state "using
lightdm
withiglx
" such). I currently don't need this anymore, but I'll try it next time ;) Maybe someone else also finds your findings helpful. -
evpo about 7 yearsGood point. I added main details of the article.