Any way to automate disable usb power down?

Just wondering if anyone has found a way to automatically untick the “allow windows to switch off this device to save power” boz of every usb/hid device in the windows device manager at once?

It seems like every time there’s any kind of windows update, these are getting reset and because a lot of devices are just listed as “usb device” or “hid device” or whatever, it’s basically impossible to tell what’s what, so i end up going through about 50 odd devices to check that the box is still unticked, usually randomly finding 2 or 3 that have been reset.

Setting the option to disable usb selective suspend in the power settings menu is not enough, unless i go through every device in the device manager, i still get things disconnecting and causing ctd in the sim.

After I’ve checked them all, it seems to be fine again until the next windows update… but it doesn’t even need to be a whole system update… even a small windows update like a security update or something seems to trigger a reset of these settings.

So just wondering if there’s a script or something to automate this, or whether there’s a simple way to search and replace things in the registry to set EVERY device to untick that box?

2 Likes

I would love to know this as well. It drives me crazy when devices shut down and I have to keep restarting or unplugging and repluging devices. You are right that there should be a global switch that prevents the pwering off of all devices. But I haven’t found a way yet.

Download the trial version of Spad Next. When you launch it the first time, it will ask if you want to relaunch in admin mode so it can disable usb selective suspend.

I love spad, it’s extremely versatile and quite easy to use. Profiles are available online, and people like Les O’Reily highlight what it can do. I have different profiles for all my aircraft, and they apply automatically when I switch aircraft.

https://www.youtube.com/results?search_query=les+oreillly+spad.next

3 Likes

@Gleneagle

If you are on a PC running Windows, go to your power settings and:

  1. Make sure you select “show settings that aren’t currently available”.

  2. Select the “high performance” power settings.

  3. Go to the advanced settings for your power plan and disable active power management for USB.

  4. Make sure that PCI buss power management is disabled.

  5. Verify that “hard drive power management” or “hard drive spins down after [x] minutes” is set to “disabled” or “never”.

  6. Continue through these settings and disable any power management features, or set available resources to “100%”

    • Note that you can set the CPU policy to a min of 5% and a max of 100% as this will allow adaptive processor power management which will help keep things cool.
    • If your power settings for “high performance” have both set for “100%”, leave them that way.
  7. Set processor cooling policy to “active” cooling.

    • Note that many motherboard BIOS settings will disable the fan if the processor temp is below some certain threshold.  I set mine to a minimum of 50%,climbing rapidly at about 40/50°C, ramping up to 100% within about 20°C above that.
  8. If possible, set the GPU fan profile to behave similarly.

  9. Disable the quick start (or whatever it’s called), in the “unavailable settings” so that every shutdown is a total and complete shutdown.  This will help eliminate strange behaviors from surviving a reboot or shutdown.

2 Likes

one single setting is necessary only:

within the extended energy settings, disable “usb selective energy safe”

not sure why in your case the some usb devices goes off anyway. May be you can mention some problematic devices ?

1 Like

Thanks for all the replies.

Spad next- i have tried, but i just couldn’t get it to play nice with my logitech switch panels etc
…i mean, it’s nice to be able to use switches that don’t always do anything in the sim, if they’re bound to a control that doesn’t exist on the plane im using… but my main gripe with it was that each individual switch had to be manually switched on/off at the start of every flight before it would sync with the sim… with the official logitech drivers, i only have to switch 1 switch and the whole panel then syncs. So it’s a no go for me personally, I’d rather have a few buttons do nothing than have to switch off and on every switch on the panel every flight lol. Thank you again for the suggestion though.

  • other settings

Yup, already set everything up, including disabling usb selective suspend, but for some reason i still have to make sure each device is manually set to not “allow windows to turn off this device”.

Thank you again for the replies. Appreciated, but unfortunately this alone doesn’t seem to be enough.

1 Like

Ok, so i decided to install spad.next again to give it another try… and they do seem to have added an option to sync all buttons once the panel is first used… so it does now behave the same add default in that respect…i.e. as soon as i hit any one switch on the panel, the sim syncs up with how ALL the other physical switches are. Spad.next does seem to handle the USB suspend stuff for each device upon startup too, which is great. I’ll have to do some testing obviously, but this does seem like a good solution.

Only down sides now are that the yoke no longer displays the time… but the stopwatch still works.

I’ve found some “online snippets” for the 3 panels (radio, switch, multi), by an author called connexct something or other… and they are labelled as “default” and seem to offer same functions as the default logitech drivers would… except the radio panel is fixed by moving in increments of .25 instead of 0.5 like the default did (i think?).

One other thing I’m not really sure about with this setup… I’ve already set profiles for the yoke, 2 throttles, and rudders, as well as my gear falcon trim wheel and razer tartarus keypad… they seem to still be working in flight sim (even though i thought I’d uninstalled everything related to logitech… the devices are recognised in spad.next but i haven’t set anything up for them in there… is it ok to just use them as is, or do i really need to set them up in spad.next?

What are the real benefits of doing in there instead of the sim? Because setting them all up in spad.next seems very complicated to me, and the same author hasn’t made profiles for these… is there any that are set up the same as defaults?

1 Like

Ah man, now im even more confused.

Even though spad.next had a popup at launch telling me about it automatically fixing usb suspend for all the devices… I’m now getting them cutting out mid flight again, in fact worse than before.

1 Like

Ok, so it might just be a combination of windows/razer/usb stuff that’s messing up again.

My rudder pedals were completely missing again. Unplugged the razer tartarus keypad and they come back… so I’ll try running things without that keypad and see if it works any better

1 Like
1 Like

Thank you, do you know if this will fix it for all usb devices/ is there a way to do that? Or does this just fix that one specific device called usb root hub?

Apologies, I’m not very savvy when it comes to using scripts. I’ve made a few batch files before, but my programming knowledge is next to none haha.

Flew for a little while earlier, all seemed to work, so i guess a lot might have been caused by some issue when the razer kaypad was connected :s

Would still be good to get that script working for all devices though, so thank you for sharing.

Yes i believe it will cover all devices. I haven’t needed to do this so it’s speculation on my part.

I am probably doing something wrong, but i couldn’t get that script to do anything unfortunately.

In power shell it just throws up a bunch of errors that i don’t understand haha.

But yeah, apart from the clock not working, spad.next seems to have done the trick… as long as i don’t plug in my razer keypad… which is a bit weird, since it’s also not directly related simply to the number of devices connected… if i plug my xbox controller in, everything still works… but if i plug the razer keypad in, rudders completely vanish out of existence.

At any rate, using spad.next also means i don’t have to update the drivers for the controllers using anything from logitech or saitek…i just let windows do its thing, and the other panels like the radio etc are managed by spad.next… and with the razer unplugged, everything seems good again.

As a result of going this route, windows is also no longer conplaining about the saitek drivers not allowing core isolation… so I’ve managed to get that turned on finally, and no more annoying notification from windows security :slight_smile:

Fingers crossed, everything will work from now on haha

1 Like

Maybe a bad driver for the razer keypad?
Glad to hear you have it sorted out

Are you running this using Administrative privelage?[1]

Have you tried an administrative command shell, (not PowerShell), as PowerShell can’t do everything.

[1] Select the command prompt, right click, select “more” and then “run as Administrator”

If possible post a screen-shot of the errors.

Yes, was running as admin, and it wasn’t a recognised command in cmd.

However, have now googled a different script which does seem to work on at least some devices (checked by deliberately ticking the box, then running the script, then checking and it had been unticked).

Not all though, e.g. there’s a listing for logitech virtual keyboard (not sure why exactly? Must be something to do with my steering wheel?), which is not affected by this script… wonder if i can change a variable somewhere?

Anyway, this is the script which seems to do something at least…

Set-CimInstance -Query ‘SELECT * FROM MSPower_DeviceEnable WHERE InstanceName LIKE “USB\%”’ -Namespace root/WMI -Property @{Enable = $false}

Run in power shell as admin.

2 Likes

Just to also add, if, like me, you like to have a batch file to start everything up for flight sim…

Take that script, put it into note pad and save it as a .ps1 file, e.g. I’ve called mine fixusb.ps1

Then add the following to your batch file:-

PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& ‘C:\fixusb.ps1’”

As long as you run your batch file as admin, seems to also run the shell as admin so you don’t have to click the admin popup twice… this should then set most usb devices to untick that box before you play the game :stuck_out_tongue:

This is now my startup script just as an example:-

@echo off

PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& ‘C:\fixusb.ps1’”

cd "C:\Program Files\SPAD.neXt"
start SPAD.neXt.exe

cd “C:\Program Files\Air Manager”
start Bootloader.exe

cd “C:\Program Files\LittleNavmap-win64-2.8.8\LittleNavmap-win64-2.8.8”
start littlenavmap.exe

cd “C:\Program Files (x86)\msfs-popout-panel-manager”
start MSFSPopoutPanelManager.exe

cd “C:\Program Files (x86)\Steam”
start steam.exe steam://rungameid/1250410

exit

This opens my flight sim programs and then starts the sim

1 Like

Ok, one final update…i should have carried on reading the conversation on reddit… there’s a better script that fixes it for ALL devices in the device manager. Change your fixusb.ps1 script to this:-

Get-CimInstance -ClassName MSPower_DeviceEnable -Namespace root/WMI |
Set-CimInstance -Property @{Enable = $false}

Many thanks to this user on reddit, and also thanks to everyone here, wouldn’t have found this without googling terms from the original script suggested here.

The reddit link is here

2 Likes

You may be already doing this, but are you running the panels through a powered USB hub? They are very power hungry and ordinary hubs drawing power from the motherboard simply will not be able to cope, especially if you disable USB power saving settings.

I had similar problems at first with my three panels until I used a 13A mains powered hub.

Re: SPAD. It’s a bit of a steep learning curve, but indispensable once you get used to it. Connex is Ulrich, the developer of SPAD.

1 Like