Jump to content

Ubuntu crapfest

Go to solution Solved by stefanmz,
On 2/12/2022 at 12:49 AM, Windows7ge said:

...well now I'm thoroughly confused. Are we troubleshooting the VM not starting when you try to connect the PCI_e device or has pass-through been working the entire time and you just can't get driver support inside the VM? Cause I thought we've been trying to trouble-shoot the former...

No there is no driver. But anyway I got a MacBook Air. 

Hey so I just enabled IOMMU in the grub config and after restart qemu kvm can’t connect to show my vms and when I try to restart libvirt and virtlog services it fails? Wtf???  How do I fix this? I don’t have time for Ubuntu bullcrap I need to setup my vm. Also the above stuff only happens if I add my physical gpu to the vm using virt-manager otherwise everything works fine but I need to add my physical gpu

Link to comment
Share on other sites

Link to post
Share on other sites

Is the physical GPU in use at the time you try to add it to the vm?  If so, and if this GPU isn't something like a quadro which allows it to be split up, you might be out of luck (unless you have a second gpu); see here:

 

edit: just to clarify, it *is* technically possible to boot a kvm from a headless machine with only 1 gpu, but you won't be doing it from a graphical environment:

 

If I have to explain every detail, I won't talk to you.  If you answer a question with what can be found through 10 seconds of googling, you've contributed nothing, as I assure you I've already considered it.

 

What a world we would be living in if I had to post several paragraphs every time I ask a question.

Link to comment
Share on other sites

Link to post
Share on other sites

56 minutes ago, Yuri Fury said:

Is the physical GPU in use at the time you try to add it to the vm?  If so, and if this GPU isn't something like a quadro which allows it to be split up, you might be out of luck (unless you have a second gpu); see here:

 

edit: just to clarify, it *is* technically possible to boot a kvm from a headless machine with only 1 gpu, but you won't be doing it from a graphical environment:

 

Anyway I fixed I had to isolate it but macOS does not support it so I can’t use it.  Now I explicitly set Ubuntu to use the Nvidia while I tried to isolate the integrated graphics for passthrough to vm but if I do that Ubuntu fails to boot? Why? I need to try that’s my only option for decent macOS performance and gpu acceleration. 

Link to comment
Share on other sites

Link to post
Share on other sites

Are the integrated graphic in their own IOMMU group and have you blocked the kernel driver or substituted it with vfio-pci?

 

The issues you're describing aren't explicitly a Ubuntu issue but rather virtualization on Linux in general. There's a very specific set of procedures you have to follow. It's not as simple as just assigning hardware devices to a VM.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Windows7ge said:

Are the integrated graphic in their own IOMMU group and have you blocked the kernel driver or substituted it with vfio-pci?

 

The issues you're describing aren't explicitly a Ubuntu issue but rather virtualization on Linux in general. There's a very specific set of procedures you have to follow. It's not as simple as just assigning hardware devices to a VM.

They are in theIr IOMMU group and exactly when I try to use the vfio-pci to isolate them just like I did before on the Nvidia card which worked, then the system doesn’t boot.

Link to comment
Share on other sites

Link to post
Share on other sites

44 minutes ago, stefanmz said:

They are in theIr IOMMU group and exactly when I try to use the vfio-pci to isolate them just like I did before on the Nvidia card which worked, then the system doesn’t boot.

I've not heard particular success with passing through integrated graphics. It's possible even though it says it's in it's own IOMMU group that the kernel has actually forcibly broken it away from other component(s) in the CPU that would have to be passed with it and at that point it's kind of a lost cause.

 

If I'm not mistaken doesn't MacOS favor AMD GPU's? Did you verify MacOS would even work with your NVIDIA card? Based on what I've been told if you're going for a modern version of MacOS you're not going to get it working easily without an AMD GPU.

Link to comment
Share on other sites

Link to post
Share on other sites

18 minutes ago, Windows7ge said:

I've not heard particular success with passing through integrated graphics. It's possible even though it says it's in it's own IOMMU group that the kernel has actually forcibly broken it away from other component(s) in the CPU that would have to be passed with it and at that point it's kind of a lost cause.

 

If I'm not mistaken doesn't MacOS favor AMD GPU's? Did you verify MacOS would even work with your NVIDIA card? Based on what I've been told if you're going for a modern version of MacOS you're not going to get it working easily without an AMD GPU.

Yeah well there is an nvidia driver for High Sierra and my gpu is compatible with that version,so I guess I have no choice but to run High Sierra. Hopefully Apple hasn’t completely dropped support for it yet. Also if my GPU is compatible with that but not with newer that means I can’t update or I lose my gpu working,is that correct?

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, stefanmz said:

Yeah well there is an nvidia driver for High Sierra and my gpu is compatible with that version,so I guess I have no choice but to run High Sierra. Hopefully Apple hasn’t completely dropped support for it yet. Also if my GPU is compatible with that but not with newer that means I can’t update or I lose my gpu working,is that correct?

My knowledge and experience with MacOS is very limited so I'm not the best person to ask. If I had to lean on either driver support being carried up or dropped if you upgraded the OS my money would be on it won't be supported but take that with a dump-truck full of salt. Worst case scenario if you do get this up and running just backup the VM then go ahead and try the upgrade. If it works, yay! If not, restore from back-up.

 

I actually have to get going pretty soon and I won't be available to answer questions for 3 hours but I think we'll start from the ground up so I can get an understanding of what your exact configuration is.

 

What hardware exactly are you running?

What version of Ubuntu?

 

Also If you're on AM4, or LGA1151/other did you enable IOMMU/VT-d respectively in the BIOS?

 

What physical slot did you install the NVIDIA GPU in? On these mainstream platforms it'll have to go in the top slot otherwise it may go through the Chipset/PCH and that won't work.

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Windows7ge said:

My knowledge and experience with MacOS is very limited so I'm not the best person to ask. If I had to lean on either driver support being carried up or dropped if you upgraded the OS my money would be on it won't be supported but take that with a dump-truck full of salt. Worst case scenario if you do get this up and running just backup the VM then go ahead and try the upgrade. If it works, yay! If not, restore from back-up.

 

I actually have to get going pretty soon and I won't be available to answer questions for 3 hours but I think we'll start from the ground up so I can get an understanding of what your exact configuration is.

 

What hardware exactly are you running?

What version of Ubuntu?

 

Also If you're on AM4, or LGA1151/other did you enable IOMMU/VT-d respectively in the BIOS?

 

What physical slot did you install the NVIDIA GPU in? On these mainstream platforms it'll have to go in the top slot otherwise it may go through the Chipset/PCH and that won't work.

Hardware well 

CPU Intel Core i5-1035G1 4 cores 8 threads Ice Lake U
Ram 8GB DDR4
Motherboard LNVNB161216(Lenovo),Intel 495(probably chipset but I don’t know)
Gpu Integrated Intel UHD graphics, Nvidia GeForce Mx350 2GB discrete 
Storage 512GB NVMe SSD SkHynix BC511 HFM512GDHTNI-87A0B
Network Intel Wi-Fi 6 AX201 ,Bluetooth 5
Keyboard and trackpad PS2(I think)
Audio sof-hda-dsp(that’s what Linux live cd reports)
2 USB 3.0 ports

 

Ubuntu 20.04 LTS 

IOMMU is enabled as well as VT-D I only have VT-D in bios nothing about IOMMU but Linux reports that it’s enabled and shows the IOMMu groups I basically added intel_iommu=on in grub or something like this. 
 

Physical slot I don’t know it’s a laptop but it can be passedthrough because I did it once and it appeared in macOS but no driver from nvidia.

0825FA5B-A539-437C-BF70-5FD2D0CCD5F5.jpeg

56363F3E-41FF-4FF2-828D-40BD6E35EC21.jpeg

Link to comment
Share on other sites

Link to post
Share on other sites

GPU pass-through on a laptop isn't a popular concept and I don't hear people raving about their success with it so you're in a minority group if you get it working at all. If it is going to work I'd test it in a Windows VM first to really see if the GPU is going to have any chance of working in MacOS.

 

Did you remember to run update-grub after appending intel_iommu=on?

Do you remember if you just backlisted the NVIDIA driver or used vfio-pci last time it showed up in MacOS?

What version of Ubuntu did you use last time?

 

The process for doing this on a desktop isn't much more complicated outside of the specifics of MacOS setup. I don't have many more answers for you.

Link to comment
Share on other sites

Link to post
Share on other sites

I can't get Linux working so I can use Windows. 🙄 heh (oh, it's a hackintosh.. ok that is cool)

"Only proprietary software vendors want proprietary software." - Dexter's Law

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Windows7ge said:

GPU pass-through on a laptop isn't a popular concept and I don't hear people raving about their success with it so you're in a minority group if you get it working at all. If it is going to work I'd test it in a Windows VM first to really see if the GPU is going to have any chance of working in MacOS.

 

Did you remember to run update-grub after appending intel_iommu=on?

Do you remember if you just backlisted the NVIDIA driver or used vfio-pci last time it showed up in MacOS?

What version of Ubuntu did you use last time?

 

The process for doing this on a desktop isn't much more complicated outside of the specifics of MacOS setup. I don't have many more answers for you.

I updated grub and I just used vfio-pci last time same version of Ubuntu 

Link to comment
Share on other sites

Link to post
Share on other sites

42 minutes ago, stefanmz said:

I updated grub and I just used vfio-pci last time same version of Ubuntu 

I'm not immediately seeing anything you've done wrong here...did you remember to change the chipset from i440FX to Q35? Usually you do this while creating the VM. Not sure if it will let you do it after it's deployed.

Link to comment
Share on other sites

Link to post
Share on other sites

13 hours ago, Windows7ge said:

I'm not immediately seeing anything you've done wrong here...did you remember to change the chipset from i440FX to Q35? Usually you do this while creating the VM. Not sure if it will let you do it after it's deployed.

I don’t remember about the chipset but dies it matter when there is no nvidia driver? Like can that card function without a driver? Probably not. I mean I have been told that card is Hugh Sierra for the latest compatible version. After that it’s not supported. So I don’t know if we can do anything here other than use High Sierra if I want to use the Nvidia 

Link to comment
Share on other sites

Link to post
Share on other sites

22 hours ago, Windows7ge said:

I'm not immediately seeing anything you've done wrong here...did you remember to change the chipset from i440FX to Q35? Usually you do this while creating the VM. Not sure if it will let you do it after it's deployed.

By the way I checked the chipset is Q35 by default I haven’t changed it and it’s Q35

Link to comment
Share on other sites

Link to post
Share on other sites

10 hours ago, stefanmz said:

I don’t remember about the chipset but dies it matter when there is no nvidia driver? Like can that card function without a driver? Probably not. I mean I have been told that card is Hugh Sierra for the latest compatible version. After that it’s not supported. So I don’t know if we can do anything here other than use High Sierra if I want to use the Nvidia 

2 hours ago, stefanmz said:

By the way I checked the chipset is Q35 by default I haven’t changed it and it’s Q35

No, what the chipset does is provide virtualized hardware features. What Q35 has opposed to the other is a virtualized PCI_e slot. This virtual slot is what your PCI_e device(s) go into when they're passed through.

 

Outside of just starting over it's looking more and more like a hardware limitation. Hardware pass-through on laptops although not impossible isn't popular.

 

When you try to start the VM does it just stop with an error? I think your last progress report said something about the OS not loading at all?

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Windows7ge said:

No, what the chipset does is provide virtualized hardware features. What Q35 has opposed to the other is a virtualized PCI_e slot. This virtual slot is what your PCI_e device(s) go into when they're passed through.

 

Outside of just starting over it's looking more and more like a hardware limitation. Hardware pass-through on laptops although not impossible isn't popular.

 

When you try to start the VM does it just stop with an error? I think your last progress report said something about the OS not loading at all?

Um,no it boots and works check out screenshots up in one of the messages. Just thus card although recognized as a PCIe device so passthrough is successful but doesn’t work because it’s not supported by this version of macOS and no drivers from nvidia. High Sierra only and nothing further

Link to comment
Share on other sites

Link to post
Share on other sites

20 hours ago, stefanmz said:

Um,no it boots and works check out screenshots up in one of the messages. Just thus card although recognized as a PCIe device so passthrough is successful but doesn’t work because it’s not supported by this version of macOS and no drivers from nvidia. High Sierra only and nothing further

...well now I'm thoroughly confused. Are we troubleshooting the VM not starting when you try to connect the PCI_e device or has pass-through been working the entire time and you just can't get driver support inside the VM? Cause I thought we've been trying to trouble-shoot the former...

Link to comment
Share on other sites

Link to post
Share on other sites

On 2/12/2022 at 12:49 AM, Windows7ge said:

...well now I'm thoroughly confused. Are we troubleshooting the VM not starting when you try to connect the PCI_e device or has pass-through been working the entire time and you just can't get driver support inside the VM? Cause I thought we've been trying to trouble-shoot the former...

No there is no driver. But anyway I got a MacBook Air. 

Link to comment
Share on other sites

Link to post
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

×