Jump to content

Warthog HOTAS Preventing Monitor from Sleeping - Solved with PowerShell Script


Recommended Posts

Posted

I recently encountered a frustrating problem with my Warthog HOTAS device preventing my monitors from entering sleep mode, even when my computer was idle. As someone who prefers to leave my PC on, this issue resulted in the screens staying active, lowering the lifespan of my monitors and consuming unnecessary power. Despite attempting to update drivers and firmware, I couldn't find a direct solution.

To overcome this issue, I created a PowerShell script that enables and disables the Warthog HOTAS device on demand. By leveraging two separate scheduled tasks, I could automatically disable the device when the computer is locked and re-enable it when the user logs in.

GitHub Repository: https://github.com/royborgen/HOTAS_Enable_Disable

I'm sharing this script as I believe many others may be facing similar challenges with their Warthog HOTAS device. It provides a practical and automated approach to regain control over screen sleep functionality, ultimately saving power, improving the lifespan of the monitors, and preventing unnecessary screen activity.

If you're encountering this issue or want to ensure efficient screen power management while extending the lifespan of your monitors, I encourage you to check out the script on GitHub. Feel free to customize and adapt it to suit your specific needs. Let's solve this problem together!

  • Like 2
  • Thanks 1
Posted

Thanks for this.  I have a TM 16000 HOTAS and my monitor also doesn't sleep.  I guess the main commands in the script are "Disable-PnpDevice -InstanceId $deviceId" and "Enable-PnpDevice -InstanceId $deviceId" and I just need to find the "deviceId" for my HOTAS.  I'll give it a shot later on tonight and report back on what I find out.

  • Like 2
Posted

Nice workaround!

I have both Warthog stick/throttle, TM T16.K/TWCS and Cougars, (MFDs and throttle), plus various other game peripherals, like several Razer keyboards connected. I did have issues with screens not turning off at set time out. A complete re-installation of Win10 years ago fixed this, along with an update to Razer's Synapse. My previous installation had been through and upgrade path from Win8 and Win8.1 so I was not really surprised. 🤭

My point is. It's not your Thrustmaster equipment that are the problem, but rather a conflict with some other settings/peripherals on your computer. 😉

Cheers! 

  • Like 2
Posted (edited)

@dankmaster: The script searches the Windows registry specifically for Warthog devices located under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick\OEM. It scans through all subkeys and retrieves any entries that have an 'OEMName' key with a value containing 'HOTAS Warthog'. If you intend to use the script for a different device, you will need to identify how that device is labeled in the registry and modify the script accordingly. You should be able to find the device's entry in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick\OEM. You might get away with modifying the scripts 12th line and replacing "Where-Object { $_.Property -match "OEMName" -and $_.GetValue("OEMName") -like "*HOTAS Warthog*" }" with "Where-Object { $_.Property -match "OEMName" -and $_.GetValue("OEMName") -like "*HOTAS*" }"

@MAXsenna: Windows typically keeps the monitor active when game controllers are in use. However, in this particular case, I believe the issue stems from the driver failing to notify Windows that it is no longer active. Upon investigating, I noticed that when accessing the 'Game Controllers' section under "Setup USB Game Controllers" in Windows Control Panel and selecting 'Throttle - Hotas Warthog,' it displays that switches are being pressed. I guess moving them to the off position should help. Although I'm uncertain if this is the root cause, I strongly suspect it to be a driver-related problem.

Edited by JohnDoe79
  • Like 1
Posted

Thank you @JohnDoe79 I can confirm that following your tips above, I was able to disable both my T16000 throttle and stick and then my monitor entered sleep mode as desired.

In case this helps anyone else, the OEMNames corresponding to my particular throttle and stick are, respectively, "TWCS Throttle" and "T.16000M".  As per the above, I simply changed line 12 to replace "*HOTAS Warthog" with the OEMName of my devices and it worked perfectly.

Now searching for a way to have Windows automatically run the scripts before launching and after closing DCS.exe

  • Like 1
Posted

@dankmaster: I've got you covered bro! You can easily achieve this using a bat-file. First, run the PowerShell script to enable the device, then launch the application. Once the process is closed, run the PowerShell script again to disable the device.

To make things easier for you, I've added a working example in the repository. You can find it here: https://github.com/royborgen/HOTAS_Enable_Disable/blob/main/launch_DCS.bat

Just remember to run it as an administrator, as it requires the necessary permissions to enable and disable the HOTAS. I've also updated the README.md file to provide more details on how to accomplish this.

  • Like 2
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...