Few people here will be using hyper-v. We tend to use Virtualbox or KVM/QEMU or "Boxes" as our hypervisors with a few people using Xen/XCP. Anyway, inside a VM, none of your real hardware matters. In the VM settings, you'd setup which fake hardware to present to the guest VM. That includes the CPU, RAM, GPU, NIC, and storage stuff like size, controller, and bus to be used.
So, if the hypervisor settings limit the faked GPU, then the resolution will be limited to that. I don't know the options available from hyper-v - never seen it and don't use Windows as a base for virtual machines here. I typically use the VMVGA "card" for non-GUI servers and the QXL "Spice" card for desktop systems that need more RAM and faster fake GPU support. In my hypervisor, controlling the amount of video-RAM provided to the fake GPU isn't available in teh GUI, but it can be modified in the VM definition file. I know that virtualbox has a slider bar to control the fake video-RAM ... the default of 9M generally has very poor performance. By upping that to 128MB, 2D and 3D graphics acceleration can be emulated in virtualbox. Perhaps this is in hyper-V VM settings too? That's the first half of solving this problem.
The 2nd half is controlled inside the VM. Remember, inside the VM, it doesn't know that fake hardware is being provided, so drivers and settings there need to match the fake hardware. Inside Linux systems with a GUI, using X11 as the display host subsystem, the xrandr program will show all available resolutions. Just open a terminal and run that program. Then copy the output and paste is here. If using Wayland (not X11), I don't know any of the tools for controlling resolution, but the X/Windows programs don't work. xrandr can be used to set the screen resolution, but there are probably 10 other, easier, GUI, tools for this. I will usually install lxrandr which is bonehead simple with a GUI to make changing resolutions easy.
Code:
$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1200, maximum 32767 x 32767
DVI-D-0 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 59.95*+
1920x1080 60.00
1680x1050 59.95
1600x1200 60.00
1280x1024 60.02
1280x960 60.00
1024x768 60.00
800x600 60.32
640x480 59.94
HDMI-0 disconnected (normal left inverted right x axis y axis)
That's an example. Inside a VM (I use spice/qxl in my KVM VMs), ...
Code:
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192
Virtual-1 connected primary 1680x1050+0+0 0mm x 0mm
1024x768 60.00 +
2560x1600 59.99 59.97
1920x1440 60.00
1856x1392 60.00
1792x1344 60.00
2048x1152 60.00
1920x1200 59.88 59.95
1920x1080 60.00
1600x1200 60.00
1680x1050 59.95* 59.88
1400x1050 59.98 59.95
1600x900 60.00
1280x1024 60.02
1440x900 59.89 59.90
1280x960 60.00
1280x854 59.95
1366x768 59.79 60.00
1360x768 60.02
1280x800 59.81 59.91
That's the current resolution while running in a window. There is a "View" menu and inside it is a "full screen (F11)" option. After selection of "full screen" (or using F11 to toggle between window <--> full screen), I see this:
Code:
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 8192 x 8192
Virtual-1 connected primary 1920x1200+0+0 0mm x 0mm
1024x768 60.00 +
2560x1600 59.99 59.97
1920x1440 60.00
1856x1392 60.00
1792x1344 60.00
2048x1152 60.00
1920x1200 59.88* 59.95
1920x1080 60.00
1600x1200 60.00
1680x1050 59.95 59.88
1400x1050 59.98 59.95
1600x900 60.00
1280x1024 60.02
that is the native resolution for my monitor.
Newer Ubuntu systems try to default to using Wayland, but on the pre-login screen, there is a gear icon which will let you specifically choose NOT to use Wayland ... something like "Ubuntu on Xorg" is the option you want. I think 20.04 still defaults to Xorg's X11 server, so you should be fine. 21.04 and 21.10 both default to Wayland, for reference and future lurkers. X/Windows has been the GUI display system for 30+ yrs, so Wayland is new and not supported by all programs today. Some will never move to support it. Wayland breaks a number of my workflows, so I'll never use it.
So, assuming you have the hypervisor allowing plenty of RAM and have set the resolutions inside the VM to whatever the highest available is for your screen - I run at 1920x 1200.
To get better screen/mouse integration, some hypervisors require "guest tools" to be installed inside the VM. KVM/QEMU don't. Virtualbox does. I suspect hyper-v does as well. May need to check into that. https://medium.com/@labappengineerin...v-8888fe3ced64 says something about Hyper-V Linux Integration Service - this is typically used to ensure graphics and more efficient network and storage drivers are used. In the Linux terminology, we'd say "virtio" drivers.
https://github.com/microsoft/linux-vm-tools is where that guide points. In it, it says that it is archived and that wsl2 should be used instead, whatever that is. I'm not really an MS-Windows person. Sorry. I'm huge into virtualization but just have never seen hyper-v used anywhere.
https://www.serverwatch.com/guides/i...tion-services/ doesn't list Ubuntu as supported by Linux Integration Services.
Bookmarks