hyper-v How to set Console resolution on Hyper-V

Greetings everyone!

Hi I installed FreeBSD as an guest on Hyper-V. I am a total newbie to unix like operating systems and I need some help to set the console resolution to 1920x1080, which currently looks like this *attached screenshot*.

Currently doesn't have any graphic server like Xorg/wayland installed, I just want to set the console resolution first.
Tried this method but didn't work.

Thanks.


It's a gen2 VM, UEFI boot type.
1705446262712.png
 
This method is for sc(4) console. Try to set in /boot/loader.conf and reboot:
Code:
kern.vt.fb.default_mode="1920x1080"
See vt(4) for details.
 
This method is for sc(4) console.
See vt(4) for details.
Contradictio in terminis. Contradiction in terminal too 😁

As this is UEFI booted, you might want to try in /boot/loader.conf
Code:
efi_max_resolution="1920x1080"

Code:
           efi_max_resolution

           vbe_max_resolution
                     Specify the maximum desired resolution for the EFI or VBE
                     framebuffer console.  The following values are accepted:

                     Value           Resolution
                     480p            640x480
                     720p            1280x720
                     1080p           1920x1080
                     2160p           3840x2160
                     4k              3840x2160
                     5k              5120x2880
                     WidthxHeight    WidthxHeight
See loader.conf(5).
 
You can't at the moment, I have this WIP that would allow you to if you are up to patching the source and building the module: https://reviews.freebsd.org/D39395

(No progress in there as I really think this should be a DRM module instead, but I got lost in porting all the needed dependencies.)
 
This method is for sc(4) console. Try to set in /boot/loader.conf and reboot:
Code:
kern.vt.fb.default_mode="1920x1080"
See vt(4) for details.
Contradictio in terminis. Contradiction in terminal too 😁

As this is UEFI booted, you might want to try in /boot/loader.conf
Code:
efi_max_resolution="1920x1080"

Code:
           efi_max_resolution

           vbe_max_resolution
                     Specify the maximum desired resolution for the EFI or VBE
                     framebuffer console.  The following values are accepted:

                     Value           Resolution
                     480p            640x480
                     720p            1280x720
                     1080p           1920x1080
                     2160p           3840x2160
                     4k              3840x2160
                     5k              5120x2880
                     WidthxHeight    WidthxHeight
See loader.conf(5).
tried both solutions , none of them worked :(
 
You can't at the moment, I have this WIP that would allow you to if you are up to patching the source and building the module: https://reviews.freebsd.org/D39395

(No progress in there as I really think this should be a DRM module instead, but I got lost in porting all the needed dependencies.)
I can't? but when i dual boot in uefi mode , it automatically runs on 1920x1080 mode , what about that
 
I can't? but when i dual boot in uefi mode , it automatically runs on 1920x1080 mode , what about that
You mean on bare metal? these are 2 completely different devices, hyper-v framebuffer with the default efi console driver can only use 1024x768.
 
You mean on bare metal? these are 2 completely different devices, hyper-v framebuffer with the default efi console driver can only use 1024x768.
oh, so bad service by microsoft. i think i have to install linux now :( , i really liked the BSD
 
Contradictio in terminis. Contradiction in terminal too 😁

As this is UEFI booted, you might want to try in /boot/loader.conf
Code:
efi_max_resolution="1920x1080"

Code:
           efi_max_resolution

           vbe_max_resolution
                     Specify the maximum desired resolution for the EFI or VBE
                     framebuffer console.  The following values are accepted:

                     Value           Resolution
                     480p            640x480
                     720p            1280x720
                     1080p           1920x1080
                     2160p           3840x2160
                     4k              3840x2160
                     5k              5120x2880
                     WidthxHeight    WidthxHeight
See loader.conf(5).

what if it was BIOS with gen 1 type , was there any possibility?
 
Hello,

I was a similar situation as yours and was able to make it work at the console level. Not sure if I needed the custom kernel or not though for that step. But it was needed for Xorg for sure.

Check my post history to find the thread.
Edit: see here https://forums.freebsd.org/threads/hyper-v-video-card-correct-use-with-etc-rc-conf.87793/post-651563

For now I can only use 1920x1080 but you currently have the same limitation with Linux on Hyper-V so you can stay with us if you'd like. :)

I also have an issue with the mouse but that might ne specific to my config.

Anyway, console works in whatever resolution I want. Just set the efi_max_resolution in loader.conf and use powershell on the host to Set-VMVideo -Single and it should work.
 
Hello,

I was a similar situation as yours and was able to make it work at the console level. Not sure if I needed the custom kernel or not though for that step. But it was needed for Xorg for sure.

Check my post history to find the thread.
Edit: see here https://forums.freebsd.org/threads/hyper-v-video-card-correct-use-with-etc-rc-conf.87793/post-651563

For now I can only use 1920x1080 but you currently have the same limitation with Linux on Hyper-V so you can stay with us if you'd like. :)

I also have an issue with the mouse but that might ne specific to my config.

Anyway, console works in whatever resolution I want. Just set the efi_max_resolution in loader.conf and use powershell on the host to Set-VMVideo -Single and it should work.
Thanks ,


but it's no use for me right now , since i installed FreeBSD as guest on linux after i got zero help to fix it from anyone for 4 months on windows , maybe in future if i had to use FreeBSD on windows i will use your solution.
 
DaLynX i have a question though , how do you post output from a command on forums like this you did 🍏

And after you got output from a command , how did you transfer it to your windows machine ?
 

Attachments

  • output.jpg
    output.jpg
    43.2 KB · Views: 15
Haha! I was struggling for a solution in the beginning just like you, then I thought of ssh!

So I'm just connecting to the Freebsd machine from a Windows one (Windows has a built-in ssh client since a few years ago so you don't even need to download one).

Sorry to hear the solution came too late. At least you still got to use FreeBSD so that's not a total loss.
 
DaLynX oh thanks, yeah i also had a slight idea of doing it with ssh /

btw i installed FreeBSD to learn how unix console works how configuration works , i learned so much.

what do you use it for? if i may ask.
 
Back
Top