Hello Pham Cao Cuong,
Thank you for posting in Q&A forum.
To disable "Allow this computer to turn off this device to save power" for an I2C HID device solely via PowerShell, you can try these steps:
- Open Device Manager by pressing Windows key + X and selecting Device Manager from the menu.
- Locate the I2C HID device under the Human Interface Devices category.
- Right-click on the I2C HID device and select Properties.
- Go to the Power Management tab.
- Uncheck the box that says "Allow this computer to turn off this device to save power."
- Click OK to save the changes.
Alternatively, you can use PowerShell to disable this feature for the I2C HID device. Here are the steps:
- Open PowerShell as an administrator.
- Type the following command and press Enter:
Get-PnpDevice -Class "HIDClass" | where {$_.FriendlyName -like "*I2C HID Device*"} | foreach { Disable-PnpDevice $_.InstanceId -Confirm:$false }
This command will disable the "Allow this computer to turn off this device to save power" feature for all I2C HID devices on your computer.
Alternatively, you can disable "Allow this computer to turn off this device to save power" for I2C HID device solely via registry, please follow these steps:
- Press the Windows key + R to open the Run dialog box.
- Type "regedit" and press Enter to open the Registry Editor.
- Navigate to the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ACPI<I2C HID device><Device instance ID>\Device Parameters
- Right-click on the "Device Parameters" key and select "New" > "DWORD (32-bit) Value".
- Name the new value "ConservationIdleTime" (without quotes).
- Double-click on the "ConservationIdleTime" value and set the value data to "0" (without quotes).
- Click "OK" to save the changes.
- Close the Registry Editor and restart your computer for the changes to take effect.
Note: Replace "<I2C HID device>" and "<Device instance ID>" with the appropriate values for your device. You can find these values by opening the Device Manager, locating your I2C HID device, right-clicking on it, selecting "Properties", and then navigating to the "Details" tab.
I hope the information above is helpful.
If you have any questions or concerns, please feel free to let us know.
Best Regards,
Daisy Zhou
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.