29

I just started experimenting with the Hyper-V of Windows 8 and installed Ubuntu on it. However when I launch it my screen resolution is small.

How can I scale Ubuntu to the resolution of my screen?

0

6 Answers 6

0

Install the Hyper-V Integration Services. This provides better display/input/network integration between the guest and host.

3
  • 2
    This want help change the screen resolution of Hyper-V.
    – Devid
    Jul 11, 2014 at 20:43
  • 4
    The link doesn't work any more, I got: We're sorry, this download is no longer available.
    – GoYun.Info
    Dec 20, 2018 at 18:45
  • this answer is very outdated. Devid's answer below should be the accepted one. Feb 28, 2022 at 10:02
36

Here is how you can change the resolution of Ubuntu (Linux) running in Hyper-V:

  • Install linux-image-extras (hyperv-drivers): sudo apt-get install linux-image-extra-virtual
  • Open the Terminal and type: sudo gedit /etc/default/grub
  • Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT, and add video=hyperv_fb:1920x1080 (or your preferred resolution) in between the quotes (The maximum possible resolution is 1920x1080) like this: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080"
  • Save and Exit
  • Run sudo update-grub
  • Restart Hyper-V (restarting Ubuntu (Linux) might be enough)


Increased display size of Hyper-V to 1680x1050. My Windows 8 display resolution is 1920x1200:

13
  • 1
    Worked for me on my Win 8.1 host and Ubuntu 14.04 guest.
    – Gus
    Oct 8, 2014 at 3:41
  • Did not work for me using Windows 8.1 host and Ubuntu 14.04 LTS. Nov 6, 2014 at 4:37
  • When using 1920x1080 resolution it work but didn't work with 1920x1200. Nov 6, 2014 at 4:57
  • 1
    Know i shouldn't use this for "thank yous", but this is the best description on the internet! Dec 9, 2015 at 22:13
  • 1
    Worked well on Thinkpad X1 with Windows 10, and Ubuntu LTS 14.04 inside Hyper-V. Resolution is 1920x1080
    – mattias
    Feb 28, 2016 at 8:19
5

In the latest release of Ubuntu, the Hyper-V Integration Services are built into the kernel and won't help. Unfortunately even with windows, hyper-v won't display a larger resolution when accessing it through the virtual machine manager.

Try accessing it through VNC, you will be able to get a better resolution that way.

2
  • 1
    There is a way to change the screen resolution, just check my answer. VNC and RDP will display in Full Screen but the performance is not good.
    – Devid
    Jul 11, 2014 at 20:44
  • 3
    Can you specify How to access it? May 23, 2016 at 13:26
3

I know this thread is old, but if it answers the question for others.

sudo nano /etc/default/grub

find:

GRUB_CMDLINE_LINUX_DEFAULT="There is probably stuff here"

At the end add splash video=hyperv_fb:1920x1080

It should appear like

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

then run

sudo update-grub

Enable BackPorts, for Jessie.

sudo nano /etc/apt/scources.list

add

deb http://ftp.debian.org/debian jessie-backports main

sudo apt-get update

sudo apt-get -t jessie-backports install hyperv-daemons

Reboot. Hopefully you will have joy!

Scobber

5
  • 2
    You pretty much replicated Devid's answer, or do you think you added some value here?
    – zagrimsan
    Aug 4, 2017 at 7:29
  • All the solutions i had were exact to @devid. the one thing that got me over the line on a hyperv 2012 (not R2) host was the backports repository. adding that kernel param did nothing otherwise.
    – Scobber
    Aug 7, 2017 at 23:46
  • Ok, fair enough. Please edit your answer to highlight that difference and I will upvote it. (so formatting on it wouldn't hurt, either)
    – zagrimsan
    Aug 8, 2017 at 7:32
  • Super solution!
    – Faziki
    May 18, 2021 at 8:34
  • Why is 1080p the max?
    – Sephethus
    Jul 5, 2022 at 16:24
2

The following command will change the display resolution:

sudo gedit /etc/default/grub

Change the following line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

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

finally run this command:

sudo /etc/kernel/postinst.d/zz-update-grub

The above command is used, because sudo update-grup is not available anymore.

Power off the virtual machine and start it again.

The highest resolution is 1920 x 1080.

See as well

1
  • Why is 1080p the max?
    – Sephethus
    Jul 5, 2022 at 16:24
1

If your installation is using the Hyper-V DRM driver instead of hyperv_fb, the correct config should be video=Virtual-1:... instead of video=hyperv_fb:....

In doubt, you could leave both in your grub CMDLINE config: GRUB_CMDLINE_LINUX_DEFAULT="video=Virtual-1:1920x1080 video=hyperv_fb:1920x1080"

3
  • Finally Hyper-V DRM driver is working for my resolution 2240x1400. Thanks. Can you provide the documentation for the configuration video=Virtual-1:... ?
    – ws_
    Oct 16, 2023 at 7:56
  • I didn't find one at the time. I had to dig a lot to discover this. Oct 16, 2023 at 13:40
  • I've found out that 'Virtual-1' is the default display device name on xfce display setting. So maybe it's just a default name.
    – ws_
    Oct 24, 2023 at 8:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .