waydabber / BetterDisplay

Unlock your displays on your Mac! Flexible HiDPI scaling, XDR/HDR extra brightness, virtual screens, DDC control, extra dimming, PIP/streaming, EDID override and lots more!
https://betterdisplay.pro
20.9k stars 366 forks source link

BetterDisplay 1.4.8 is not working in macOS Mojave & Big Sur virtual machines #1744

Closed bananakid closed 1 year ago

bananakid commented 1 year ago

BetterDisplay 1.4.8 is not working in macOS Mojave 10.14.6 and macOS Big Sur 11.6.1 guests OS in VMware Workstation Pro 16.

Virtual machine guest operating system display resolution is 3072×1920 (matches host laptop's native display resolution).

The setup was done as described in this article — https://www.macworld.com/article/549493/how-to-m1-mac-1440p-display-hidpi-retina-scaling.html The problem is simply nothing happens when HiDPI is selected for Dummy display. Regular resolution of Dummy displayed can be anything I like. No HiDPI option in System Preferences as well, only regular resolutions are in Scaled list.

Virtual display uses generic Apple display PLIST (DisplayVendorID-756e6b6e\DisplayProductID-717). SIP is turned off for virtual machine. Terminal command sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true executed and virtual machine rebooted. Once the resolution of virtual display is set to 3840×2160, the HiDPI option of 1920×1080 appears in System Preferences > Display > Scaled. The save VMware Tools display driver provides any HiDPI resolutions in macOS High Sierra without any Terminal commands and with SIP enabled.

waydabber commented 1 year ago

Did earlier versions work (for Big Sur)? Is this Intel, right? Can you show me what do you see under the Set Resolution submenu?

bananakid commented 1 year ago

Thank you for response! It looks like this issue is related to virtual machine configuration, not to the software. I will leave some explanation and a fix that I accidentally figured out for anyone who comes across similar issue. This Issue may be closed or used as a FAQ answer in the future.

The HiDPI scaling options appear for any resolution in case macOS Big Sur virtual machine has been created in VMware Fusion in macOS. In case macOS Big Sur virtual machine has been created in VMware Workstation Pro 16/17 + Unlocker there will be no HiDPI scaling options no matter what you do (including editing display's PLIST). To use macOS virtual machine with scaled resolutions you can create virtual machine in VMware Fusion and then use it in VMware Workstation Pro or Player. Another way is to edit the following VMX file code according to your file locations of virtual disk images, for some reason it makes HiDPI scaling options to appear in virtual machine (just replace all macOS Big Sur with your file names or just create a new VM with this name and swap VMX contents once you done installing):

.encoding = "windows-1251"
config.version = "8"
virtualHW.version = "14"
pciBridge0.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "TRUE"
hpet0.present = "TRUE"
nvram = "macOS Big Sur.nvram"
virtualHW.productCompatibility = "hosted"
powerType.powerOff = "soft"
powerType.powerOn = "soft"
powerType.suspend = "soft"
powerType.reset = "soft"
displayName = "macOS Big Sur"
usb.vbluetooth.startConnected = "TRUE"
smc.present = "TRUE"
smc.version = "0"
firmware = "efi"
guestOS = "darwin17-64"
ich7m.present = "TRUE"
tools.syncTime = "FALSE"
sound.autoDetect = "TRUE"
sound.virtualDev = "hdaudio"
sound.fileName = "-1"
sound.present = "TRUE"
numvcpus = "8"
cpuid.coresPerSocket = "8"
memsize = "4096"
sata0.present = "TRUE"
sata0:0.fileName = "macOS Big Sur.vmdk"
sata0:0.present = "TRUE"
sata0:1.deviceType = "cdrom-image"
sata0:1.fileName = ""
sata0:1.present = "TRUE"
usb.present = "TRUE"
ehci.present = "TRUE"
usb_xhci.present = "TRUE"
svga.vramSize = "268435456"
extendedConfigFile = "macOS macOS Big Sur.vmxf"
floppy0.present = "FALSE"
tools.upgrade.policy = "useGlobal"
numa.autosize.cookie = "80001"
numa.autosize.vcpu.maxPerVirtualNode = "8"
uuid.bios = "56 4d e1 8e 88 9a 07 ce-90 be 7f 7d fa c7 03 02"
uuid.location = "56 4d e0 8a f6 8a 28 dd-55 bd c3 24 ab 38 6b 51"
sata0:0.redo = ""
pciBridge0.pciSlotNumber = "17"
pciBridge4.pciSlotNumber = "21"
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
usb.pciSlotNumber = "32"
sound.pciSlotNumber = "33"
ehci.pciSlotNumber = "34"
usb_xhci.pciSlotNumber = "160"
vmci0.pciSlotNumber = "35"
sata0.pciSlotNumber = "36"
ehci:0.parent = "-1"
ehci:0.port = "0"
ehci:0.deviceType = "video"
mks.enable3d = "TRUE"
svga.graphicsMemoryKB = "1048576"
gui.fitGuestUsingNativeDisplayResolution = "TRUE"
vmci0.id = "-87620862"
monitor.phys_bits_used = "43"
cleanShutdown = "TRUE"
softPowerOff = "TRUE"
usb_xhci:6.speed = "2"
usb_xhci:6.present = "TRUE"
usb_xhci:6.deviceType = "hub"
usb_xhci:6.port = "6"
usb_xhci:6.parent = "-1"
usb_xhci:7.speed = "4"
usb_xhci:7.present = "TRUE"
usb_xhci:7.deviceType = "hub"
usb_xhci:7.port = "7"
usb_xhci:7.parent = "-1"
usb:1.speed = "2"
usb:1.present = "TRUE"
usb:1.deviceType = "hub"
usb:1.port = "1"
usb:1.parent = "-1"
toolsInstallManager.updateCounter = "8"
guestOS.detailed.data = "architecture='X86' bitness='64' buildNumber='20G224' distroName='macOS' distroVersion='11.6.1' familyName='Darwin' kernelVersion='20.6.0'"
vmotion.checkpointFBSize = "134217728"
vmotion.checkpointSVGAPrimarySize = "268435456"
usb_xhci:4.present = "TRUE"
usb_xhci:4.deviceType = "hid"
usb_xhci:4.port = "4"
usb_xhci:4.parent = "-1"

It's a quick and dirty fix that contains extra settings (i.e. 8 CPU cores and 4096 MB RAM, etc.), I may or may not provide exact lines that should be altered in any template in the future. Feel free to post that as a response if you find out! Finally, there're some templates included with the Unlocker 4.2.5 but I haven't tested them, maybe they can handle HiDPI as well (templates were removed from the latest 4.2.6 release so maybe there're some issues with them).

waydabber commented 1 year ago

Thanks for the info! I'll convert it to a Q&A item for future reference!