Installing with UTM on M1 Macbook Air

Hello All,
Just been struggling getting Beta 4 installed on my M1 Macbook Air. Finally got it after a bunch of attemps. The key for me was using “Intel Partition Map” not the “GUID Partition Map”. (Helps when you look at the install guide on the website.). If you don’t it will install properly and then when you reboot it will only boot from the CD/Iso and the process starts all over again.

Trying to save you all from making the mistake I did.

Now onto figuring out how to get a lower resolution since Apple made a computer that doesn’t natively support 1080p. (Should have done more research before buying a year ago)

Thanks
Thom

4 Likes

Hi Thom,
I did manage to install Haiku using “GUID Partition Map” with UEFI turned on and it booted properly. All I need is to create an EFIBOOT partition using this guide on Haiku website. The only problem is that the screen resolution does not save and defaults to 1920x1080 on the bootloader, so you have to manually set it to your desired resolution everytime it boots.

1 Like

You should be able to get around that by placing the resolution you want in the “VESA settings file”, as the EFI loader reads this when booting. I’m not sure if there’s a guide on how to do that anywhere. But the bootloader also does try to detect the screen resolution automatically, so perhaps the problem is that you already have a VESA settings file and it’s set to the wrong resolution…

3 Likes

I got a permanent resolution working by following the instructions in this thread. More specifically:

  1. Open StyledEdit
  2. Enter the following text, making sure to press enter at the end of the line:
    mode 1680 1050 32
  3. Save as vesa (no extension) in /boot/home/config/settings/kernel/drivers
  4. Reboot
3 Likes

For me beta 4 worked fine in UTM without UEFI boot. When I installed beta 5 without UEFI boot, I could no longer change the screen resolution. The driver shown in screen settings changed. Beta 4 showed it’s using VESA Driver (Generic VESA), beta 5 uses VirtioGpu Driver (Virtio). Creating a VESA file didn’t work for me.

After trying around a bit with creating a UEFI boot partition, booting with UEFI, and different settings in UTM under Display → Emulated Display Card, I found a solution that works.

  1. Boot from ISO
  2. Follow these instruction to create a drive with GUID partition table and an UEFI boot partition.
  3. Install
  4. Turn off the virtual machine.
  5. Eject the ISO from the virtual DVD drive.
  6. Edit the virtual machine and turn off QEMU → Tweaks → UEFI Boot
  7. Set System → System to Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-7.2)
  8. Set Display → Emulated Display Card to VESA
  9. Start virtual machine
  10. :feather:-> Preferences → Screen should allow to change display resolution and refresh rate now.
  11. Shut down virtual machine
  12. Edit the virtual machine
  13. Set Display → Emulated Display Card to virtio-vga or virtio-vga-gl (GPU Supported)
  14. Start virtual machine
  15. :feather:-> Preferences → Screen should read VirtioGpu Driver (Virtio) and resolution and refresh rate should be configurable.

Versions and settings:
Haiku version: hrev57937+121 R1/beta5 (x86 64)
UTM version: 4.5.3 (99)
Virtual machine: Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-7.2) (q35), Emulated Display Card virtio-vga
Hardware: Apple MacBook Air M2 15"

Should I report this as a bug?

Edit: It seems the key is to set the Emulated Display Card to VESA at least once. I’m not sure the UEFI boot partition is necessary, however I couldn’t reproduce it without. I still suspect some of the steps above might not be necessary.

I couldn’t get Standard PC (1440FX + PlIX, 1996) (alias of pc-i440fx-7.2) (pc) to work. Q35 has better PCI support AFAIK.

1 Like

If fonts in your Haiku virtual machine also look a bit crappy, this might help you.

It took me a bit of trying until I found a resolution that looks good. My MacBook Air has a 15" screen with native resolution of 2880 x 1864 pixels. The macOS defaults to 1710 x 1107 with nice scaling.

In UTM Haiku’s screen is always scaled up. This means the screen is scaled at least twice until I can see it. This can lead to quite ugly fonts. Setting Haiku’s screen to a high resolution made the fonts look fuzzier and disproportionate or far too tiny for me.

I set Haiku’s screen resolution to 1440 x 900. In Appearance font smoothing is set to subpixel hinting at medium. In UTM’s virtual machine settings, I changed -> Display → Upscaling to Linear.

For your screen a different resolution, upscaling, and font smoothing settings might work.

Did you instead try to disable upscaling in UTM and using the native resolution directly in Haiku?
Haiku supports HiDPI quite nicely,but it’s controlled by the font size,rather than the screen preferences.
Instead of zooming everything for HiDPI,Haiku directly draws it in a bigger size which results in sharper rendering.
When you have your native resolution set and it looks sharp but everything is too small,go to Appearance preferences and change the font size to 20 or something like that.
After that,reboot to make it have an effect everywhere (without rebooting,it affects only newly opened applications)

Thank you for this suggestion.

I’m talking about running Haiku full screen. That necessitates some kind of scaling. UTM in a window can only be not scaled if it’s the correct size at native resolution.

Haiku’s screen settings doesn’t offer me the native resoluton of 2880 x 1864, only 2048 x 1152. Sadly that’s also the wrong aspect ratio, so I end up with black bars on top and bottom. 1920 x 1200 is the highest resolution with a good aspect ratio. That’s also a nice round 1.5x scale factor.

Changing the font size in Appearance isn’t full HiDPI. Real HiDPI would also adjust icon sizes, scrollbars, mouse pointer size, and such. Changing the font size is an indirect way of affecting the size of UI elements.

Neverless, I gave it a try and increased the font size ad rebooted. Now lots of icons, buttons, and other UI elements are too small. In Wonderbrush this is especially apparent. The Tips replicant on the deskto didn’t adjust its font size and the handle to drag it around is now even tinier. Files written in StyledEdit have smaller fonts. Interesting that this was preserved. I also had to increase font sizes in web browsers. Now that won’t scale up pictures inside web pages, so they can look wonky. I haven’t adjusted icon size in Qt Configurator yet. Icon size in Launchbox needs adjustment as well. I’m sure this isn’t an exhaustive list of setting to adjust or regressions to accept.
So it’s not just setting fonts size in one place, it’s several.

Since 1440 was the old horizontal resolution and 1920 is the new one, I scaled the fonts and icons by about 1920/1440 = 1.33 to keep the proportions somewhat close.

Performance is a little worse as well. GLTeapot now has around 30 fps instead of 35 fps. That’s about 15% slower.

Fonts looks great and very crisp though and there’s more screen space to work with. It’s a trade off I guess. Thank you again for pointing out this option.

Adjusting the font size once in the Appearance preferences is the way Haiku tries to implement HiDPI support.
All other elements should calculate their size based on the font size, so even elements that don’t contain text should grow when you increase the font size.
If that doesn’t work right with some elements or in some applications, that are bugs which need to be fixed.
I must admit, I’m really surprised by how many things you found that still don’t look right.
None of my Haiku devices, which are quite many, has HiDPI, so I don’t have personal experience with it.
I thought it would work better, that shows that there’s still a lot of work to do to make Haiku even better.
Maybe with Beta6 it will work better for you.

1 Like

Use alt+ instead. or the “increase size” menu option. Webrowser zoom works differently.

StyledEdit is a visual editor, in addition to the font size it will save the specific font you used, the style and color.
You can print out the document the way it looks in StyledEdit to a printer.

Mouse pointer size scaling is indeed missing, but will be automatic by default.

Icons in tracker use a specific (pixel) size, it is configured in tracker.

For the third party apps you mentioned, yeah some of those have to be fixed. In some cases to properly use the layout system. For Wonderbrush2 there is a Wonderbrush3 replacement in development but not finished.

1 Like

I know that I can zoom the whole website in WebPositive and Falkon. However, that needs to be done again for every new tab and window. This gets annoying quickly.

Other browsers on other operating systems either remember what zoom level you opened a site the last time (Safari, Firefox) or allow setting a default zoom level in settings (Firefox, Opera).

iirc safari does both. We should probably implement that.

1 Like

I have installed Haiku R1/beta5 in an UTM virtual machine on a Mac mini (2018, Intel) following your steps. However, I don’t see the option to select ‘VESA’ as an Emulated Display Card (see screenshot).
I would like to change the screen resolution of my Haiku install but with the virtio-vga driver Haiku gives an error when selecting a different resolution.
Does anyone know how to fix this?

1 Like

Did you try the “VGA” entry?
I’m not totally sure,but that one could be using the VESA driver.
If that doesn’t work right,“ati-vga” is also worth a try.
That would be using AMD/ATI graphics drivers if available (not sure if the one that gets emulated is directly supported by Haiku) but should also support fallback to VESA.

2 Likes

I tried it. In UEFI mode, Haiku reverts to framebuffer mode. I read that with UEFI disabled it should fallback to VESA. (Location of FrameBuffer-to-vesa Setting). However, when I select VGA as Emulated Display Card, Haiku refuses to boot. (Also with VGA-ATI and several other options) I start the VM, then I see the Haiku bootscreen which fully loads and when it tries to boot to the desktop, I get this error: 0x7fcc310981d0. Did I do something wrong when setting up the VM?

1 Like

I found the solution! Apparantly, Haiku doesn’t like the combination of the “VGA” Emulated Display Card and running on the Hypervisor. Also, it is recommended to run Haiku in QEMU with “System” set to Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-7.2) (pc) according to this official documentation.

To help others with the same problem, I made some changes to the guide from @orkoden that worked for my setup. Maybe it has something to do with the combination of macOS Sequoia (15.0) on an Intel (T2-equiped) Mac.

  1. Boot from ISO
  2. Follow these instruction to create a drive with GUID partition table and an UEFI boot partition.
  3. Install
  4. Turn off the virtual machine.
  5. Eject the ISO from the virtual DVD drive.
  6. Edit the virtual machine.
  7. Set System → System to tandard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-7.2) (pc)
  8. turn off QEMU → Tweaks → UEFI Boot.
  9. turn off Use Hypervisor.
  10. Set Display → Emulated Display Card to VGA
  11. Start virtual machine
  12. :feather:-> Preferences → Screen should allow to change display resolution and refresh rate now.
  13. Shut down virtual machine
  14. Edit the virtual machine
  15. Set Display → Emulated Display Card to virtio-vga or virtio-vga-gl (GPU Supported)
  16. Turn on Use Hypervisor
  17. Start virtual machine
  18. :feather:-> Preferences → Screen should read VirtioGpu Driver (Virtio)

Thank you for your help!

1 Like

Yes, the driver is called vga in UTM not VESA. Haiku calls it VESA. Thanks for finding this mistake.

Steps 6. to 10. could maybe be moved to before step 1. Haven’t tested it though.

1 Like