Java 8 Application in RDP Session Fails to Detect Monitors (Nvidia T1000 & Intel) – No Screen Devices Error

Mahesh 0 Reputation points
2025-03-06T11:55:09.2+00:00

Description:

I have a Java 8 application running inside a Remote Desktop (RDP) session on a Windows 10 machine with an Nvidia T1000 GPU. Sporadically, the application fails to detect any monitors, preventing the UI from rendering, and throws the following error:

java.awt.AWTError: No screen devices

at sun.awt.Win32GraphicsEnvironment.getDefaultScreenDevice(Win32GraphicsEnvironment.java:99) ~[?:1.8.0_45]

Observations:

The application works perfectly outside the RDP session.

The issue also occurs on Intel GPUs, but less frequently.

No monitors are detected inside the RDP session, preventing the UI from launching.

The issue is intermittent:

Relaunching the application multiple times within the same RDP session sometimes resolves the issue.

After several retries, the application eventually succeeds in detecting the monitors.

Setting -Djava.awt.headless=false does not resolve the issue.

Disabling 3D rendering in the RDP session had no effect.

Used -Dsun.java2d.d3d=false to disable Direct3D rendering.

Set -Dsun.java2d.noddraw=true to disable DirectDraw.

Questions:

Are there specific Nvidia driver settings or RDP configurations that affect Java’s ability to detect display devices?

Could this be related to Windows 10 session handling of GPU resources in RDP environments?

Has anyone encountered similar behavior with Nvidia GPUs and Java AWT on remote sessions?

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,737 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mars Shan-MSFT 235 Reputation points Microsoft External Staff
    2025-03-07T01:13:47.9566667+00:00

    Hello,

    As far as I know there aren’t any specific Nvidia driver settings known to force Java AWT to detect screens in an RDP session—instead, the issue stems from how Windows 10’s RDP environment virtualizes graphics. While updating drivers and checking RDP client settings (such as multiple monitor support or hardware acceleration options) might help a bit, the root cause is that the virtual display driver in an RDP session may not fully simulate a physical monitor.

    The behavior you describe is related to Windows 10’s handling of GPU resources in RDP sessions. When you connect via RDP, Windows provides a virtualized display environment. This sometimes leads to timing or enumeration issues where Java’s AWT cannot detect any screen devices, unlike in a local session.

    Similar occurrences have been reported by other users working with Nvidia (and Intel) GPUs in remote sessions. Many have seen intermittent “No screen devices” errors due to the virtual display environment created by RDP. Some have had success with workarounds such as using a dummy display adapter to force a recognized screen or using alternative remote access protocols (e.g., VNC) that properly initialize the display hardware.


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.