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: 23
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.
 
A few years back I only knew debian and ubuntu. I was running one of them on a VPS, and some day I somehow broke my packages installation with apt or aptitude. It was a huge mess. I could not upgrade any packages anymore or the package manager would try to remove other packages (like mysqld...) without installing another version.

I gave up on that and looked for other options. I had heard of freebsd, and I fell in love with the Handbook and the /etc/rc.conf file, mostly. Also no ip nonsense, I could still use ifconfig like I was used to.

Now I have 3 machines, basically:
  • a virtual machine on an hypervisor I share with friends that hosts some shared services in jails (nginx reverse-proxy, wireguard vpn, postfix mail server, gitea repository, mediawiki wiki),
  • a personal vm on that same server where I host, also through jails, different services, like a bittorrent client and a webmail,
  • a desktop vm on a laptop running Windows 11 with Hyper-V as a host just to play around, maybe do some toy dev / learning in rust or python every now and then.
I am still mostly a beginner but I feel like things are easier to find in freebsd. They are where I expect them to be, usually. Or in a place that seems to make sense. Which is often not the case for other distros.

I recently tried to install arch and was shocked there was no wizard like the one in freebsd, I thought that was standard everywhere now. And then I hate the pacman syntax as well. Why do something totally different from everything we know? pkg syntax is quite similar to other package managers like pip or scoop which I use on Windows. That's the kind of things that keeps me with freebsd.

And it comes with lots of cool stuff like ZFS (although, as I said, I still re-discover it every time I have to do something), jails (same, especially since jail managers come and go so fast and I still have to learn to do things without them...), or bhyve (which I do not really use yet but would love to).
 
DaLynX , HAHAHA i truly feel you on this one .



I really love FreeBSD and its community. Among all the Linux distros I've tried, only FreeBSD has truly taught me the essence of Unix, its workings, and how to configure it effectively.

- **FreeBSD stands out:** It provides a genuine Unix experience, unlike other Linux distributions.
- **Learning experience:** It has been instrumental in teaching me the fundamentals of Unix.
- **Disappointment with Linux distros:** Debian, Ubuntu, and Kali Linux felt bloated and messy, lacking the simplicity I desired.
- **Challenges with minimalistic distros:** Gentoo and Arch were daunting to install, especially as a beginner.

Subsequently, I contemplated Gentoo and Arch, seeking a minimalist approach, but found the installation process challenging as a beginner. Despite FreeBSD's limited hardware support, I'm drawn to its simplicity and authenticity. I sought a Unix-like OS to delve into hacking and console-based learning, and FreeBSD fits the needs. Additionally, it's cool to stand out by using FreeBSD in a sea of Linux users.
 
Back
Top