STEAM GROUP
Steam Remote Play homestream
STEAM GROUP
Steam Remote Play homestream
3,914
IN-GAME
32,701
ONLINE
Founded
November 7, 2013
HammeR JoE Mar 2, 2015 @ 10:53am
Building a Steam Stream Client - A Noob's Guide
I had been looking around for some solution to build a Steam console similar to the Alienware Alpha. I hadn't tried Steam's In-Home Streaming service but began to think it would be a good option instead of storing games locally as I already had a powerful gaming PC I'd built previously. I began to think, could there be a solution to building a really low-cost, low-powered box which is simply used to stream games from my main PC? After countless hours of fruitless searching I decided to look into building one myself.

There were a number of challenges that needed to be overcome if this could be called a true 'console' in my eyes:

1. It should automatically boot up from sleep by pressing the home button on my wireless XBOX 360 control pad
2. It should automatically boot the host (gaming) PC in my bedroom
3. The client should automatically boot into BPM and connect to Steam IHS
4. After playing a game, I should be able to shut down the host PC remotely and put the client to sleep

I know, I know, many people have developed their own 'Steam Box' by building a low cost, low profile gaming PC and changing the Windows shell. Actually, I found this solution to be very interesting as there were a number of things I could take from those experiences. But anyway, my process is below for anyone looking to do the same. I've tied together lots of links from all over the web to help as well.


--------------------------------------------------------------------------------------------------------------------------------------
Step 1: OS Choice & Booting from Sleep with an Xbox 360 Wireless Controller
--------------------------------------------------------------------------------------------------------------------------------------

Before looking into the actual technical bits of the implementation, I wanted to decide between a UNIX OS or simply using Windows. Initially, I had thought the only difference would be a faster, lighter boot using say, Ubuntu, compared to Windows 7. However, after reading around a bit, I decided against Linux for a few reasons. Firstly, Windows is the king of file support; if I wanted to use this as a HTPC, I'd prefer to be able to open any and everything without having to worry about file support. There's an argument to be made that Linux is just as good, I know since I've used it in the past, but it wouldn't just be me using it. There would be other, less tech-oriented members of my family who would need to use the box as well. Ultimately, (with a sad heart) I decided to go with Windows as not only would the file issues be a non-issue, but also, we could boot back into Windows with a wireless mouse and keyboard such as the Logitech K400.

This then got me thinking. I am a developer and an Electronic Engineer and I've always loved being part of Microsoft's TechNet community. As such, I jumped when the Windows 10 beta arrived (using it on this very machine in fact!) and so I thought if this is going to be using new tech in Steam's IHS, then it should be cutting edge in terms of OS and software. Plus it'd make a good home project to test just how far the beta can go at this time. I'm currently using build 9926 if anyone wants to try it.

DISCLAIMER: Some of the tools mentioned in this post do not work on the Windows 10 TP build 9926. I have pointed out where and when.

I'm using an old Dell XPS M1330 with a Core2Duo proc and 2GB of RAM. It was originally built for Windows Vista, so I wasn't expecting anything amazing performance-wise, just to prove the concept really. I was quite surprised by how well the TP is running on this machine. In fact, I think it will allow many people to get a few more years out of any old hardware lying around.

Anyway, so after installing the OS and connecting my Xbox Controller, I attempted to wake my laptop up from sleep. This can be done in two steps:

1) First ensure that the option for powering USB slots from your motherboard during sleep is turned on in your BIOS
2) Ensuring that Windows is correctly set up to accept a 'wake up' signal from the device attached

Simple enough? The windows settings are in two places. First you need to enter Control Panel > Power Options and from the power plan already selected, click on Change Plan Settings. From the resulting pop-up click Change advanced power settings. This should open a window which allows the user to change a number of additional settings linked to how power is utilised during operation. Scroll down in the Advanced Power Settings window to USB Settings and disable USB Selective Suspend. Once that's done, click Ok and open Control Panel again. Navigate to Devices and Printers and you should see two entries: one for the actual controlpad and another for the wireless receiver. Right click on the receiver and select properties from the drop down. In the advanced tab of the pop-up, select the Properties button. You should then see the driver properties of the wireless receiver and among the tabs available will be one for power. There should be an option reading "Allow this device to wake the computer", make sure that's checked. Now you can test it.
As some of you may know, there are a number of 'sleep modes' available to the Windows OS. Using this technique, the pad should be able to wake the PC both in S3 and S4 sleep modes. Alas, it did not work.

After further research, I found many people got this technique to work for wireless TV remotes, or low power devices similar to them (see links at end of post). What I discovered is that the Xbox pad requires far more power than a standard USB port supplies during sleep to maintain a wireless connection to the USB receiver and so it does not allow for this feature. However, as a useful bit of information, pressing the 'connection' button on the receiver itself did wake my laptop.

Conclusion: I had to give up on trying to get the pad to wake the box and resign myself to waking it by pushing the power button whenever I want to play. What? I'm lazy!


--------------------------------------------------------------------------------------------------------------------------------------
Step 2: Connect to IHS
--------------------------------------------------------------------------------------------------------------------------------------

Ok, so this one has been covered quite a bit on the web, though it's a little difficult to pull off with consistency. I have now gotten to the point where my Host PC turns on every time. The main bulk of this part and the next was taken from the steamcommunity link posted here: https://steamcommunity.com/groups/homestream/discussions/0/522728268876555995/
However, before you do this, you need to enable IHS. To do this, first start Steam on your Host PC and then select Steam from the top menu within the Steam window and select Settings from the drop down. In the Steam settings box, select the In-Home Streaming Settings from the list to the left and make sure the Enable streaming box is ticked. You then need to repeat this process on your client machine (in this case, my laptop). Once that has been done, you can test that IHS is working by logging in to the same Steam account on both machines. As long as you are connected to the same network, Steam should automatically connect and show you games which are available to be streamed.


--------------------------------------------------------------------------------------------------------------------------------------
Step 3: Auto Boot the Host PC and Launch Steam in BPM
--------------------------------------------------------------------------------------------------------------------------------------

Now comes the hard part. Getting a PC to start remotely is an old feature that motherboards have had for a long time. This feature is called Wake-on-LAN. I'm using Matcode's WoL EXE obtained here: http://www.matcode.com/wol.htm

The basic process for enabling WoL is explained in the steamcommunity link provided above, so I won't rehash what's already been done here. My key was to get WoL to work every time the Laptop wakes from sleep and then be able to remotely shutdown my host PC once I've finished playing. Following the tutorial linked above, I enabled WoL in my BIOS, added the shortcuts to Steam as described and then...stopped. I realised, how can I get the packet to send when the Laptop wakes from sleep? I tried a few things using Windows Task Scheduler but nothing seemed to work. And so, with a heavy heart, I decided to change this to wake up from shutdown. On the positive side, this means my client will be off most of the time and so saving me more energy. On the negative side, I'm not sure how this will affect turn on speed in real life numbers (I'm yet to build the actual box so I don't have a final number).

My first implementation was using Steam's settings. To test that this works, I set Steam to start on windows startup and to boot into Big Picture Mode. Of course, this worked without any problems but was slow and clunky. Firstly, it boots full windows before Steam starts meaning you see the full desktop and lots of extra Windows services run when you don't need them; and secondly, it looks horrible. And so, I decided to replace the shell with BPM only.

The complicated part thus is to get the 'magic packet' WoL sent automatically on boot without starting the Windows shell. The second challenge is to ensure there is some way to enter Windows should need be. How to do this?

You guessed it: Scripts.

In my implementation, I created a batch script to handle the Steam start and magic packet for WoL. My code is as below:

@ECHO OFF
C:\Users\blah\Downloads\mc-wol.exe xx:xx:xx:xx:xx:xx >NUL
START /WAIT "C:\Program Files\Steam\Steam.exe" steam://open/bigpicture
START explorer.exe

What this does is start the mc-wol EXE file using the MAC address of my host PC as the argument. This send the Wake-on-LAN packet and wakes my PC up. The >NUL bit hides the code from sight (I'm a bit paranoid with my MAC code traversing the network through a batch file, not the safest thing to do and this way, it won't show in the command prompt window). The batch file then starts Steam in BPM and waits for Steam to close before starting the Windows Shell. I like this implementation of returning to Windows as I don't need to make a custom shortcut in Steam, I can just use the Exit Steam button in BPM instead of selecting Return to Desktop. This all works flawlessly. Once this is done, you can follow the linked tutorial to replace the Windows Shell in regedit with the batch file. Remember to disable Steam auto start on startup as well as start in BPM as the batch file will handle this itself.

There were some problems with enabling WoL using my motherboard. Firstly, I had to make sure WoL was enabled through my network card. This is achieved by navigating to Control Panel > Device Manager and right clicking on my Ethernet adapter and going to its settings page. Selecting the Advanced tab, my card needed to have Wake on Magic Packet enabled as well as Wake on Pattern Match disabled. My card also required Wakeup Shutdown to be enabled, otherwise it wouldn't start. I'm not sure if all cards have a Wakeup Shutdown option but if it does, be aware that it can cause problems. When it is enabled, the ethernet controller continues to listen for the magic packet and may switch the host on even after you have shut it down. To fix this problem, I needed to disable 'fast/hybrid boot' within Windows. This is supposed to have a bit of a negative hit to boot times but I didn't notice a difference. For the full discussion, please see the following link: http://www.tomshardware.co.uk/forum/308090-30-rebooting


--------------------------------------------------------------------------------------------------------------------------------------
Step 4: Boot Customisation
--------------------------------------------------------------------------------------------------------------------------------------

This last step is only aesthetic in nature, but crucial in my opinion. I don't want to know that this is a Windows machine unless I choose to enter Windows myself. However, before customising the actual boot process and graphics involved, I wanted to make the batch file completely invisible so that the only thing you see upon logging in to Windows is the BPM start animation. For people used to Command Prompt, you would have noticed that I included the @ECHO handle in my batch file. This should, in theory, hide the cmd window completely while the script runs in the background. However, because the batch file runs the wol EXE, a window remains open. I've tried quite a few methods to try and resolve this (http://superuser.com/questions/62525/run-a-batch-file-in-a-completely-hidden-way) including the VB script method but unfortunately, nothing I've tried has worked. I'm hoping that the SSD I purchase for my actual box build is fast enough that I won't ever see this window but if anyone has an alternative that works, please let me know.

The last bit is to customise the boot images to make it look as if Windows isn't involved at all. Alas, this part does not currently work on the Windows 10 TP but should work on 7/8. You can pretty much find all of the information in the following link: http://www.moderndefrag.com/2013/10/turn-windows-7-pc-into-dedicated-steam.html

That's pretty much it. I can confirm that everything starts and connects within around 30secs on this old laptop. My host PC is an ageing beast with an i7 3770K and a GTX 660. It also has an SSD installed and 16GB of RAM. The main delay at the moment is the startup time of the client, but I'm hoping to cut that down significantly in my actual box build. If anyone has any improvements on this design, please let me know as I'm always looking to improve! Hope you guys enjoyed it and hopefully this guide will prove useful to others like me!

Additional References:
http://forums.logitech.com/t5/Keyboards-and-Keyboard-Mice/Unable-to-wake-up-PC-from-sleep-using-keyboard/td-p/1065255
http://forum.kodi.tv/showthread.php?tid=201804
Last edited by HammeR JoE; Mar 3, 2015 @ 5:58am
< >
Showing 1-5 of 5 comments
HammeR JoE Mar 4, 2015 @ 6:55am 
...It took one day and all my work is thrown out the window! ONE DAY!

If anyone is looking to build something like this, you might now want to wait for the Steam Link console to be released in November. Valve have just announced it at GDC 2015, linked here: https://steamdb.info/blog/source2-announcement/
CATATAFISH Aug 2, 2015 @ 9:26am 
I'm not sure why this has no replies so far, a really fantastic guide. I don't think your work has been overwritten by the upcoming steam box, as I want my HTPC to be both a great Steam streamer as well as other more generic PC things like streaming movies, browsing the web etc.

This has made my setup far more robust. Thanks again for all the hard work :)
HammeR JoE Aug 3, 2015 @ 4:04am 
Hi basil,

You're welcome of course, just happy to share. I'm glad it helped your build.

I'm planning to experiment a bit more in the coming months to see if I can solve the USB power issues as well as implementing a full aesthetic solution in Windows 10 now that it's out. I'll probably update this post then.

I'm also interested to see how the Steam Link handles remote startup and shutdown (if at all) to see if I can learn some new tricks.

Thanks again for your kind words. :))
DataByne Aug 12, 2015 @ 8:11pm 
I'd also like to compliment your guide. For people like me who use their HTPC as a media hub/server, a dedicated streaming box doesn't always cut it.
Steel0dragon Aug 12, 2015 @ 9:57pm 
still neat idea
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Mar 2, 2015 @ 10:53am
Posts: 5