Video resolution in a VM
Polytropon
freebsd at edvax.de
Thu Jan 3 06:55:12 UTC 2019
On Wed, 2 Jan 2019 22:38:33 -0800, Kurt Buff - GSEC, GCIH wrote:
> On Wed, Jan 2, 2019 at 1:13 PM Polytropon <freebsd at edvax.de> wrote:
> > [...]
> > Try using xrandr to set the screen size from insie the VM.
> > A command line
> >
> > xrandr --size 1920x1080
> >
> > should work.
>
> Dang. Nope.
>
> I get the message:
> "Can't open display"
Are you issuing this command from within an X terminal
in the X session? What does
echo $DISPLAY
print?
You can also run the command "xrandr" without arguments
to get further information.
> > You can also try to use a specific X configuration fragment,
> > for example /usr/local/etc/X11/xorg.conf.d/screen-resolution.conf
> > with a content like this:
> >
> > Section "Screen"
> > Identifier "Screen0"
> > Device "Card0"
> > SubSection "Display"
> > Modes "1920x1080"
> > EndSubSection
> > EndSection
>
> No success with that just now. Also tried this, without success:
>
> Section "Screen"
> Identifier "Screen0"
> Device "Card0"
> Monitor "Monitor0"
> DefaultDepth 24
> SubSection "Display"
> Viewport 0 0
> Depth 24
> Visual "TrueColor"
> Modes "1920x1080" "1280x800"
> EndSubSection
> EndSection
There is also a setting that can be used with the section for
the monitor (in your case, the LC display):
Section "Monitor"
Identifier "Monitor1"
VendorName "Something"
ModelName "Something else"
Option "PreferredMode" "1920x1080"
Option "Position" "0 0"
EndSection
This fragment could be placed in another file residing in
/usr/local/etc/X11/xorg.conf.d/ to be read by X at startup.
Always check /var/log/Xorg.0.log for two things:
1. What graphics driver is being used?
2. Which errors "(EE)" are reported?
Maybe you can find some helpful clues there...
> > You could then experiment with the setting DisplaySize (in mm)
> > and the Option "DPI" (for example with "110 x 110"), depending
> > on the actual properties of the hardware (!) you are using.
> > A laptop display only has one sceen size and one resolution.
> > Normally, X will calculate the correct information itself,
> > which is usually obtained from the display, but this might not
> > work as intended because of the "VM mangling"... ;-)
>
> Hm. I will have to look that up as well.
>
> Thanks for the help so far.
Good luck!
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list