Run EC2 Windows instance with Full HD screen resolution

0

Hi all!

I use EC2 with Windows OS instance for running test automation. Instance is being started/ stopped via Jenkins plugin. The problem is that I want to run this instance with my custom screen resolution 1920*1080, instead of default one: 1024*768.

I've tried to connect via RDP and change it via "Display Settings" menu, but this option is unavailable from RDP.

I've tried to change it via PowerShell script, but still no luck:

Set-DisplayResolution -Width 1920 -Height 1080

Also, I've tried to use EC2 instances with/ without GPU:

  • g4ad.2xlarge (with GPU)
  • t3.2xlarge (without GPU)

Could someone help me to run EC2 Windows instance with FULL HD screen resolution by default?

asked 2 months ago388 views
2 Answers
1

Edit:

You need to install PowerShell module and connect to Windows console in order to use Set-DisplayResolution

Here are the commands

Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-module -name DisplaySettings  -Force
Set-DisplayResolution -Width 1920 -Height 1080 -Force
Get-DisplayResolution

Make sure to run them from a console and not RDP session. You can try running them in your EC2 user-data. Go to Display Settings, and verify that your display is Microsoft Basic Display Adapter. The below screenshot is on a t3.medium instance running Windows Server 2022.

Enter image description here

Console access was through NICE DCV. If you are installing NICE DCV manually, ensure IDD Driver option is not selected during installation. Another option is to use this Windows CloudFormation template with driverType set to none

AWS
EXPERT
Mike_L
answered 2 months ago
  • Hi Mike L Thanks for your answer!

    I'm not sure it's really what I need. As I understood, your solution requires to run the instance, then connect to it and set some params.

    I want to run EC2 Windows with FULL HD screen resolution out of the box (if it's posssible). Is it possible to configure it while creating AMI etc?

  • I have updated my post. Hope this helps!

0

Hello, Thanks for posting your query onto rePost.

Since you need resolution of 1920*1080 directly on the instance, then you will need to make use of a Windows Accelerated Computing instance type [1] such as :

Amazon EC2 P3 Instances Amazon EC2 P4 Instances Amazon EC2 G3 Instances Amazon EC2 G4 Instances Amazon EC2 G5 Instances Amazon EC2 G5g Instances or an Elastic Graphics accelerator which can only be added during the instance launch [2] as the default maximum general type Windows instances screen resolution for non GPU instances using the Microsoft basic adapter is limited to 1280x1024.

If a GPU Graphics instance is used, the following steps can be used to set the resolution to 1920 x 1080 :

  • Download and install latest driver Graphics Adapter (Depending on the instance type you select) [3]
  • Reboot after the install is successful
  • Install TightVNC [4] to test
  • Disable the Windows Firewall (for VNC) & ensure the Instance Security Group Allows Port 5900 on Inbound
  • Connect via VNC
  • Go to Display Settings and set Resolution

Additionally You can also change the resolution by making registry changes and please create a backup prior any changes on the settings of the OS in case of needing to revert :

1.Open Regedit 2.Navigate to "HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration" 3.Select the key(s) that contain SIMULATED/NOEDID and then select the child key named 00 4.Change the value PrimSurfSize.cx to the desired horizontal resolution (1920). Be sure to select 'Decimal' when changing these values. 5.Change the value PrimSurfSize.cy to the desired vertical resolution (1080). 6.Select the child key of 00 also named 00. 7.Change the value of ActiveSize.cx to the same horizontal resolution as before (1920). 8.Change the value of ActiveSize.cy to the same vertical resolution as before (1080). 9.Repeat above steps for any other keys containing the label SIMULATED/NOEDID.

Note: .cx references the horizontal resolution. .cy references the vertical resolution.

To verify the screen resolution after doing above you can run the below command on CMD : wmic path Win32_VideoController get CurrentHorizontalResolution,CurrentVerticalResolution

[1] Windows Accelerated Computing Instances: https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/accelerated-computing-instances.html
[2] How do I attach and use an Elastic Graphics accelerator when I launch an Amazon EC2 Windows instance? https://aws.amazon.com/premiumsupport/knowledge-center/elastic-gpu-ec2-windows/
[3] Install NVIDIA drivers on Windows instances https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/install-nvidia-driver.html
[4] TightVNC https://www.tightvnc.com/download.php

AWS
SUPPORT ENGINEER
answered 2 months ago
  • Hi Nikhil T Thanks a lot for your detailed answer!

    As you mentioned: "The default maximum general type Windows instances screen resolution for non GPU instances using the Microsoft basic adapter is limited to 1280x1024."

    What is the way to start Windows EC2 instance with such screen resolution (1280x1024), instead of default one (1024x768) using non-GPU instance type? I think it will be OK for me, if it's possible to configure. Thanks!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions