14

I am using Hyper-V for the first time on a Windows 10 installation where I am having some issues with screen resolution in my Ubuntu 18.04 desktop VM.

Guides propose these actions in order to configuration screen resulution for linux based VMs:

Edit grub:

sudo nano /etc/default/grub

Add video=hyperv_fb:1920x1080:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080"

Update grub:

sudo update-grub

And then reboot.

That works just fine until you want to use RemoteFX 3D Video Adapter which suddenly changes the screen resolution down to 800x600. Moving windows and browsing the web in the VM seems fine and in Hyper-v Manager under "Physical GPUs" it says "1 virtual machine are currently using this GPU".

I have seen suggestion where installing linux-image-extra-virtual package will provide a HyperV display driver but that seems to change nothing. Maybe I am missing something here?

So I am looking for input for how I can be able to use RemoteFX and have a usable resolution in my Ubuntu VM. Suggestions?

Michael
  • 892
  • 2
  • 10
  • 28
  • Same problem for me. I hope that Microsoft will add Ubuntu to the Hyper-v Gallery soon (as they promised) to solve also any problem with host-client integration (shared clipboard, drives, etc.) – diegocom May 09 '18 at 06:26
  • Maybe the [enhanced mode](https://stackoverflow.com/a/50349273/7926064) will work for you instead of `RemoveFX 3D`. – BNT May 15 '18 at 11:52
  • Same problem here too. – olleo Jul 04 '18 at 00:32
  • I don't know how or if at all the resolution setting in **/etc/default/grub** depends on the listed resolutions by **sudo hwinfo --framebuffer**. Even without the max resolution of 1920x1080 listed by **sudo hwinfo --framebuffer** I was able to configure it in **/etc/default/grub**. It's working. – Chris Oct 22 '18 at 12:32

3 Answers3

8

I was having an identical problem and solved it by doing the following:

  1. Added RemoteFX 3D Video Adapter to my Ubuntu 16.04 VM in Hyper-V (performance of the VM without RemoteFX was unusable).
  2. Powered up Ubuntu VM and ran:

    sudo hwinfo --framebuffer

This returned a list of all the available screen sizes. I chose one of the sizes (1600x1024) which best suited my display.

  1. Edited the /etc/default/grub file and added the lines:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1600x1024"

    GRUB_GFXMODE=1600x1024

  2. Saved the grub file and then updated the settings by running:

    sudo update-grub

  3. Restarted the Ubuntu VM and it worked! I had a bigger screen size and the graphic performance was a lot better. My problem was that I had changed the grub file with a screen size (1366x768) that was not available in the list output from the hwinfo command. I'm assuming that when RemoteFX is used, the values used in the grub file MUST match one of the available screen sizes shown in hwinfo. When these values didn't match up, the display size shown by the VM was the smallest default size which for me was 800x600, far too small.

Neil Russell
  • 91
  • 1
  • 3
3

Ubuntu 16:

So you might not be able to get 1920x1080 but I managed to get to 1600x1200 by setting both the GRUB_CMDLINE_LINUX_DEFAULT value and GRUB_GFXMODE:

GRUB_CMDLINE_LINUX_DEFAULT="quiet video=hyperv_fb:1600x1200"
GRUB_GFXMODE=1600x1200

But it's 16bit, not 24/32. And it's still accelerated. Will update if I get more res and / or colour depth later.

The modes are limited to 4mb. Hence 16bit and no higher. To get a list of supported modes use:

hwinfo --framebuffer

Ubuntu18:

With RemoteFX:

  • 2d accelerated
  • res limited to 1024x768
  • 32bit colour depth
  • kernel param doesn't work.

Without RemoteFX:

  • No 2d acceleration
  • res selectable by kernel param: e.g. 1920x1080 works.
  • 32bit colour depth ok

On my system none of the normal commands like lspci or hwinfo return anything at all. They just exit without printing anything. Nice.

fret
  • 1,542
  • 21
  • 36
  • This seems to work for grub itself, but when linux loads, it gets stuck on 1152x864. I've tried xrandr to add a display mode, but that mode seems not to affect anything. – Kir Apr 22 '19 at 21:15
0

The right way to configure the resolution it's with the enhanced mode screen. You should select full screen.

enhanced mode screen

Maybe it is possible that you can't see that window, in that case you should follow this hyper-v guide

B--rian
  • 5,578
  • 10
  • 38
  • 89
RubenP5
  • 11
  • 4
  • Welcome to SO! Please edit your answer so that it quotes the most important steps from the source you are citing. Also: Why is the screenshot not in English on a English speaking site? – B--rian Aug 14 '19 at 09:17