change suse resolution when running in Hyper-v

How can I change the screen resolution to be larger than 1152 x 864? I am running OpenSuse 13.1 running in Hyper-v on Windows 8.1

Thanks

Anyone? Is this possible?

Try to set the “Console resolution” in YaST->System->Boot Loader->Boot Loader Options to something else than “Autodetect by Grub2”.
Depending on the graphics driver in use that might get taken over to the graphical system as well.

If that doesn’t work, you would have to configure the resolution in /etc/X11/xorg.conf or /etc/X11/xorg.conf.d/.
Or add one with “xrandr --newmode” if the driver supports it.

Generally speaking for all virtualization technologies,

Guest screen resolution and color depth options beyond default are subject to the ability of the “Guest Additions” (whatever called for that technology) installed.

So, you need to look up and install the Linux Guest Additions for Hyper-V.
Although I haven’t looked at “Linux on Hyper-V Guest Additions” for a long time, MS has never really put much effort into it so any new features have been spotty historically.

So, install and see what you get…

TSU

When changing “Console resolution” it works but then as soon as in enters X server it changes back to 1152 x 864.

codrut@linux-ctyt:~> xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1152 x 864, current 1152 x 864, maximum 1152 x 864
default connected primary 1152x864+0+0 0mm x 0mm
1152x864 0.0*

AFAIK the latest linux version already include the Hyper-V LIS (Linux Integration Services) and it seems it is included in OpenSuse 13.1 as well:

codrut@linux-ctyt:~> /sbin/lsmod | grep hv
hv_utils 14104 0
hv_netvsc 27157 0
hv_storvsc 21922 3
hv_vmbus 56397 6 hv_utils,hid_hyperv,hv_netvsc,hyperv_keyboard,hyperv_fb,hv_storvsc

codrut@linux-ctyt:~> /sbin/modinfo hv_vmbus
filename: /lib/modules/3.11.6-4-desktop/kernel/drivers/hv/hv_vmbus.ko
version: 3.1
license: GPL
srcversion: 7C8B9FBCB728E034156D1FA
alias: acpi*:VMBus:*
alias: acpi*:VMBUS:*
depends:
intree: Y
vermagic: 3.11.6-4-desktop SMP preempt mod_unload modversions

codrut@linux-ctyt:~> /sbin/lsmod | grep hyper
hid_hyperv 13059 0
hyperv_keyboard 12777 0
hyperv_fb 17299 2
hv_vmbus 56397 6 hv_utils,hid_hyperv,hv_netvsc,hyperv_keyboard,hyperv_fb,hv_storvsc

codrut@linux-ctyt:~> /sbin/modinfo hyperv_fb
filename: /lib/modules/3.11.6-4-desktop/kernel/drivers/video/hyperv_fb.ko
description: Microsoft Hyper-V Synthetic Video Frame Buffer Driver
version: 3.1
license: GPL
srcversion: 0665BA298FD9376EE165C0C
alias: vmbus:02780ada77e3ac4a8e770558eb1073f8
depends: hv_vmbus
intree: Y
vermagic: 3.11.6-4-desktop SMP preempt mod_unload modversions

But I do not know how to increase the resolution.

Okay, I did it! I have found some text in Japanese
Basically one needs to edit /boot/grub2/grub.cfg and add video=hyperv_fb:1920x1080 to the end of GRUB_CMDLINE_LINUX_DEFAULT inside the quotes and then run /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg

Voila!

Cool,
Although I’m pretty sure all you’ve configured is the screen resolution during bootup prior to when the Desktop loads. Approximately when the Desktop loads, the main openSUSE video driver should then load.

TSU

I could not find the keyword GRUB_CMDLINE_LINUX_DEFAULT anywhere in /boot/grub2/grub.cfg.

I did a search on “video=” to see what existing options there are. “video=” does not exist either.

Bumped.

Screen resolution and full-screen scaling working beautifully in VMWare Workstation but not in Microsoft’s Hyper-V, and this is very disappointing.

There is no GRUB_CMDLINE_LINUX_DEFAULT in /boot/grub2/grub.cfg, it is in /etc/default/grub.
Edit that and run “sudo grub2-mkconfig -o /boot/grub2/grub.cfg” to re-create grub.cfg.

Or just use YaST->System->Boot Loader->Boot Loader Options.

You can edit /boot/grub2/grub.cfg directly, you have to append your parameters to the line starting with “linux” then for the corresponding menu entry. But your changes will be lost sooner or later.
You can also press ‘e’ at the boot menu to edit the entry directly, then press ‘F10’ to boot. In this case nothing will be saved though.

Perhaps I had not explained correctly. You need to add:

video=hyperv_fb:1920x1080 (or whatever the resolution, maximum 1920x1080)

as an option for the kernel. Hyper-V support is build into newer Linux kernels.

I did this successfully on OpenSuse and other Linux distributions.

Hyper-V is ideally used by connecting through the Remote Desktop Connection to the virtual OS. You can do this in Linux as well, you need to install the xrdp package, I don’t know the specifics for OpenSuse.

Best Regards,
Codrut

Thank you, that did the trick.

I have set my resolution to 1920x1200 and I can see my whole desktop in Full-Screen mode. Would you by any chance know how to get the resolution to auto-scale when I exit the full screen? VMWare can do that automatically.