• 16.04.2024, 09:48
  • Registrieren
  • Anmelden
  • Sie sind nicht angemeldet.

 

D5 Next - Safely Remove Hardware

Mittwoch, 9. September 2020, 06:56

My D5 Next is connected to the system through one of the on-board USB headers on the motherboard (ASUS Maximus XI Formula), and Windows 10 Pro is showing the pump in the "Safely Remove Hardware and Eject Media" icon in the system tray. Is there any way to prevent this from happening? I was hoping that a device plugged directly into a motherboard header would not show up here, but it seems it does. Has anyone figured out how this can be removed? Maybe editing the registry or something?

Thanks. Sorry if this has been posted before

Mittwoch, 9. September 2020, 07:19

Is there any way to prevent this from happening?
No, this is an issue in the Microsoft USB driver. You cant prevent it.

Donnerstag, 10. September 2020, 05:49

ok. i know there are some registry wrokarounds for people who have hard drives show up there sometimes and they can remove it by editing some registry keys.. but i wouldnt have any idea where to find the registry entry for the D5. Thanks anyways :thumbsup:

Donnerstag, 10. September 2020, 06:15

I found this interesting information about about what gets labeled as removable by Windows. Here is a post from a MS technician and supporting documentation:

Source: Is there any way to hide a device from "Safely Remove Hardware and Eject Media"
(3rd post down)

Zitat

Hi,

Please understand that the Safely Remove hardware functionality enables customers to make sure that their device is ready for removal. If a device is identified as a removable device, it should be listed in "Safely Remove Hardware and Eject Media".

Based on my research, whether the device will be listed depends on how the device is designed. I would like to share the following documents with you:

Container IDs Generated from the Removable Device Capability

DEVICE_CAPABILITIES
(From this document, please note the section “Removable” and “SurpriseRemovalOK”. “If Removable is set to TRUE, the device is displayed in the Unplug or Eject Hardware program, unless SurpriseRemovalOK is also set to TRUE.”)

Container IDs Generated from a Removable Device Capability Override

Therefore, as I know there may be no way to hide the device from "Safely Remove Hardware and Eject Media", unless the design for the device is changed. If you thought a device should not be listed, it is also recommended that you contact its manufacture.

Thanks.
Nicholas Li - MSFT
This makes me think that this change could be implemented in a firmware update. Or, if aquacomputer intentionally sets the device to "removable", perhaps aquacomputer can provide an optional firmware to users who do not want this functionality, preferring instead to have the "Removable" set to FALSE. Maybe this is something aquacomputer engineers can consider, it would be great to have this device absent from the removable device list

Donnerstag, 10. September 2020, 07:24

This makes me think that this change could be implemented in a firmware update.
this is not working, this IS A DRIVER ISSUE!


This is only working for disk drives, not for Winusb devices.

Donnerstag, 17. September 2020, 07:20

OK!
im just trying to do some research to figure out if something can be done, and I don't give up easily. But, you know, Microsoft says "contact the manufacturer" and the manufacturer says "contact Microsoft" ... naturally, that's a bit irritating because there is no further recourse if both sides believe the other side is responsible. Thx anyways

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »exploiteddna« (17. September 2020, 07:22)

bojer

Junior Member

Donnerstag, 17. September 2020, 13:21

People have connected to internal USB AiO's without this notice.
I have connected CORSAIR PSU too without this notice.
Only D5 NEXT showing this message - Safely Remove Hardware.
Sebastian do you still think this problem must fix Microsoft? :S

This problem had nVidia too :) and they fixed it with new drivers. No Microsoft.

Donnerstag, 17. September 2020, 16:36

People have connected to internal USB AiO's without this notice.
I have connected CORSAIR PSU too without this notice.
Only D5 NEXT showing this message - Safely Remove Hardware.
Sebastian do you still think this problem must fix Microsoft?:S

This problem had nVidia too :) and they fixed it with new drivers. No Microsoft.
nVidia has solved the driver problem with new drivers, so what should Aquacomputer do now, their devices all use the Windows 10 driver from Microsoft!
So who has to repair the driver?
Es gibt keinen Ausweg, den ein Mensch nicht beschreitet, um die tatsächliche Arbeit des Denkens zu vermeiden.
Thomas Alva Edison (1847-1931), amerik. Erfinder

Freitag, 18. September 2020, 04:50

well what driver do the AIO coolers use? ive never used AIO, does that plug into USB header?

But again, based on what ive read, its not a driver issue. It seems there is some flag that can be set in Firmware so that driver knows it is not a removable device

Freitag, 18. September 2020, 08:28

Aquacomputer devices comply with the USB specification, they use the generic Windows USB drivers.
What should Aquacomputer do now, build a workaround because Microsoft does not comply with the specification?
Since Microsoft is constantly tinkering with Windows, this would be a pretty stupid idea, because they would be constantly chasing the changes from Redmond!

The other question is, why does it bother you?
The eject function for removable media is obsolete after the changes Microsoft made some time ago, because all data is written immediately, so hardly anyone will bother to look at this setting anymore.
So what is the point?
Es gibt keinen Ausweg, den ein Mensch nicht beschreitet, um die tatsächliche Arbeit des Denkens zu vermeiden.
Thomas Alva Edison (1847-1931), amerik. Erfinder

Donnerstag, 9. März 2023, 00:29

Posted twice due to 500 Server Error...

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »AterIgnis« (9. März 2023, 00:33)

Donnerstag, 9. März 2023, 00:32

Hello,

I was also bugged by some of devices being in "Safely Remove Hardware" list (yup, my brain prefers for this list to be empty if there are no removable devices in my PC). That led me on a quest to find a reason and solution.

Reason I've found here: WinUSB driver (still wondering why aquaero 6 LT is not WinUSB device and works fine this way and D5 NEXT and Leakshield have to be WinUSB - that eluded me)

Solution I made by quickly throwing together some C code for windows "setupapi". Currently it hides any WinUSB devices present, but with some more work it can check for VendorID or something else and even can be integrated into aquasuite as optional setting. Code requires administrator permissions to do its work, though.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include <iostream>

#include <windows.h>
#include <initguid.h>
#include <devpkey.h>
#include <setupapi.h>

DEFINE_GUID(GUID_CLS_WINUSB, 0x88BAE032, 0x5A81, 0x49F0, 0xBC, 0x3D, 0xA4, 0xFF, 0x13, 0x82, 0x16, 0xD6);

int main(int argc, char **argv) {
    HDEVINFO deviceInfoSet = SetupDiGetClassDevsW(&GUID_CLS_WINUSB, L"USB", NULL, DIGCF_PRESENT);
    if (deviceInfoSet == INVALID_HANDLE_VALUE) {
        std::cout << "Failed enumarating devices";
        return 1;
    }

    int deviceInfoIndex = 0;
    SP_DEVINFO_DATA spDevinfoData = {0};
    spDevinfoData.cbSize = sizeof(spDevinfoData);

    std::cout << "Devices: " << std::endl;

    while (SetupDiEnumDeviceInfo(deviceInfoSet, deviceInfoIndex, &spDevinfoData)) {
        BYTE buffer[256] = {0};

        std::wcout << std::wstring(reinterpret_cast<WCHAR*>(buffer), StringFromGUID2(spDevinfoData.ClassGuid, reinterpret_cast<WCHAR*>(buffer), sizeof(buffer) / sizeof(WCHAR))) << ":";

        DEVPROPTYPE dataType;
        if (SetupDiGetDevicePropertyW(deviceInfoSet, &spDevinfoData, &DEVPKEY_Device_FriendlyName, &dataType, buffer, sizeof(buffer) / sizeof(WCHAR), NULL, 0)) {
            std::wcout << std::wstring(reinterpret_cast<WCHAR*>(buffer));
        }
 
        if (SetupDiGetDevicePropertyW(deviceInfoSet, &spDevinfoData, &DEVPKEY_Device_SafeRemovalRequiredOverride, &dataType, buffer, 1, NULL, 0)) {
            std::cout << ": Override=" << (buffer[0] != DEVPROP_FALSE);
        }

        dataType = DEVPROP_TYPE_BOOLEAN;
        buffer[0] = DEVPROP_FALSE;
        if (SetupDiSetDevicePropertyW(deviceInfoSet, &spDevinfoData, &DEVPKEY_Device_SafeRemovalRequiredOverride, dataType, buffer, 1, 0)) {
            std::cout << ": Override set";
        } else {
            std::cout << ": Override not set (" << GetLastError() << ")";
        }

        std::cout << std::endl;

        ++deviceInfoIndex;
    }

    SetupDiDestroyDeviceInfoList(deviceInfoSet);

    return 0;
}

Main part here is to call SetupDiSetDevicePropertyW(...) for key DEVPKEY_Device_SafeRemovalRequiredOverride to set it to boolean value DEVPROP_FALSE (#link to Microsoft docs#)

Windows API call (on Win10) accesses registry with path inside HKLM\System\CurrentControlSet\Enum\USB\VID_0C70&PID_F00E&MI_00\7&1ed3d17c&0&0000\Properties which is not accessible by regedit (permissions denied).

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »AterIgnis« (9. März 2023, 00:34)