Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom graphics_res= parameters for VNC #571

Open
ktaylora opened this issue Dec 10, 2024 · 2 comments
Open

Support for custom graphics_res= parameters for VNC #571

ktaylora opened this issue Dec 10, 2024 · 2 comments

Comments

@ktaylora
Copy link

This is more of a feature request than a bug. I use vm-bhyve extensively on my systems. Typically I don't use VNC when interacting with VMs, but I do on a few FreeBSD workstations where I use Ubuntu / Fedora as the guest environment for doing things that I cannot do with FreeBSD ports. I use the tigervnc viewer package from ports as a VNC client. I have an Intel Framework laptop running FreeBSD that has funky display mode settings. The resolutions supported (reported by xrandr) are:

Screen 0: minimum 320 x 200, current 2256 x 1504, maximum 16384 x 16384
eDP-1 connected primary 2256x1504+0+0 (normal left inverted right x axis y axis) 285mm x 190mm
   2256x1504     60.00*+  48.00  
   1920x1440     60.00  
   1856x1392     60.01  
   1792x1344     60.01  
   2048x1152     59.99    59.98    59.90    59.91  
   1920x1200     59.88    59.95  
   1920x1080     60.01    59.97    59.96    59.93  
   1600x1200     60.00  
   1680x1050     59.95    59.88  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1280x800      59.99    59.97    59.81    59.91  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   640x400       59.88    59.98  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  

When I connect to my running bhyve vm in fullscreen mode with tigervnc, I get annoying black boxes over portions of the screen. There is no combination of resolution parameters to resolve this, because currently the following resolutions are the only ones supported by bhyve:

# graphics_res
# This allows you to specify a resolution for the graphical console.
# Pleas note only the below options are supported
#
# Default: 800x600
# Valid Options: 1920x1200,1920x1080,1600x1200,1600x900,1280x1024,1280x720,1024x768,800x600,640x480
#
graphics_res="800x600"

Is there a way to set custom graphics_res= parameter for the VNC setup by bhve? Say to one my graphics card optimally supports, like 2256x1504?

@ktaylora
Copy link
Author

Ah, never mind. This isn't something that vm-bhyve controls. It inherits it's set of supported resolutions for UEFI from bhyve itself :

Arbitrary resolutions are not yet supported. In the meantime, available resolutions are:

(https://wiki.freebsd.org/bhyve/UEFI)

We'd presumably need to add custom resolutions to the bhyve firmware to set custom graphics_res values. :(

@GogoFC
Copy link

GogoFC commented Dec 12, 2024

If you don't like the native vm-bhyve resolution you could install KasmVNC to the Ubuntu VM you want to access.

https://github.com/kasmtech/KasmVNC

This VNC server is meant to be accessed from the Browser. It works fine unless it's GNOME that you have on Ubuntu.
Now that I think about it, I've never tried to run it without Xorg with just CLI but why would you need VNC for CLI anyway when you can SSH right? But yeah this isn't incorporated like the VNC on the host so it must be started from inside the VM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants