Author

Topic: Solution: How to re-hook video drivers after a Remote Desktop session (Read 2270 times)

newbie
Activity: 7
Merit: 0
Hello everyone,

A lot of people have problems when using RDP and GPU mining, for obvious reasons.
Although there are some who already have a workaround using a VNC client, others can have a problem with that, for one it might just not work (like for me) and then you also need to be able to set firewall and port forwarding rules for VNC.

What I propose is a solution that doesn't require for any change whatsoever, you will be able to run the GPU mining from a remote desktop session, although both will not run at the same time, it's technically impossible. Maybe this has already been discussed here, I'm not sure.

The problem:
If you establish a remote desktop session to the computer where you want to run the GPU mining you can't start the mining process because the RDP session has unhooked the hardware drivers and the mining software won't be able to read the GPU, showing an error similar to this:
clGetPlatformIDs failed: invalid/unknown error code

One might think that the solution would be to schedule the mining process to start after you close the RDP session, this won't work out of the box because you closed the RDP session but you didn't terminate it, so the video drivers are still unhooked. Apparently only by either physically logging in or restarting the computer one would be able to re-hook the video drivers again, but there is another way much more easier and faster, without VNC.

Let's cut to the chase...
For this you will need to run the mining process through the command line, then you have to create a small batch file that you will run while in an RDP session. This is the content of the batch file:
@echo off
tscon.exe 0 /dest:console
ping 127.0.0.1
start poclbm.exe -d 0 http://xxx.xxx

The batch file does the following:
1. Terminates the RDP session (allows for the video drivers to re-hook);
2. Pings the localhost (used to delay the beginning of the mining process);
3. Starts the mining process (in a second command prompt);

As soon as you run the batch file your RDP session will be terminated but the mining process will still start remotely, check your pool to see it working. I hope this is useful to anyone who can relate to this problem.

Cheers!
Jump to: