DirectX 12 device suspended immediately after creation
<p>I am getting a strange error when creating the DirectX 12 command queue.
Other DX12 applications are able to launch successfully on the same machine.</p>

<p>My computer uses the <code>D3D_FEATURE_LEVEL_11_0</code> <code>if</code> block.
The graphics card used for testing is NVIDIA GT 740, with 361.75 drivers</p>

<p>This is the code in use (minimized):</p>

<pre><code>#include &lt;Windows.h&gt;
#include &lt;d3d12.h&gt;
#include &lt;dxgi1_4.h&gt;
#include &lt;comdef.h&gt;
#include &lt;D3d12sdklayers.h&gt;
#include &lt;string&gt;

#pragma comment(lib,"d3d12.lib")
#pragma comment(lib,"dxgi.lib")
#pragma comment(lib,"d3dcompiler.lib")
using namespace std;

LRESULT WINAPI WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
    switch (msg)
    {
    case WM_DESTROY:
        PostQuitMessage(0);
        return 0;
    default:
        return DefWindowProc(hwnd, msg, wParam, lParam);
    }
}
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPTSTR lpCmdLine, int nCmdShow) {
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(nCmdShow);
    UNREFERENCED_PARAMETER(lpCmdLine);

    wchar_t* WindowClass = L"Papergate";
    WNDCLASSEX wc;
    ZeroMemory(&amp;wc, sizeof(WNDCLASSEX));

    wc.cbSize = sizeof(WNDCLASSEX);
    wc.style = CS_HREDRAW | CS_VREDRAW;
    wc.lpfnWndProc = WndProc;
    wc.hInstance = hInstance;
    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 2);
    wc.lpszClassName = WindowClass;

    if (!RegisterClassEx(&amp;wc))
    {
        return 1;
    }

    HWND hwnd = CreateWindowEx(NULL, wc.lpszClassName, WindowClass,
        WS_OVERLAPPEDWINDOW,
        CW_USEDEFAULT, CW_USEDEFAULT,
        CW_USEDEFAULT, CW_USEDEFAULT,
        NULL, NULL, hInstance, NULL);

    if (!hwnd)
    {
        UnregisterClass(WindowClass, hInstance);
        return 1;
    }
    ShowWindow(hwnd, SW_SHOWDEFAULT);
    UpdateWindow(hwnd);

    ID3D12Device* device;
    HRESULT result = D3D12CreateDevice(NULL, D3D_FEATURE_LEVEL_12_1,
        __uuidof(ID3D12Device), (void**)&amp;device);
    if (FAILED(result))
    {
        result = D3D12CreateDevice(NULL, D3D_FEATURE_LEVEL_12_0,
            __uuidof(ID3D12Device), (void**)&amp;device);
        if (FAILED(result))
        {
            result = D3D12CreateDevice(NULL, D3D_FEATURE_LEVEL_11_0,
                __uuidof(ID3D12Device), (void**)&amp;device);
            if (FAILED(result)) {
                _com_error error(result);
                MessageBox(hwnd, error.ErrorMessage(),
                    (wstring(L"Error: ") + to_wstring(__LINE__)).c_str(),
                    MB_OK);
                return 2;
            }
        }
    }

    ID3D12Debug* debugInterface;
    if (SUCCEEDED(D3D12GetDebugInterface(IID_PPV_ARGS(&amp;debugInterface))))
    {
        debugInterface-&gt;EnableDebugLayer();
    }

    D3D12_COMMAND_QUEUE_DESC commandQueueDesc;
    commandQueueDesc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
    commandQueueDesc.NodeMask = 0;
    commandQueueDesc.Priority = D3D12_COMMAND_QUEUE_PRIORITY_NORMAL;
    commandQueueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT;
    ID3D12CommandQueue* commandQueue;
    result = device-&gt;CreateCommandQueue(&amp;commandQueueDesc, __uuidof(ID3D12CommandQueue), (void**)&amp;commandQueue);
    if (FAILED(result)) {
        _com_error error(result);
        MessageBox(hwnd, error.ErrorMessage(),
            (wstring(L"Error: ") + to_wstring(__LINE__)).c_str(), MB_OK);
        result = device-&gt;GetDeviceRemovedReason();
        error = _com_error(result);
        MessageBox(hwnd, error.ErrorMessage(),
            (wstring(L"Error: ") + to_wstring(__LINE__)).c_str(), MB_OK);
        debugInterface-&gt;Release(); device-&gt;Release(); return 2;
    }

    MSG msg;
    ZeroMemory(&amp;msg, sizeof(MSG));
    while (GetMessage(&amp;msg, NULL, 0, 0) &amp;&amp; msg.message != WM_QUIT)
    {
        TranslateMessage(&amp;msg);
        DispatchMessage(&amp;msg);
    }

    commandQueue-&gt;Release();
    device-&gt;Release();
    UnregisterClass(WindowClass, hInstance);
    return 0;
}
</code></pre>

<p>I am getting the following errors on lines 97 and 102, respectively:</p>

<pre><code>The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
</code></pre>

<p>Second error:</p>

<pre><code>The GPU will not respond to more commands, most likely because some other application submitted invalid commands.
The calling application should re-create the device and continue.
</code></pre>