What is my GPU really here for? Truely understanding VCPUs and fully ultilizing GPU

Good day! and yellow! :wave:

So I have been using qubes for nearly or just over 6 months! Perhaps longer? :face_with_open_eyes_and_hand_over_mouth:

As of recent I decided to migrate and for the most part fully restructure my Qubes setup from my laptop to my high-end Desktop because MORE RAM.
Jokes aside I was finally happy with my familiarity, goal and ideal Qubes policy and structure, and done some quiet advance things that worked out quiet well!
Now not to go into everything on how my setup is but I managed to greatly reduce attack vectors, establish a vastly more defined compartmentalization structure and improved on my setup and configurations for my IDS/IPS for Qubes internal network(segment).

To my surprise and somehow I was this delusional I had thought that the VCPUs was the combined virtualization of the CPU and GPU processing resources, which is like yes and no when it comes to vms however it would appear it is purely CPU with minor leaning on the GPU in terms of graphics and all that. As my simple mind would put it.

So the GPU does the graphics processing, is required for dom0, etc but it cannot however be fully utilized, especially if it is packing. :face_with_peeking_eye:
Take this example, I let the rip on a Qube with a ton of VCPUs and running a program and the cooler for the CPU will go crazy but the GPU just sits and looks pretty.
This is my problem and it bothers me, perhaps I do not understand enough however I feel I might be somewhat in the line.

Now the solution, GPU pass-through!? However it would appear my understanding to that is that this is not possible with a single GPU that is just sitting and looking pretty and however requires two GPUs, one specifically not used by dom0 to allow direct use of it resources.
This means that one can’t game(for obvious reasons, specially in the single GPU scenario) which was what I was aware of but further disappointed after learning the true nature of the VCPUs preventing me from being able to run significant sized models like 70 - 200GB worth of AI, so one can run say Lama3, anything 7b, but go 22b and above and it is not possible, even if the hardware is there due to the whole GPU issue.

I want to open a discussion that provides further discussing VCPUs as what I read/found so far is quiet underwhelming but more important to fully understand the role of the GPU with Qubes and more especially how and where to utilize it resources more with a single GPU setup.

Looking forward to read what people contribute and to learn from it.
I decided to post this as a discussion as this isn’t specifically a need of assistance to a specific issue but rather to learn, view different inputs and see different approaches to further utilizing the systems GPU especially when the resources are there to be used.

2 Likes

Yellow :smile: :wave:

Exactly, dom0 must have a GPU its display, and it can’t be shared with a qube, so you would need a second GPU for passthrough.

VCPUs are just a virtual/arbitrary representation of the CPU ressource for VMs (you can give CPU budget, limits etc… to VCPU so they don’t really map 1:1 to 1 VCPU = 1 CPU). This has nothing to do with the GPU though.

A CPU with an integrated GPU is ideal on a desktop, as it’s enough for dom0 display, then you have room for a powerful GPU you can assign to a qube. You should check if your CPU has an integrated graphic card. The AMD CPUs have a G in their name, which stands for Graphics.

GPU passthrough still has a performance cost that seem non negligible from the GPU passthrough thread :frowning:

Good day!

Thank you for your quick and quiet friendly response! :smiley:
I do indeed have an ideal CPU(Ryzen 9 7950X) in my machine with internal graphics, however ofc you can’t run Qubes just on that without the GPU present.
So I am curious how does one assign the internal graphics to dom0, cause without the GPU Qubes would’ve never run and so I want to clarify that due to their being a GPU that Qubes won’t brick up or break if I allocate the integrated to dom0 and then use the GPU for pass-through?
Regarding GPU I wouldn’t mind loss as I don’t require all it resources and being able to use most of it would be a game changer than having a dual boot setup.

It does not have a G in its name, so it does not have integrated graphics.

It does have Radeon Graphics, its my understanding that all from the AM5(zen 5) CPUs have integrated graphics.
However I can confirm it has as I have run operating systems without a GPU in it.

weird, I just looked at the specs and indeed it has an integrated graphics :face_with_raised_eyebrow:

If you plug your screen to the motherbord graphic ports, you should have dom0 using the integrated GPU, then you can have fun with the GPU passthrough.

Yip the integrated graphics is quiet convenient in my opinion.
Especially now with Qubes! XD
Have you tried this internal graphics yourself or seen other users with success?
Another concern I have is potential conflict of internal graphics and GPU when I enable it again but lets see how it goes. Confident that is should be fine.
My only concern is a brick of of the install so let me go and do a backup as a precaution.
Is there any particular guide you would suggest I follow for pass-through?

Thanks for contributing to the discussion and for the advisory!

Looks like we both learnt something to day :joy: :sweat_smile:

my desktop CPU does not have integrated GPU. It works fine for other :slight_smile:

a conflict of what? If you setup the GPU passthrough, there will be a step to hide the GPU from dom0, so it can’t conflict at all.

1 Like

It works just fine, I’m using the 9950X with internal graphics, should be the same as the 7950X.

Just remember to install the amdgpu driver for xorg, as default it will use the modesetting driver and it wasn’t 100% stable on my system.

2 Likes

Thank you for mentioning!

Yea basically the same CPU, just enable my integrated graphics now and working all good.
Since you did the same/similar setup I want to go for may I ask what guide you used?
There is many guides/troubleshooting I can see on the forum and the most detailed one was in regards to gaming however any suggestions would be amazing.

if you don’t need to render graphics, I guess you can reuse the most popular guide and just skip the part about Xorg/Screen configuration because you do not need it

Hi, thanks for the suggestion!

I do preferably want it to be able to do everything now than reconfigure later so will do the Xorg/Screen configs.
I assume the most popular one is Create a Gaming HVM ?

Have read the entire thing and did send a question regarding the start as was slightly confusing so hopefully will get a response soon.

I am getting confused here. Can’t dom0 use the integrated graphics processor of the CPU? If I buy a @novacustom V54 with Nvidia GeForce RTX-4070 8 GB dGPU, am I not going to be able to do GPU passthrough for that RTX-4070 (because you seem to be saying that dom0 needs that RTX GPU)?

it does, and laptop CPU always have an integrated GPU so you are fine

2 Likes

dom0 will always require some graphics processing hardware dedicated to it, so in the case your CPU has integrated graphics you can use that instead the GPU the the pass-through. In the case that you don’t have integrated graphics then yes you would require an additional GPU for pass-through.

1 Like