Jump to content

Proxmox VE OSX Guide discussion


fabiosun

Recommended Posts

6 hours ago, fabiosun said:

@tsongz

are you sure you need all those ssdt to have cpu as host booting fine?

In my MSI board no need for any of these ssdt, only to configure vm config and config.plist in open core properly (for owned hardware I mean)

 

 

@fabiosun is right. The SSDT and CPU as host have nothing to do with each other. This is all related to support in the bootloader - OC I suspect (and more specifically what the AMD OSX community is doing to make AMD CPUS work in macOS). The VM can boot only with OC + Lilu, no extra kexts and no SSDT (please, anyone, correct me if wrong)

  • +1 1
Link to comment
Share on other sites

  • Supervisor

you can use ssdt to refine some aspect, but not necessary for Host cpu..

Oc developer have done some modify which allows us to boot with a minimal set of "old" vanilla patches and have our cpu recognised as AMD Thread ripper in many app

Aestetycally much better than Penryn core duo output with 64 cores 🙂

 

 

  • Like 1
Link to comment
Share on other sites

Small update on trying to get an early build for Proxmox on Linux 5.8. My initial hope was that 5.8 would finally address AMD reset issues, as it has a host of AMD related improvements (both CPU and graphics driver) but I am not as optimistic about the reset issue now. Nonetheless, it's a huge release and many people will test it on bare metal Ubuntu's and other distros, but it will take quite a while to make it to Proxmox. It would be nice to see what improvements or issues it brings, especially with pass-through and host power management.

 

Fabian confirmed to me he's not able to build pve-edge-kernel against it yet. Same issue I had when I tried to compile it, but pointed that someone ported ZFS to 5.8 already. When I find time I will try to follow his lead. If anyone else is interested in trying this, PM me.

 

 

Thank you for your interest!
 
I have tried to build a 5.8-rc4 kernel but stumbled upon the same issue you are having. I made a quick attempt to backport some of the changes from upstream ZFS, which did not succeed however.
 
I have been rather conservative with making changes to ZFS since (1) I am not that familiar with the code base and (2) I don‘t use ZFS myself (thus I cannot test it).
 
In the meantime I haven’t yet had time to look at the latest releases due to holidays. Though, I saw that Nix managed to build ZFS for Linux 5.8-rc7, so I’ll have a look at that soon.
 
Kind regards,
 
Fabian Mastenbroek
 
On 3 Aug 2020, at 16:26, [redacted] wrote:
cleardot.gif

Hi Fabian,
 
Sorry for using email, not sure if this is the best way to communicate with you, but figured to try as it is listed in your github.
 
With Linux 5.8 released I tried to build https://github.com/fabianishere/pve-edge-kernel by essentially replacing the ubuntu mainline submodule with Linux mainline cut by Torvalds yesterday. All good with the kernel build but ZFS build failed. There is some sort of incompatibility with 5.8 - I got compile error possibly related to this ZFS entry - https://github.com/openzfs/zfs/pull/10422
 
Any plans to soon build pve-edge-kernel with 5.8 or do you plan to wait for ZFS to make a 5.8 compatible release? Have you tried to build pve against 5.8 release candidates and would that work even if ZFS is fixed? I am tempted to try and backport ZFS changes from ZFS mainline to make the build succeed, but not sure if there are other surprises that await me after that.
 
Cheers and thanks for sharing that work on github,
 

 

p.s. I've redacted emails from this thread so the don't get picked by spam crawlers.

Link to comment
Share on other sites

  • Supervisor

If I have understood well it is possible to use if you do not use zfs..and so..is it available a compiled kernel in this way?

I would like to test if it adds some opportunity to pass bridge or pcieport..

I think it is a qemu problem than kernel..but I am not sure of this my assertion 🙂

 

  • Like 1
Link to comment
Share on other sites

@fabiosun @meina222 - Confirmed that no additional SSDTs are required. The change I had made was in OC Configurator, and disabling them, and rebooting (which was a full power loop with "qm stop 101", and in my script, also does a "sudo reboot" for Vega). I believe iGPU mentioned before that when changing from Pendryn to Host, that a NVRAM reset was required - in my case, I hadn't done this, but the difference was that I had changed my SMBIOS, so I wasn't sure if this made a difference.

 

GB5 CPU tests are relatively the same, 1242 (up +1 from 1241) and 16330 (-31 from 16361)

GB5 Metal tests are down a bit, 55724 (down from 58920)

 

But overall I'm fairly happy with it so far, it's running stable with no weird quirks. I'm using Screen Share on my iMac to control it, and at certain points, the screen went black (sleep after 15 mins) and I was able to wake it remotely, after some rapid screen flashing. This can be fixed with setting sleep to never of course.

 

I also purchased the Bluetooth+WiFi module that was suggested by @meina222 on Amazon since I don't intend on saturating all 4 PCIe slots rather than messing with additional SSDT fixes (which had meant mapping all the USB ports on the board, to be able to set the proper slot for Intel AX200)

Link to comment
Share on other sites

2 hours ago, fabiosun said:

If I have understood well it is possible to use if you do not use zfs..and so..is it available a compiled kernel in this way?

I would like to test if it adds some opportunity to pass bridge or pcieport..

I think it is a qemu problem than kernel..but I am not sure of this my assertion 🙂

 

@fabiosun - zfs support is integral part of proxmox - it will be very hard to try and decouple it - zfs is part of the options to create host storage, and you can specify it in the gui itself.

 

What I am hoping to do is build zfs from latest mainline and have it compile, but not recommend setting up zfs host storage pools as I am not sure one can guarantee full data integrity. 

FYI OC 0.6.0 was officially released today

 

https://github.com/acidanthera/OpenCorePkg/releases

  • +1 1
Link to comment
Share on other sites

I succeeded in building pve-edge kernel against Linux 5.8 and latest zfs mainline (similar to an OpenCore daily build - note that this is NOT AN OFFICIAL ZFS release). I used latest gcc 10.2. So truly "bleeding edge". Expect to "bleed' tomorrow testing it. Unfortunately my VM pool is ZFS software raid so I will have to test it on a different storage as I'm not inclined to lose my partitions. But if you don't use ZFS, this should "just work" (I hope).

 

Here's what I roughly did. This assumes you're familiar with git and git submodules and have an environment where you can build the linux kernel. Pasting my email to Fabian that I just fired off.

 

1. Created new git submodules named "linux" and "openzfs/upstream" alongside existing "ubuntu-mainline" and "zfsonlinux" modules
    SHA of linux is bcf876870b95592b52519ed4aafcf9d95999bc9c (Torvald's 5.8 tag)
    SHA of openzfs/upstream is f1de1600d132666d03b3b73a2ab62695a0f60ead which happens to be the lates of origin/master of https://github.com/openzfs/zfs
 
2. Copied "debian" and "debian.master" from existing ubuntu-mainline submodule to "linux" submodule
    Copied "debian" and Makefile from existing "zfsonlinux" submodule to the "openzfs" folder
 
3. Changed the pve-edge-kernel root Makefile to refer to "linux" and "openzfs" folders instead of "ubuntu-mainline" and "zfsonlinux"
 
4.  Fired off make.
 
2 patches failed immediately ("fuzz") in openzfs/debian/patches (copied from zfsonlinux/debian/patches) 
 
    0002-always-load-ZFS-module-on-boot.patch
    0007-Use-installed-python3.patch
 
0002 was a trivial patch so I manually uncommented #zfs in etc/modules-load.d/zfs.conf of zfs root (upstream folder) which should enable proxmox to load zfs automatically I believe
I didn't bother with 0007-Use-installed-python3.patch
 
After removing the 2 patches from the series the build succeeded. I specified zen2 and ended up with the following files:
 
linux-tools-5.8_5.7.8-1_amd64.deb
pve-edge-headers-5.8.0-1-zen2_5.7.8-1_amd64.deb
pve-edge-kernel-5.8.0-1-zen2_5.7.8-1_amd64.deb
pve-kernel-libc-dev_5.7.8-1_amd64.deb
 
libc-dev didn't update, I think this is specified somewhere in root debian, but I think I might try to fire it off tomorrow regardless w just kernel and kernel headers + tools. I will probably avoid using ZFS in this test.

 

If anyone is interested in reproducing my results, I can post instructions on how to prepare your environment to build the kernel. You can do it on Ubuntu (as I did) or Proxmox itself. The biggest pain/obstacle is to install all toolchain packages needed to build the kernel.

Edited by meina222
  • Like 1
Link to comment
Share on other sites

@meina222

 

Quick and dirty bash script I had from my first build to try to apply the Vega patch, - might be missing a few steps (excluding your ZFS steps and submodule pulls), and dependencies might not all be up to date but hopefully saves some time from rewriting.

 

#!/bin/bash

# This is where you want it to be compiled, such as /usr/src - it will take a lot of space on host (10?+ GB)
PATH_ON_HOST=$1

# Dependencies at least from 5.6
apt-get update
apt-get install git debhelper build-essential dh-python dh-systemd sphinx-common lintian
apt-get install asciidoc-base bison flex libdw-dev libelf-dev libiberty-dev libnuma-dev libslang2-dev libssl-dev lz4 xmlto zlib1g-dev
apt-get install --only-upgrade gcc

cd $PATH_ON_HOST
git clone git://git.proxmox.com/git/pve-kernel.git
cd pve-kernel
git branch -a

# choose a branch
git checkout pve-kernel-5.8

# Optional step to add patches
# wget https://gist.githubusercontent.com/...3d0553bb246b5bc327d67abb/fix-vega-reset.patch -O patches/kernel/0007-fix-vega-reset.patch
make
# will download related kernel sources. This will take 20 min - 2 hrs depending on your internet speed, and how many threads host has allocated.

 

  • Like 2
Link to comment
Share on other sites

  • Moderators
On 8/2/2020 at 11:35 PM, tsongz said:

SSDT-DTGP.aml (still not quite sure what this one does)

 

DTGP is a routine often called by other SSDTs. On the X299 platform, many SSDTs developed by KGP, call this method. The only dependencies I have in my list that call DTGP is the TB-SSDT, which no one is actually yet using. So the DTGP SSDT can be disabled or removed or the DTGP method could be placed in the TB-SSDT if this is the only SSDT calling it.

 

Snippet of TB-SSDT showing a DTGP call:

Spoiler

            Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
            {
                Local0 = Package (0x06)
                    {
                        "AAPL,slot-name", 
                        Buffer (0x07)
                        {
                            "Slot-4"
                        }, 

                        "built-in", 
                        Buffer (One)
                        {
                             0x00                                             // .
                        }, 

                        "PCI-Thunderbolt", 
                        One
                    }
                DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                Return (Local0)
             }

 

 

As for kexts, I do not enable VirtualSMC, WEG or MCEReporterDisabler.

 

And use:

Cpuid1Mask = FFFFFFFF 00000000 00000000 00000000 

 

with these Patches enabled:

algrey - cpu_topology_sort -disable _x86_validate_topology

algrey - cpuid_set_generic_info - disable check to allow leaf7

 

I do use other SSDTs, but basically only for cosmetic issues in IORegistryExplorer (my OCD). The SSDTs, which on other builds are important (and that I use, but have not tested as to their importance on TRX40 build) are: SSDT-PLUG and SSDT-EC-USBX.

 

 

Edited by iGPU
  • +1 1
Link to comment
Share on other sites

10 hours ago, fabiosun said:

@meina222

to post compiled kernel as deb file is not possible?

Let me test it 1st tonight. DIdn't get a chance to install on Proxmox yet and busy at work till this evening US ET. The .deb files are about 70MB un-archived. I can try and archive them and upload them to github. Or is there a space here?

 

I did install 5.8 on my Ubuntu and working from it now - seems great - fan speed control is finally in sync w BIOS profiles as the only obvious (audible) improvement.

 

Edit: I tried uploading here the tar.gz of .deb files. It comes to about 76MB. The board here has limit of 48MB.

Edited by meina222
Link to comment
Share on other sites

8 hours ago, tsongz said:

@meina222

 

Quick and dirty bash script I had from my first build to try to apply the Vega patch, - might be missing a few steps (excluding your ZFS steps and submodule pulls), and dependencies might not all be up to date but hopefully saves some time from rewriting.

 


#!/bin/bash

# This is where you want it to be compiled, such as /usr/src - it will take a lot of space on host (10?+ GB)
PATH_ON_HOST=$1

# Dependencies at least from 5.6
apt-get update
apt-get install git debhelper build-essential dh-python dh-systemd sphinx-common lintian
apt-get install asciidoc-base bison flex libdw-dev libelf-dev libiberty-dev libnuma-dev libslang2-dev libssl-dev lz4 xmlto zlib1g-dev
apt-get install --only-upgrade gcc

cd $PATH_ON_HOST
git clone git://git.proxmox.com/git/pve-kernel.git
cd pve-kernel
git branch -a

# choose a branch
git checkout pve-kernel-5.8

# Optional step to add patches
# wget https://gist.githubusercontent.com/...3d0553bb246b5bc327d67abb/fix-vega-reset.patch -O patches/kernel/0007-fix-vega-reset.patch
make
# will download related kernel sources. This will take 20 min - 2 hrs depending on your internet speed, and how many threads host has allocated.

 

 

Thank you. I did build the pve-kernel (5.7.8) with gnif's AMD patch before from Fabian's pve-edge-kernel git. DIdn't work for me. macOS would still not reset. I know the patch was applied correctly - t I did see the card being power cycled and the LED light going off with a click on shutdown. But upon restart the Apple logo would take forever in progress bar. Something with the PCIE bus wasn't properly released. Ultimately I gave up the patch.

 

There is slim hope things might look better with 5.8. I will try patch-less 1st, then add patch if it's not good.

Link to comment
Share on other sites

Ok. Here is the link.

 

https://mab.to/Kmgg1Igar

 

It contains all  .deb files output by the build. You only need to apply the kernel and kernel headers (pve-edge-kernel and pve-edge-headers).

 

Not that I HAVE NOT TRIED it yet. Up to you if you want to hold off another day so I can have time to test it tonight. This is highly experimental and likely Proxmox team haven't tested it themselves yet.

 

I would also be cautious about using ZFS volumes - likelihood of data corruption is low as there many unit tests in the git repo, but this is not built from an official tag - it's development version of latest ZFS git branch. Proxmox applies some patches on top, and I disabled one as it was failing - related to python version scripts (I don't believe it's essential but haven't tested it).

 

 

  • Like 1
Link to comment
Share on other sites

  • Supervisor
6 minutes ago, meina222 said:

Ok. Here is the link.

 

https://mab.to/Kmgg1Igar

 

It contains all  .deb files output by the build. You only need to apply the kernel and kernel headers (pve-edge-kernel and pve-edge-headers).

 

Not that I HAVE NOT TRIED it yet. Up to you if you want to hold off another day so I can have time to test it tonight. This is highly experimental and likely Proxmox team haven't tested it themselves yet.

 

I would also be cautious about using ZFS volumes - likelihood of data corruption is low as there many unit tests in the git repo, but this is not built from an official tag - it's development version of latest ZFS git branch. Proxmox applies some patches on top, and I disabled one as it was failing - related to python version scripts (I don't believe it's essential but haven't tested it).

 

 

Thank you

and don't worry

risk is mine 🙂

I will try ands see if it boots

 

  • Like 1
Link to comment
Share on other sites

  • Supervisor

@meina222

 

Spoiler

Last login: Tue Aug  4 21:08:46 CEST 2020 on tty1
Linux proxmox 5.8.0-1-zen2 #1 SMP 5.8.0-1-zen2 (Fri, 10 Jul 2020 15:39:00 +0200) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@proxmox:~# pveversion -v
proxmox-ve: 6.2-1 (running kernel: 5.8.0-1-zen2)
pve-manager: 6.2-4 (running version: 6.2-4/9824574a)
pve-kernel-5.4: 6.2-1
pve-kernel-helper: 6.2-1
pve-kernel-5.4.34-1-pve: 5.4.34-2
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.3-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.15-pve1
libproxmox-acme-perl: 1.0.3
libpve-access-control: 6.1-1
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.1-2
libpve-guest-common-perl: 3.0-10
libpve-http-server-perl: 3.0-5
libpve-storage-perl: 6.1-7
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.2-1
lxcfs: 4.0.3-pve2
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.2-1
pve-cluster: 6.1-8
pve-container: 3.1-5
pve-docs: 6.2-4
pve-edk2-firmware: 2.20200229-1
pve-firewall: 4.1-2
pve-firmware: 3.1-1
pve-ha-manager: 3.0-9
pve-i18n: 2.1-2
pve-qemu-kvm: 5.0.0-2
pve-xtermjs: 4.3.0-1
qemu-server: 6.2-2
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.3-pve1
root@proxmox:~# 

it is good 🙂

thanks

 

  • Like 1
Link to comment
Share on other sites

Ok I hope so :). You are now running Proxmox with the kernel dubbed the "the biggest release of all time" by its author

https://www.zdnet.com/article/linus-torvalds-linux-kernel-5-8-is-one-of-our-biggest-releases-of-all-time/

 

Don't expect a magic bullet on AMD reset or TB3 controller VFIO though. I really want to find the time to take a serious look at these. I think the best bet would be to reach to some of the VFIO kernel developers for clues on understanding the current limitations.

Do me a favor - check what version command "uname -r" outputs to verify the kernel version

  • Like 2
Link to comment
Share on other sites

  • Supervisor
7 minutes ago, meina222 said:

Ok I hope so :). You are now running Proxmox with the kernel dubbed the "the biggest release of all time" by its author

https://www.zdnet.com/article/linus-torvalds-linux-kernel-5-8-is-one-of-our-biggest-releases-of-all-time/

 

Don't expect a magic bullet on AMD reset or TB3 controller VFIO though. I really want to find the time to take a serious look at these. I think the best bet would be to reach to some of the VFIO kernel developers for clues on understanding the current limitations.

Do me a favor - check what version command "uname -r" outputs to verify the kernel version

1812415313_ScreenShot2020-08-04at19_35_00.png.5ef13f9442a7d3a78bd18f57562e844f.png

  • Like 2
Link to comment
Share on other sites

@iGPU thanks for sharing that! Per Fabio and meina's suggestion, I disabled all the SSDTs and was able to boot with no issues. I am curious though whether they make a difference at all when it comes to performance, and/or optimizing the GPU, since there was a big drop in my Vega FE.

 

I also share your OCD-ness for the cosmetic appearance. Does disabling MCEReporterDisabler affect the memory module warning? That's one cosmetic thing that has been bothering me, even though it doesn't affect performance.

 

 RE TB3 - I may have something for you here. I purchased my GB Alpine Ridge from a seller who flashed(?) it and provided OC instructions for it. Publicly, it's pw protected, but the pw was provided in the instructions when I received it. Attaching the main essentials in the zip here. Main files are the SSDTs (TR, TR2, AR) and their respective OC configs. I have not tested this yet on my own machine, and the note is that this was specifically compiled for a genuine Mac Pro (<2010) - but hopefully can give you some insight.

 

 

thunderbolt_files.zip

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.