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

Allow video resolution hinting #1787

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

trams242
Copy link

@trams242 trams242 commented Nov 5, 2023

Add support for custom video resolution

Libvirt supports setting custom video resolution by setting the
resolution subelement in the model tag. This changes the preferred EDID
mode exposed to the vm.

Changing this is usefull when running GUI systems that does not provide
UI elements for changing the resolution. Examples would be cage or other
wayland compositors where initialization uses the preferred EDID mode.

Andreas Jonsson added 2 commits October 29, 2023 12:02
Libvirt supports setting custom video resolution by setting the
resolution subelement in the model tag. This changes the preferred EDID
mode exposed to the vm.

Changing this is usefull when running GUI systems that does not provide
UI elements for changing the resolution. Examples would be cage or other
wayland compositors where initialization uses the preferred EDID mode.
Copy link

github-actions bot commented Nov 5, 2023

A docker image containing the code from this plugin to allow testing locally without installing
can be pulled from: ghcr.io/vagrant-libvirt/vagrant-libvirt:pr-1787-slim

If you need the image with the full dev toolchain, you can instead pull: ghcr.io/vagrant-libvirt/vagrant-libvirt:pr-1787

@@ -194,6 +194,10 @@ end
"cirrus", "vmvga", "xen", "vbox", or "qxl".
* `video_vram` - Used by some graphics card types to vary the amount of RAM
dedicated to video. Defaults to 16384.
* `video_resolution_x` - sets the default EDID/monnitor resolution hinting for the X
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While spitting the resolution into two separate variables makes it easier in some ways, I'm not sure it's particularly consistent with how many would expect it to work with 1280x800 being a more common form. Should be possible to validate the value matches [[:digit:]]{3,}x[[:digit:]]{3,} (or similar regex) if not nil in the config class and subsequently split when specifying the individual XML elememts

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

Successfully merging this pull request may close these issues.

None yet

2 participants