Summary

Turning your TV into a desktop isn’t something I’d usually recommend, and I firmly believe that such tasks are best left relegated to dedicated, smaller monitors. That said, gaming is still a perfectly valid use case for a bigger display. With enough setup and some HDMI-CEC trickery, it is possible to transform a Linux gaming PC into a console-like experience to play your games on the living room TV. That said, none of this is running natively — in fact, the technology we’re going to be making use of here is streaming. Installing Moonlight on an Android TV And setting up Sunshine on the host PC To begin, you’ll need to download an application known as Moonlight. Moonlight is essentially a client for Sunshine, which in turn is a self-hosting service to stream your games (and desktop) onto another display. Sunshine is entirely open-source and works on all three mainstream GPU vendors: AMD, Nvidia and Intel. Both apps require each other to work, and so it’s recommended to install and enable the Sunshine service on your host PC first. The instructions vary from distribution to distribution, but it’s generally as simple as installing the application from a terminal, and subsequently enabling its systemd service (so that it auto-starts on the next boot). sudo pacman -S sunshine systemctl —user enable —now sunshine With Sunshine installed, you’ll want to head on over to the web UI and complete the first-time setup. Enter a username and password (make sure to remember it; this will be used for each subsequent login) and make your way over to the pairing tab. Next, you’ll want to install Moonlight on your client (TV) next. Moonlight is available via the Play Store, which can be accessed on virtually any modern Android TV-enabled device. After you fire up Moonlight, make sure that you’re connected to the same Wi-Fi network as your host PC. This should be enough to get the app to automatically detect Sunshine. Hit Pair and enter the secret PIN to complete the process. That’s about it! You can now launch Steam Big Picture Mode directly from your TV and stream games with relatively low latency and acceptable image quality, or even something like a full Windows desktop. Some tips, tricks, and tweaks All of which will largely depend on your network connection While the default settings for Sunshine/Moonlight work just fine out of the box, there’s far more you can squeeze out of your existing setup. The first place to start would be in Sunshine’s settings menu itself. As for things to change on Linux, there really isn’t a lot — just make sure that your GPU matches the encoder in use. For open-source drivers (AMD, Intel), use either the VA-API or Vulkan capture methods, paired with the automated defaults. Nvidia GPU users will have to make sure that they’re using the latest proprietary drivers along with the corresponding Nvidia-specific capture method. The setup is largely the same on Windows, save for AMD and Intel using their own, separate encoders. On the client side, you’ll want to turn your attention to Moonlight, with the following in place:

  • Set game resolution to Native.
  • Set FPS to whatever the maximum refresh rate of your TV is (120/60 Hz).
  • Enable V-Sync for smoother frame pacing.
  • Set GUI display mode to Fullscreen so that Moonlight starts in a full-screen window. Keep the rest of the settings as-is to avoid conflicts. Depending on your hardware configuration, it might be possible to push AV1 video and higher-than-usual bitrate signals to your TV for a much sharper image. You can stream more than just games Remote desktop is a very powerful tool One of the standout features of Moonlight is the ability to stream an entire desktop session. In other words, once you’re done gaming, you can simply switch back to the desktop and spread it across your TV. It’s a great way to get some additional work done if you happen to require it. If you also happen to be running a game server headless, this might be the only way to access its graphical interface and make some crucial fixes. It’s saved me a lot of headache over the years, and I’ve relied on the feature way too many times to count. Consider switching to an Ethernet connection A wireless connection by nature is a lot weaker than its wired counterpart. A lot of this has to do with positioning and Wi-Fi blockades, and you’ll often run into situations where the Wi-Fi signal just isn’t strong enough to reach the TV. You’ll inevitably run into interruptions, dropped frames, and total disconnects, which can be really frustrating to deal with mid-gameplay. Unless you can maintain a repeater setup (which also happens to cover the exact dead zones of your TV room), it’s often much easier to just route a wired connection to your TV. Most TVs have Ethernet built-in, and the ones that don’t have a few workarounds. A wired connection is almost always going to be more stable, in addition to being able to carry more bandwidth. In other words, you get a cleaner, higher-resolution image that doesn’t stutter as frequently.

By Dipan Saha

Original Article