LOGO

Raspberry Pi Steam Machine with Moonlight

July 13, 2015
Raspberry Pi Steam Machine with Moonlight

Bringing Steam to Your Living Room with Raspberry Pi

Valve’s Steam Machines were designed to extend the Steam gaming experience to the television, though often at a significant cost. This guide details a more affordable method for accessing your Steam library – and indeed, all your PC games – directly on your TV using a Raspberry Pi.

The Appeal of a Raspberry Pi Solution

Instead of investing in a dedicated Steam Machine, a Raspberry Pi offers a cost-effective alternative. It allows you to leverage your existing Steam game collection without the premium price tag associated with specialized hardware.

Accessing Your Steam Library

A Raspberry Pi, when properly configured, can effectively function as a home theater PC. This enables you to stream games from your main gaming PC to your television, providing a similar experience to that intended by the original Steam Machines.

Beyond Steam: Expanding Your Gaming Options

The versatility of a Raspberry Pi extends beyond Steam. It’s capable of running a variety of emulators and PC game streaming services, effectively transforming your TV into a hub for all your gaming needs.

Cost Considerations

The primary advantage of this approach is the reduced expense. A Raspberry Pi, along with necessary accessories, represents a substantially lower investment compared to purchasing a pre-built Steam Machine.

This method provides a practical and economical way to enjoy PC gaming on your television, offering a compelling alternative to the more expensive Steam Machine platform.

The Advantages of PC Gaming and the Living Room Challenge

The most adaptable gaming platform is undoubtedly your Windows-based computer. From the latest releases to classic game emulation, PCs offer a broader gaming library than any other system.

A common issue, however, is the typical PC location. Many users keep their computers in offices, dens, or spare rooms – not in the most comfortable spot with the largest display: the living room.

Ideally, you’d enjoy your favorite games on your living room HDTV. But building a dedicated gaming PC for the living room or constantly moving your existing setup isn’t practical.

What if you could simply stream your PC’s display to your HDTV without physically relocating the computer? Luckily, NVIDIA’s GameStream protocol, integrated into their GPUs, provides a cost-effective solution for extending your PC gaming experience to another screen in your home.

We will now explore the necessary components and guide you through the configuration process for your PC, Raspberry Pi, and game library to establish a seamless streaming setup.

Essential Components for PC Game Streaming

To begin streaming your PC games to your TV, certain hardware and software prerequisites must be met. The core of this setup relies on an NVIDIA GPU.

Specifically, you’ll need an NVIDIA GeForce GTX 600 series or newer graphics card. This is because GameStream is an NVIDIA technology. A compatible CPU and sufficient RAM are also important for optimal performance.

Beyond the PC itself, a streaming client is required on the display end. A popular and affordable option is a Raspberry Pi, though other devices like NVIDIA SHIELD or Smart TVs with built-in streaming capabilities can also be used.

Required Hardware Checklist

  • NVIDIA GPU: GeForce GTX 600 series or newer
  • PC Processor: Intel Core i5-4460 or equivalent
  • System Memory: 8GB of RAM
  • Streaming Client: Raspberry Pi (recommended) or compatible device
  • Network Connection: Stable 5GHz Wi-Fi or Ethernet

Setting Up GameStream on Your PC

The initial step involves enabling GameStream on your NVIDIA-powered PC. This is done through the NVIDIA GeForce Experience application.

Open GeForce Experience and navigate to the settings menu. Locate the “General” tab and toggle the “Stream to SHIELD” option to ‘On’. This activates the GameStream server on your PC.

Next, ensure your desired games are added to your GeForce Experience library. This allows GameStream to recognize and stream them. You may also need to adjust graphics settings within GeForce Experience for optimal streaming quality.

Configuring Your Raspberry Pi as a Streaming Client

With GameStream enabled on your PC, the next phase is configuring your Raspberry Pi to act as the streaming client. This requires installing a suitable GameStream client application.

Moonlight is a widely used open-source client specifically designed for streaming from NVIDIA GPUs. Download and install Moonlight on your Raspberry Pi using the appropriate package manager for your operating system.

Once installed, launch Moonlight and it will automatically scan your network for available GameStream hosts. Select your PC from the list and follow the on-screen prompts to pair the devices. A pairing code will be displayed on your PC screen, which you’ll need to enter into Moonlight on your Raspberry Pi.

Understanding NVIDIA GameStream: Functionality and Requirements

NVIDIA developed the GameStream technology to enable game streaming from your personal computer to various displays, including HDTVs and mobile devices, utilizing a client device as an intermediary.

It’s crucial to understand that GameStream doesn't provide independent computing power to your TV. The system relies entirely on your PC’s ability to run the games. The client device connected to your TV is a display terminal, significantly less powerful than your primary gaming PC, and functions solely to render the streamed video.

NVIDIA offers a range of GameStream-compatible products, such as the NVIDIA Shield, encompassing tablets and dedicated game boxes designed for connection to your television. However, purchasing an NVIDIA device isn't mandatory for accessing GameStream functionality.

The Moonlight project, an open-source initiative, has created a reverse-engineered client software package. This allows you to receive and display GameStream streams on a diverse array of platforms, including PCs, smartphones, and single-board computers like the Raspberry Pi.

While not entirely without cost, utilizing the Moonlight project generally proves more economical than purchasing a pre-built solution, constructing a second gaming PC, or investing in a Steam Machine. If you already possess the necessary hardware, the project is effectively free. Even with new purchases, excluding your PC, the total cost remains lower than a dedicated gaming machine. Let's examine the required components.

GPU and Computer Compatibility for GameStream

GameStream is a unique technology developed by NVIDIA and integrated into specific GeForce graphics cards. Support for GameStream on desktop computers begins with the GeForce GTX 650 series and extends to all subsequent models. For laptop users, GameStream functionality is available with certain GTX 600M GPUs, as well as all GTX 700M and 800M series cards.

System Requirements for Optimal Performance

Beyond the graphics card, utilizing GameStream necessitates either Windows 7 or a later version of the operating system. Furthermore, the computer must possess hardware capable of handling the streaming workload effectively.

  • The official GameStream requirements suggest a minimum of an Intel Core i3-2100 processor, or equivalent.
  • At least 4GB of RAM is also specified as a baseline requirement.

It's worth noting that whether these specifications represent strict necessities or merely suggested guidelines remains unclear, as testing was conducted on a system exceeding these parameters.

GeForce Experience Software

Successful implementation of GameStream also depends on the installation of the GeForce Experience software. This software operates independently from the core GPU drivers. If it wasn't specifically installed during setup, it likely isn't currently present on your system.

The GeForce Experience application is essential for enabling and configuring the GameStream feature.

The Raspberry Pi Microcomputer: A Comprehensive Overview

Multiple versions of the Raspberry Pi microcomputer have been released to date. For optimal performance in this project, a Raspberry Pi 2 is recommended, due to its enhanced processor capabilities compared to earlier models.

This particular unit was utilized throughout this tutorial, and yielded consistently positive results. The Raspberry Pi proved to be a reliable and efficient platform.

Alternative Models

The Raspberry Pi B+ model also presents a viable option. While not directly tested within this guide, numerous users have documented successful implementation using the Pi B+.

Prerequisites & Initial Setup

This guide assumes a foundational understanding of Raspberry Pi setup. We have previously provided extensive coverage of the initial configuration process.

If you are new to the Raspberry Pi ecosystem, it is advisable to first consult The HTG Guide to Getting Started with Raspberry Pi. This resource details crucial aspects such as power supply selection.

Following this, How to Enjoy Dead Simple Raspberry Pi Setup with NOOBS can assist you in installing Raspbian, the recommended operating system.

Proper preparation will ensure a smooth and productive experience with your Raspberry Pi project.

Moonlight Embedded

Installation of this software will be performed directly on the Raspberry Pi as part of the tutorial. However, its importance necessitates a specific mention at this stage, and we anticipate you may discover further applications for this excellent open-source project across various devices.

Further details regarding the Moonlight project can be found on its official website.

Key Features and Benefits

  • Open-Source Nature: Moonlight is freely available and benefits from community contributions.
  • Cross-Platform Compatibility: It’s designed to function on a wide range of devices.
  • Critical Component: Its role is essential for the functionality detailed in this tutorial.

The project’s open-source development model ensures continuous improvement and adaptation to evolving technological landscapes. Its versatility makes it a valuable asset beyond the scope of this specific guide.

Understanding the significance of Moonlight Embedded is crucial for successful implementation. We highlight it now to encourage exploration and potential reuse in your own projects.

Remote Peripherals

Remote access solutions like the Pi, Moonlight, and GameStream are compatible with standard gaming input devices.

Mice, keyboards, and gaming controllers can be connected via the USB ports, whether wired or wireless with a suitable adapter.

Connecting Peripherals

During testing, both a wired mouse and keyboard were directly connected to the Raspberry Pi.

Additionally, an Xbox controller was utilized, connected wirelessly to the originating PC.

For guidance on establishing a wireless Xbox controller connection to your computer, refer to this helpful tutorial.

Wireless Range and System Architecture

The wireless adapter exhibited an extensive operational range.

Consequently, it wasn't necessary to connect the controller directly to the Pi, as the system streams content from the PC.

It’s important to remember that the Pi doesn’t generate the game content itself; it merely relays the stream.

Therefore, the controller could be used directly on the source PC throughout the streaming process.

Steam

The official GeForce Experience documentation provides a catalog of compatible games. However, despite its size, this list isn't entirely complete.

As previously stated, our goal was to deliver a Steam Machine experience for your living room, capable of running all the games playable on your gaming PC.

Related: Discover how to integrate non-Steam games into your Steam library and personalize them with custom icons.

Even though the Steam application itself isn't included on the supported games list, it can be launched directly from the remote client.

This provides complete access to your entire Steam Library, as well as any additional games or emulators you've incorporated into Steam.

Testing confirmed successful launches of both native Steam titles and older PC games. For example, the classic god-simulation game, Black & White (released in 2001), ran without any complications.

Setting Up Your Personal Computer

The configuration process on your PC is remarkably straightforward. Assuming your PC is already operational and equipped with a GeForce graphics card, and you’ve previously installed GeForce Experience during GPU installation, no further action may be required!

Should you require the GeForce Experience software – distinct from your GPU drivers, it’s an additional software package – you can obtain it from the official download page here.

Rebooting is Essential

A system reboot is necessary after a fresh installation of the software. While reboot prompts are often optional, in this instance, a restart is crucial for activating the GameStream protocol.

We strongly advise against disregarding the restart notification, as troubleshooting can be significantly prolonged if it's ignored.

turn-a-raspberry-pi-into-a-steam-machine-with-moonlight-2.jpg

Finalizing PC Configuration

After rebooting and launching the software, navigate to the "Preferences" tab. Verify that "GameStream" is present within the left-hand navigation menu.

Select "GameStream" and enable streaming by choosing the "On my network" option. With this step completed, the PC-side configuration is finalized.

Now, we can proceed to configure the Raspberry Pi and begin gaming.

turn-a-raspberry-pi-into-a-steam-machine-with-moonlight-3.jpg

Setting Up Your Raspberry Pi

This guide presumes that you’ve already completed the installation of the Rasbian operating system on your Raspberry Pi. It also assumes you are able to successfully boot the device and gain access to the command line interface, either directly or by exiting the desktop environment.

If you haven’t yet performed these initial steps, it’s recommended to revisit the earlier sections of the documentation and utilize the provided links for guidance on configuring your Pi.

With Raspbian operational, only a few preliminary configurations are needed before you can begin enjoying your games. Prior to proceeding with the commands, we highly recommend enabling SSH access on your Pi.

This will allow you to execute these commands remotely from your primary computer, benefiting from the convenience of copy and paste functionality.

The initial task involves adding the Moonlight repository to your Pi’s list of sources. This enables the use of the apt-get command to download and install the necessary packages, avoiding the need to manually retrieve file URLs from the Moonlight GitHub repository.

Execute the following command while logged in as the root user on your Pi. The default credentials are username "pi" and password "raspberry".

sudo nano /etc/apt/sources.list

This action will open the repository sources list for editing. Add the following line to the end of the list.

deb http://archive.itimmer.nl/raspbian/moonlight wheezy main

To save your changes and exit the nano editor, press CTRL+X and confirm when prompted. Next, proceed with the installation of Moonlight by entering these commands.

apt-get update
apt-get install moonlight-embedded

During the installation process, respond with "Y" to all prompts to ensure all required files are installed.

The described method is the one we utilized and should function correctly for the majority of users. However, if you prefer to manually install the Moonlight software and its dependencies, please consult the readme file available at the Moonlight Embedded GitHub repository for detailed instructions.

The concluding step is to establish a connection between your gaming PC and the Raspberry Pi. At the command prompt on the Pi, enter the following command, replacing X.X.X.X with the local network IP address of your gaming PC.

moonlight pair X.X.X.X

This command will generate a certificate and a four-digit PIN. A popup window will appear on your computer screen, similar to the one shown below.

turn-a-raspberry-pi-into-a-steam-machine-with-moonlight-4.jpg

Input the PIN into the prompt to finalize the pairing process and authorize the Moonlight/Pi unit to access your game stream.

Enjoying PC Games in Your Living Room

Having successfully installed GeForce Experience on your computer and Moonlight on your Raspberry Pi, the next step involves connecting the Pi to your television – if it isn’t already – and utilizing a straightforward command to establish a link between the Pi and your PC, enabling you to play your games.

The standard format for initiating a Moonlight streaming session is as follows, where 'X.X.X.X' represents the IP address of your gaming PC.

moonlight streaming [options] X.X.X.X

Understanding the Options

The '[options]' section allows for customization of the streaming experience. While leaving it blank will default to standard settings, several switches can be employed to fine-tune performance. Below is a comprehensive list of available command-line switches for use within the options section.

 -720            Utilize 1280x720 resolution [default]-1080           Employ 1920x1080 resolution-width          Set horizontal resolution (default 1280)-height         Define vertical resolution (default 720)-30fps          Use a frame rate of 30 frames per second-60fps          Use a frame rate of 60 frames per second [default]-bitrate        Specify the bitrate in Kilobits per second-packetsize     Define the maximum packet size in bytes-app            Specify the application to stream-nosops         Prevent GFE from altering game settings-input          Configure input devices. Can be specified multiple times-mapping        Utilize a gamepad mapping configuration file (use before -input)-audio          Select ALSA audio output device (default sysdefault)-localaudio     Play audio locally

Should you encounter difficulties with the default settings, these command switches offer a means of adjustment. For instance, while Steam is typically the default application, you can explicitly launch it using the following command:

moonlight streaming -app Steam X.X.X.X

Consider a scenario where your system struggles with the default 60fps and you routinely forget to mute your computer's speakers before initiating Moonlight. You can reduce the frame rate to 30fps and disable audio output on the PC, directing it solely to your living room setup, with this command:

moonlight streaming -30fps -localaudio X.X.X.X

Seamless Streaming Experience

Upon executing the command, Moonlight will automatically connect to your PC, initiate Steam in Big Picture Mode, and within moments, the Big Picture Mode interface will appear on your television, mirroring the experience of playing directly on your computer. Observing your PC, you’ll notice the screens are duplicated.

At this point, many users experience a sense of amazement at the functionality of the setup. You'll be comfortably situated in your living room, enjoying games running on your PC in another room, with remarkably smooth performance, clear visuals, and crisp audio. This represents a tangible glimpse into the future of gaming.

Do you have a specific question regarding modern gaming? Please send an email to ask@howtogeek.com, and we will endeavor to provide a helpful response. We are also interested in hearing about any innovative Raspberry Pi projects you may have undertaken.

#Raspberry Pi#Steam Machine#Moonlight#game streaming#PC gaming#Raspberry Pi gaming