- Newest
- Most votes
- Most comments
For logon, you can use autologon to configure Windows to auto login to desktop on startup.
If you have not, install NVIDIA Grid (aka NVIDIA RTX Virtual Workstation) driver on your Windows 2022 EC2 instance.
Also, connect to your EC2 instance using Amazon DCV instead of RDP, as RDP uses a different display driver. You can verify from Computer Management, Device Manager, Display
You can install NVIDIA and DCV from official documentation, or refer to blog Building a high-performance Windows workstation on AWS for graphics intensive applications.
Below is a screenshot of G4dn with GRID driver installed, and DCV web browser client. It was created using CloudFormation template from GitHub repo mentioned in blog post.
The issue you're experiencing with OpenGL applications on g4dn instances is related to how Windows handles GPU resources before a user logs in. This is a common challenge when running GPU-dependent applications on remote Windows servers, especially in virtualized environments like EC2.
The behavior you've observed, where the NVIDIA Tesla T4 GPU is only available after RDP login, is due to how Windows manages display drivers and GPU resources in remote sessions. By default, Windows uses a basic display adapter until a user logs in, which can cause OpenGL-dependent applications to fail.
Your workaround of disabling the Basic Display Adapter is a valid approach to force Windows to use the NVIDIA GPU from startup. However, there are a few other potential solutions you could try:
-
Use Windows autologon: Configure Windows to automatically log in a user account at startup. This ensures that the full GPU capabilities are available immediately.
-
Install the latest NVIDIA GRID drivers: Ensure you have the most up-to-date NVIDIA GRID drivers installed, as these are optimized for virtualized GPU environments like EC2.
-
Modify Windows display settings: Adjust Windows settings to maintain a consistent resolution and display configuration, regardless of RDP connection status. This may involve registry changes or group policy adjustments.
-
Use a virtual display adapter: Install a virtual display adapter driver to create a persistent "fake" display that OpenGL can interact with, even when no user is logged in.
-
Consider using NICE DCV: AWS NICE DCV is a remote visualization technology that may provide better GPU support in headless scenarios.
If these solutions don't fully resolve the issue, you may need to explore more advanced options or consider redesigning your application deployment to work within the constraints of remote Windows server environments on EC2. It's also worth noting that the behavior you're seeing is specific to virtualized environments, which explains why you didn't encounter the same issue in your on-premises testing without a hypervisor.
Remember to test any changes thoroughly in a non-production environment before implementing them in your production setup.
Sources
Unsupported OpenGL Version on Windows EC2 2019 Base Image - Used for Medical Imaging | AWS re:Post
windows server problem | AWS re:Post
Relevant content
asked 4 years ago
asked a year ago
asked 3 years ago
