Video resolution in a VM

1 view
Skip to first unread message

Kurt Buff - GSEC, GCIH

unread,
Jan 1, 2019, 8:06:38 PM1/1/19
to freebsd-...@freebsd.org
All,

I'm not able to get display resolution greater than 1280x720 - I'd
really like to get it to 1920x1080, to match the laptop capabilities.

I'm running FreeBSD 11.2-RELEASE-p4 in a VM on VMware Workstation Pro
14.1.3. The host is Win10 Enterprise 1803, on a Lenovo T470p with 32gb
of RAM and a quad core 2.8GHz i7-7700HQ processor.

I've assigned the VM 100gb of disk, 2 procs (1x2 cores) and 8gb of RAM.

Ports are all up to date.

FreeBSD is running xfce4 for my desktop, and I've installed
open-vm-tools, and it launches at boot.

The laptop shows two video displays in hdwwiz.cpl in Windows:
Intel HD Graphics 630
NVIDIA GeForce 940MX
but it looks as if the NVIDIA isn't active. Don't know why that is.

When I run xvinfo, it shows no display available.

For "display", pciconf says:
vgapci0@pci0:0:15:0: class=0x030000 card=0x040515ad
chip=0x040515ad rev=0x00 hdr=0x00
vendor = 'VMware'
device = 'SVGA II Adapter'
class = display
subclass = VGA

The .vmx files shows the following for the display:
vmotion.checkpointSVGAPrimarySize = "8323072"
svga.maxHeight = "1080"
svga.maxWidth = "1920"
svga.autodetect = "FALSE"
svga.vramSize = "8323072"

Any thoughts would be appreciated.

Thanks,

Kurt
_______________________________________________
freebsd-...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"

Polytropon

unread,
Jan 2, 2019, 4:15:57 PM1/2/19
to Kurt Buff - GSEC, GCIH, freebsd-...@freebsd.org
On Tue, 1 Jan 2019 17:05:09 -0800, Kurt Buff - GSEC, GCIH wrote:
> I'm not able to get display resolution greater than 1280x720 - I'd
> really like to get it to 1920x1080, to match the laptop capabilities.
>
> [...]
>
> The laptop shows two video displays in hdwwiz.cpl in Windows:
> Intel HD Graphics 630
> NVIDIA GeForce 940MX
> but it looks as if the NVIDIA isn't active. Don't know why that is.
>
> When I run xvinfo, it shows no display available.
>
> For "display", pciconf says:
> vgapci0@pci0:0:15:0: class=0x030000 card=0x040515ad
> chip=0x040515ad rev=0x00 hdr=0x00
> vendor = 'VMware'
> device = 'SVGA II Adapter'
> class = display
> subclass = VGA
>
> The .vmx files shows the following for the display:
> vmotion.checkpointSVGAPrimarySize = "8323072"
> svga.maxHeight = "1080"
> svga.maxWidth = "1920"
> svga.autodetect = "FALSE"
> svga.vramSize = "8323072"
>
> Any thoughts would be appreciated.

There are several things you can try:

First of all, it seems that VMware does not properly "represent"
the existing hardware to your FreeBSD VM instance, so you only
seem to get the generic "SVGA card". Also, have you thought
about increasing the VRAM size? You can never have enough
of VRAM. :-)

Try using xrandr to set the screen size from insie the VM.
A command line

xrandr --size 1920x1080

should work.

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

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"... ;-)




--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

Kurt Buff - GSEC, GCIH

unread,
Jan 3, 2019, 1:40:19 AM1/3/19
to Polytropon, freebsd-...@freebsd.org
I'll have to look that up.

> 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"

> 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


> 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.

Kurt

Polytropon

unread,
Jan 3, 2019, 1:56:48 AM1/3/19
to Kurt Buff - GSEC, GCIH, freebsd-...@freebsd.org
On Wed, 2 Jan 2019 22:38:33 -0800, Kurt Buff - GSEC, GCIH wrote:
> On Wed, Jan 2, 2019 at 1:13 PM Polytropon <fre...@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, ...
Reply all
Reply to author
Forward
0 new messages