Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jan 2019 07:55:06 +0100
From:      Polytropon <freebsd@edvax.de>
To:        "Kurt Buff - GSEC, GCIH" <kurt.buff@gmail.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Video resolution in a VM
Message-ID:  <20190103075506.1b053767.freebsd@edvax.de>
In-Reply-To: <CADy1Ce44Br3yjwUgN64foqL6GtJ_TUSxHJHCnO-77a19BKuJxQ@mail.gmail.com>
References:  <CADy1Ce5TbBGEJMTk%2Biorq5mdsc8UnU0KT8XwUwUcudD2Vfqm_g@mail.gmail.com> <20190102221306.1bbd6c85.freebsd@edvax.de> <CADy1Ce44Br3yjwUgN64foqL6GtJ_TUSxHJHCnO-77a19BKuJxQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190103075506.1b053767.freebsd>