Increase maximum screen resolution on Haiku on VMware Fusion for Mac

Hi! In the months I have been using Parallels on macOS to run Haiku on a 16-inch MacBook Pro. Now I am considering giving a shot to VMware Fusion as a possible alternative to Parallels, so I tried the latest version of WMware Fusion 12. I managed to get a slightly better performance on Linux, by allocation more cores and wanted to check how Haiku would perform, before I make my mind.

Both Parallels and VMware Fusion seem to be good options, but I am intrigued with the fact that I have not been able to set native screen resolution on Haiku when using VMware Fusion. In parallels, I had no problem, but VMF seems just to allow up to 2048x1536 (32bit).

Any hope to get the full 3072x1920 resolution on VMware Fusion?

P.S.: I forgot to add that I have installed the vmware_addons package from HaikuDepot.

1 Like

I haven’t used Fusion, so this is just a guess. If, in the virtual machine settings under “Display”, it has an option to scale based on the host computer settings and it’s turned on, try turning it off.

VMware Workstation has that option for Windows, and if scaling is turned on in Windows, it can cause problems in the virtual machine display (sort of; it’s more how a lot of apps seem to ignore or have problems with anything that isn’t 100% scaling).

Or, if you have scaling turned on in macOS, try turning that off and see if it changes anything.

Well, I have tried basically all display settings available on the VM configuration. What happens is that Haiku does not present higher resolution modes (probably because it’s not receiving that information, I guess). But in Parallels I am able to get full resolution.

Is there a way to manually specify additional modes, or the boot mode, by editing some configuration file? I have a vague idea of having done something similar some years ago for VirtualBox, but could be wrong.

Why not install Haiku natively? I have MacBookPro 11.3 (mid 2014), and Haiku is installed to 100Gb partition. You can add rEFInd to boot in case the native bootloader fails (about 1/3 times). Audio works (headphones only, after warm reboot from OSX), video is framebuffer at 2880x1800, Marvel 570 wired networking works, xhci for USB3 works, trackpad is very good. You do miss out on Broadcom 4360 wifi only.

1 Like

There is a file you can edit in Haiku to change the resolution even though your desired resolution is not presented. This opens up the ability to use some special resolutions that would not normally be presented in a control panel.

I run my Haiku in a VM and it uses up all my available screen except for the Windows Taskbar. I’m using a non-standard resolution that is pretty close to HD. I forgot the exact spot to customize the resolution but if you do some searching on this forum I’m sure you can find it or perhaps someone can post what needs to be edited.

So for virtual machines, I haven’t used Parallels but VirtualBox does have display scaling options in it – that might work but idk how that’d work on your new Mac (my MBP, iMac, etc are several years old)

I did that with a 2007 15-inch Macbook Pro and it works ok, with just some hickups on boot and other minor issues. I have also tried it in a MacBook from that year, but it has no wifi, which makes it a lot harder to use (I had an ethernet crossover cable around and it does help, though). It was a fun adventure that required a lot of night hours and a pair of screwdrivers (I had no DVD drive).

But on newer Mac laptops, with T2 chip, it’s not that easy. I don’t think they can boot Haiku (I have never seen a success report using 2019 or 2020 mac laptops), and I am not ready to risk my main system in the process.

Right, I was almost sure that file existed, but I can’t recall anymore which file is it :slight_smile:

I know about VirtualBox, yes. I have used it for years, but the performance of Haiku on it is very bad, when compared to Parallels or VMware Fusion, so I would prefer one of these.

vmware_addons package contains vmware_video driver. You can try to temporarily remove vmware_addons and reboot to see if vesa driver allows you to set 3072x1920. If not, then you need to add this resolution to vmware_video:

Easiest way would be to build vmware_addons using haikuporter.

Hi! Thanks for the advice.

Disabling vmware_addons did not have any effect, unfortunately.

I tried to build it from source, but I got errors that I don’t know how to fix (maybe I am missing some dependencies?):

~/Desktop/VMwareAddons-master> make
make -C enhanced_backdoor
make[1]: Entering directory '/boot/home/Desktop/VMwareAddons-master/enhanced_backdoor'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/boot/home/Desktop/VMwareAddons-master/enhanced_backdoor'
make -C vmware_fs
make[1]: Entering directory '/boot/home/Desktop/VMwareAddons-master/vmware_fs'
g++ -c file_operations.cpp -iquote./  -iquote../shared_sources/  -iquote./  -isystem./inc  -isystem./textencoding -D_KERNEL_MODE=1 -fno-pic -O1  -Wall -Wno-multichar -Wno-ctor-dtor-privacy  -Werror -o "objects.x86_64-cc8-release/file_operations.o"
file_operations.cpp: In function 'status_t vmwfs_read(fs_volume*, fs_vnode*, void*, off_t, void*, size_t*)':
file_operations.cpp:95:98: error: no matching function for call to 'VMWSharedFolders::ReadFile(file_handle&, long unsigned int, uint8*, size_t*)'
   ret = shared_folders->ReadFile(*(file_handle*)cookie, pos + red, (uint8*)buffer + red, &to_read);
                                                                                                  ^
In file included from vmwfs.h:10,
                 from file_operations.cpp:3:
VMWSharedFolders.h:49:12: note: candidate: 'status_t VMWSharedFolders::ReadFile(file_handle, uint64, void*, uint32*)'
  status_t  ReadFile(file_handle handle, uint64 offset, void* read_buffer, uint32* read_length);
            ^~~~~~~~
VMWSharedFolders.h:49:12: note:   no known conversion for argument 4 from 'size_t*' {aka 'long unsigned int*'} to 'uint32*' {aka 'unsigned int*'}
file_operations.cpp: In function 'status_t vmwfs_write(fs_volume*, fs_vnode*, void*, off_t, const void*, size_t*)':
file_operations.cpp:115:114: error: no matching function for call to 'VMWSharedFolders::WriteFile(file_handle&, long unsigned int, const uint8*, size_t*)'
   ret = shared_folders->WriteFile(*(file_handle*)cookie, pos + written, (const uint8*)buffer + written, &to_write);
                                                                                                                  ^
In file included from vmwfs.h:10,
                 from file_operations.cpp:3:
VMWSharedFolders.h:50:12: note: candidate: 'status_t VMWSharedFolders::WriteFile(file_handle, uint64, const void*, uint32*)'
  status_t  WriteFile(file_handle handle, uint64 offset, const void* write_buffer, uint32* write_length);
            ^~~~~~~~~
VMWSharedFolders.h:50:12: note:   no known conversion for argument 4 from 'size_t*' {aka 'long unsigned int*'} to 'uint32*' {aka 'unsigned int*'}
/boot/system/develop/etc/makefile-engine:297: recipe for target 'objects.x86_64-cc8-release/file_operations.o' failed
make[1]: *** [objects.x86_64-cc8-release/file_operations.o] Error 1
make[1]: Leaving directory '/boot/home/Desktop/VMwareAddons-master/vmware_fs'
Makefile:20: recipe for target 'build' failed
make: *** [build] Error 2
~/Desktop/VMwareAddons-master> 

Also, I could’t find the definition of the display_mode type, to check what the other numbers mean.

Finaly, after building it, what it the right procedure to install?

Yes, vmware_fs build is broken on x86_64, so you can ignore that.

As i said, the easiest way would be to build vmware_addons using haikuporter:

pkgman install haikuporter
haikuporter --get
haikuporter --get-dependencies vmware_addons

Also, have you tried this? https://kb.vmware.com/s/article/1003

Yes, I did try editing the file, but saw no improvements in Haiku.

Those haiku porter commands will just build or build and also install vmware_addons?

It will grab the sources, build them and create a package. After that you can change ProposeDisplayMode.c and rebuild using

haikuporter --get-dependencies vmware_addons

I am now getting this error:

        /boot/system/packages/zstd-1.4.5-1-x86_64.hpkg
----- Package Info ----------------
header size:                     80
heap size:                     1005
TOC size:                        41
package attributes size:       1277
total size:                    1085
-----------------------------------
waiting for build package vmware_addons-1.2.0-3 to be activated
Building ...
make: Entering directory '/sources/VMwareAddons-e04e6f029fe5c80be011b9f8d1f0247578eac475/vmware_mouse'
make: Leaving directory '/sources/VMwareAddons-e04e6f029fe5c80be011b9f8d1f0247578eac475/vmware_mouse'
make: Entering directory '/sources/VMwareAddons-e04e6f029fe5c80be011b9f8d1f0247578eac475/vmware_tray'
make: Leaving directory '/sources/VMwareAddons-e04e6f029fe5c80be011b9f8d1f0247578eac475/vmware_tray'
make: Entering directory '/sources/VMwareAddons-e04e6f029fe5c80be011b9f8d1f0247578eac475/vmware_video/accelerant'
make: Leaving directory '/sources/VMwareAddons-e04e6f029fe5c80be011b9f8d1f0247578eac475/vmware_video/accelerant'
make: Entering directory '/sources/VMwareAddons-e04e6f029fe5c80be011b9f8d1f0247578eac475/vmware_video/kernel'
cc -c device.c -iquote./  -iquote./  -isystem../shared -D_KERNEL_MODE=1 -fno-pic -O1  -Wall -Wno-multichar -Wno-ctor-dtor-privacy  -fPIC -o "objects/device.o"
cc1: warning: command line option '-Wno-ctor-dtor-privacy' is valid for C++/ObjC++ but not for C
device.c: In function 'CheckCapabilities':
device.c:75:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  si->fbDma = (void *)ReadReg(SVGA_REG_FB_START);
              ^
device.c:78:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  si->fifoDma = (void *)ReadReg(SVGA_REG_MEM_START);
                ^
device.c: In function 'CreateShared':
device.c:159:46: error: 'B_USER_CLONEABLE_AREA' undeclared (first use in this function); did you mean 'B_CLONEABLE_AREA'?
   B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA | B_USER_CLONEABLE_AREA);
                                              ^~~~~~~~~~~~~~~~~~~~~
                                              B_CLONEABLE_AREA
device.c:159:46: note: each undeclared identifier is reported only once for each function it appears in
/boot/system/develop/etc/makefile-engine:295: recipe for target 'objects/device.o' failed
make: *** [objects/device.o] Error 1
make: Leaving directory '/sources/VMwareAddons-e04e6f029fe5c80be011b9f8d1f0247578eac475/vmware_video/kernel'
Warning: Command '['bash', '-c', '. /wrapper-script']' returned non-zero exit status 2
Error: Build has failed - stopping.

Thanks, I’ve just fixed it. Try again now:

haikuporter --get
haikuporter --get-dependencies vmware_addons

Now, that was fast! :slight_smile:

It’s not there yet for me, though:

$ haikuporter --get-dependencies vmware_addons
Checking if any dependency-infos need to be updated ...
Looking for stale dependency-infos ...
----------------------------------------------------------------------
app-emulation::vmware_addons-1.2.0
        /boot/home/haikuports/app-emulation/vmware-addons/vmware_addons-1.2.0.recipe
----------------------------------------------------------------------
Skipping download of source for VMwareAddons-7a153f457cd4d8a099102a4b3a53f03dd5c5cbbb.tar.gz
Skipping checksum validation of VMwareAddons-7a153f457cd4d8a099102a4b3a53f03dd5c5cbbb.tar.gz
Skipping unpack of VMwareAddons-7a153f457cd4d8a099102a4b3a53f03dd5c5cbbb.tar.gz
[Errno -2147459069] No such file or directory: '/boot/home/haikuports/app-emulation/vmware-addons/work-1.2.0/sources/VMwareAddons-7a153f457cd4d8a099102a4b3a53f03dd5c5cbbb'

No sure it it makes any difference, but I should mention I am using the HaikuDepot version of haikuporter (1.2.2).