Steam In-Home Streaming: Fix the "screen is locked on the remote computer" error
Steam In-Home Streaming is an excellent way to stream Windows-based Steam games to other platforms (not just Mac and Linux, but even to other Windows machines with lower-performance hardware).
However, there is a compatibility issue between Microsoft Remote Desktop and Steam In-Home Streaming. Frequently, attempts to start a Steam streaming session after a Microsoft Remote Desktop session fail with the following error:
"The screen is locked on the remote computer."
Apparently, this is an issue with the way that Microsoft Remote Desktop (either the client or the server) terminates a terminal services session: something about the session is being left open on the server, thus locking the session and preventing a new session for the same user.
This conclusion is supported by the following observation. One of the only reliable solutions to this problem is to terminate the session *not* by closing the app, but by running the following command at an administrative command prompt:
for /f "skip=1 tokens=3 usebackq" %%s in (`query user %username%`) do (%windir32%\System32.tscon.exe %%s /dest:console)
Running that command (either live or as a script) causes the Terminal Services session to end on the client machine - and for some reason, Steam no longer displays the "locked" message and works perfectly.
This is a very widespread issue, and one that Valve has been unable to address for *several years* now. Just do a web search for "steam in-home streaming screen is locked" to see a high hit count, or look at the following links:
No way to update comment so I have to re-comment.
If you are manually opening up cmd.exe as Admin and then pasting the command then use
for /f "skip=1 tokens=3 usebackq" %s in (`query user %username%`) do (%windir%\System32\tscon.exe %s /dest:console)
However, if you are building a batch file (SteamLinkRDPLogoff.bat for example, right-click run as Admin) then you will need to use the following
for /f "skip=1 tokens=3 usebackq" %%s in (`query user %username%`) do (%windir%\System32\tscon.exe %%s /dest:console)
The only difference is %s versus %%s, batch file scripting variable nonsense. Using PowerShell would be cleaner (and IMHO easier to read), but alas -- batch doesn't have to deal with PowerShell execution policies.
Royce Edward Barber commented
update for audio, i had to run an audio cable through the hall way and across the house (sigh) to do my online classes using the steamlink. i could have done the classes on another laptop but they require 3d rendering so i have to use my fast pc and steamlink.
Royce Edward Barber commented
2017 here. XD
Saaaaame issue. Steam WANTS this issue, no matter how many times they have said they are working on a fix. My SteamLink works amazing EXCEPT 1.) When I open an app as Admin, it disconnects SteamLink, which is a HUGE problem!!!! Especially because I like to have UAC security on max.
2. No physical PowerOn button at all. You can unplug it for a second or find a keyboard. Some controllers don't wake up the SteamLink, so I plugged in a keyboard and that works for me. Just slam some keys and it'll power up.
3... Minor... Some of my displays don't have speakers built in, so that's another HUGE bummer. No headphones for me! And no AUDIO AT ALL when I don't have built-in speakers.
when I copy and paste that string it tells me "%%s was unexpected at this time."