GPU Acceleration on Remote Desktop

A screenshot of my remote server’s desktop

Sometimes the solution to a problem is strange. Imagine a headless, remote, Linux based desktop setup where users can remote into a graphical environment. The remote desktop works great with the integrated graphics card but once it switches to discrete graphics it comes to a screeching halt. No graphical acceleration.

Many discrete graphic cards now enter a low power state if you do not connect a monitor. This is good for users who care about power efficiency but a pain for those who implement headless configurations. The common solution to this problem is to buy a “dummy plug” for your HDMI or Display Port to fake a head onto your headless configuration. It does work.

There is a way of doing this without a dummy plug. It turns out that we can pretend that we have a display connected by using xrandr. First tell the system to add new resolution We can get a modeline by using the command cvt 1024 768.

shell
xrandr --newmode "1366x768p" 72.00 1366 1414 1446 1494 768 771 777 803;
xrandr --newmode "1280x800p" 24.15 1280 1312 1400 1432 800 819 822 841;
xrandr --newmode "1024x768p" 18.71 1024 1056 1120 1152 768 786 789 807;

Then add and assign those resolution modes to a port We are using a display port.

shell
xrandr --addmode DisplayPort-0 "1366x768p";
xrandr --addmode DisplayPort-0 "1280x800p";
xrandr --addmode DisplayPort-0 "1024x768p";

Finally pick a mode and then force output on the interface.

shell
xrandr --output DisplayPort-0 --mode "1366x768p";

The discrete graphics card comes alive and we get GPU acceleration on the remote. This may not work for all cards, but it has good coverage. For everything else there is always the “dummy plug”.

11 February 2018 — Written
22 January 2020 — Updated
Thedro Neely — Creator
headless-gpu-remote-acceleration.md — Article

More Content

Openring

Web Ring

Comments

References

  1. https://thedroneely.com/git/
  2. https://thedroneely.com/
  3. https://thedroneely.com/posts/
  4. https://thedroneely.com/projects/
  5. https://thedroneely.com/about/
  6. https://thedroneely.com/contact/
  7. https://thedroneely.com/abstracts/
  8. https://ko-fi.com/thedroneely
  9. https://thedroneely.com/tags/headless/
  10. https://thedroneely.com/tags/linux/
  11. https://thedroneely.com/tags/server/
  12. https://thedroneely.com/posts/headless-gpu-remote-acceleration/#isso-thread
  13. https://thedroneely.com/posts/rss.xml
  14. https://thedroneely.com/images/headless-gpu-remote-acceleration.png
  15. https://thedroneely.com/posts/headless-gpu-remote-acceleration/#code-block-2d3f4a0
  16. https://thedroneely.com/posts/headless-gpu-remote-acceleration/#code-block-f3101f8
  17. https://thedroneely.com/posts/headless-gpu-remote-acceleration/#code-block-53cc194
  18. https://www.thedroneely.com/posts/headless-gpu-remote-acceleration.md
  19. https://thedroneely.com/posts/adding-headroom-with-javascript/
  20. https://thedroneely.com/archives/abstracts/
  21. https://thedroneely.com/posts/kubernetes-in-a-linux-container/
  22. https://git.sr.ht/~sircmpwn/openring
  23. https://drewdevault.com/2022/11/12/In-praise-of-Plan-9.html
  24. https://drewdevault.com/
  25. https://mxb.dev/blog/the-indieweb-for-everyone/
  26. https://mxb.dev/
  27. https://www.taniarascia.com/simplifying-drag-and-drop/
  28. https://www.taniarascia.com/
  29. https://thedroneely.com/posts/headless-gpu-remote-acceleration#isso-thread
  30. https://thedroneely.com/posts/headless-gpu-remote-acceleration#code-block-2d3f4a0
  31. https://thedroneely.com/posts/headless-gpu-remote-acceleration#code-block-f3101f8
  32. https://thedroneely.com/posts/headless-gpu-remote-acceleration#code-block-53cc194
  33. https://thedroneely.com/posts/finding-that-one-percent/
  34. https://thedroneely.com/posts/my-ts100-settings-and-configuration/
  35. https://thedroneely.com/posts/keeping-up-with-open-source/
  36. https://thedroneely.com/posts/programming-sans-internet/
  37. https://thedroneely.com/projects/news-aggregator/
  38. https://thedroneely.com/posts/site-updates-navigation/
  39. https://drewdevault.com/2022/09/16/Open-source-matters.html
  40. https://mxb.dev/blog/make-free-stuff/
  41. https://thedroneely.com/sitemap.xml
  42. https://thedroneely.com/index.json
  43. https://thedroneely.com/resume/
  44. https://gitlab.com/tdro
  45. https://github.com/tdro
  46. https://codeberg.org/tdro
  47. https://thedroneely.com/analytics
  48. https://thedroneely.com/posts/headless-gpu-remote-acceleration#
  49. https://creativecommons.org/licenses/by-sa/2.0/
  50. https://thedroneely.com/git/thedroneely/thedroneely.com
  51. https://opensource.org/licenses/GPL-3.0
  52. https://www.thedroneely.com/
  53. https://thedroneely.com/posts/headless-gpu-remote-acceleration/#