Unable to Change Resolution of Ubuntu 22.04 on Windows 11 (Hyper-V): A Comprehensive Guide
This article will help you if you are facing an issue where you're unable to change the screen resolution after installing Ubuntu 22.04 LTS on your Windows 11 Hyper-V environment, even after enabling Enhanced sessions.
Background
The Hyper-V integration services package that comes with Ubuntu 22.04 LTS (and other Linux distributions) has a Virtual Machine Additions (VMA) component that helps with seamless integration. However, sometimes, changing the display resolution is not possible, making your Ubuntu VM's guest display unusable when the default resolution is not ideal or when docked monitors have different resolutions.
Finding the Root Cause of the Issue
When encountering this resolution problem, it is worth investigating whether the Virtual Machine Additions components are correctly installed and functioning. This version of Ubuntu 22.04 LTS provides an updated set of integration services.
Confirming Hyper-V Integration Services Status
To find out if the Virtual Machine Additions are up-to-date in the Ubuntu environment, perform the following command:
sudo apt list --upgradable | grep hyperv
If you see hyperv-daemons in the list and its status says 'upgradable,' you can run an upgrade:
sudo apt upgrade hyperv-daemons
Installing Virtual Guest Tools Manually
If upgrading the Virtual Machine Additions does not resolve the issue, you can try installing the Virtual Guest Tools manually, since the Quick Create function of Hyper-V may not do it perfectly or entirely. Perform these commands:
sudo apt update
sudo apt install linux-tools-virtual-guest-utils-dkms
After performing the installation of Linux Tools, reboot the Ubuntu 22.04 LTS VM.
Ensure Guest Display Compatibility
If the issue still persists, ensure that your hardware and Hyper-V settings are compatible with the guest display features you wish to access:
- Verify your Graphics Adapter is Gen-1 or Gen-2
- Enable 3D graphics acceleration
- Check motherboard and processor virtualization settings for compatibility
In this article, we have covered possible solutions to help you fix the issue related to changing the resolution when running Ubuntu 22.04 LTS on a Windows 11 Hyper-V environment:
- Confirming Hyper-V Integration Services status and performing necessary upgrades
- Installing Virtual Guest Tools manually
- Verifying display compatibility and enabling required functionalities
References
Take a look at these resources below for more information:
- Supported Linux Guest Operating Systems (Microsoft)
- Hyper-V on Ubuntu (Ubuntu Wiki)
- Linux VM Tools on GitHub (Microsoft)