this post was submitted on 17 Feb 2025
31 points (91.9% liked)

Linux

50668 readers
1106 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I'm on Arch (btw.) and I have a Intel i5-14600K CPU with a iGPU (UHD Graphics 770) (GPU 1) in it and a dGPU from Nvidia, the RTX 3060 (GPU 0). I have one monitor connected to the 3060 via display port 1.4.

I can see both GPUs in GNOME Mission Center, but hte iGPU has always Clock Speed 0 and Utilization 0. So anything which is done on the GPU is done on the 3060.

I want to seperate what is done on the iGPU and what is done on the 3060:

dGPU (RTX 3060):

  1. Video editing
  2. video transcoding
  3. AI stuff (ollama)
  4. Machine learning
  5. Blender
  6. Steam games

iGPU (intel):

  1. Firefox (especially YouTube video decoding, it has hw acceleration for that)
  2. Chrome
  3. Libre Office
  4. GNOME
  5. etc.

I wonder if this or at least parts of it is possible. I need the whole 12 GB VRAM on the 3060 for ollama, and the iGPU is just sitting there doing nothing. Is there a way to distribute the work? Do I need two screens for that or something?

It might also be that I'm misunderstanding how the whole thing works or over estimating Linuxes capabilities.

top 23 comments
sorted by: hot top controversial new old
[–] mark@social.cool110.xyz 9 points 1 week ago (2 children)

@jeena As always the Arch wiki has you covered. PRIME, is the system you need. It's slightly easier with the monitor plugged into the iGPU, (that's how laptops are wired).

[–] bjornsno@lemm.ee 5 points 1 week ago (1 children)

Not always, for example this laptop has external monitors wired to the dGPU. https://wiki.archlinux.org/title/Lenovo_ThinkPad_X1_Extreme

And more fun, lots of laptops have really goofy routing. I've got one where the DP alt mode on the USB-C ports are on the dGPU, but the HDMI ports are on the iGPU. And the internal panel is on the iGPU unless you switch it to be on the dGPU because yay mux.

Why? I don't know. Too much meth while laying the board out or something I guess.

[–] jeena@piefed.jeena.net 3 points 1 week ago

So I read it but it seems only to talk about X and not Wayland, am I missing something?

[–] just_another_person@lemmy.world 5 points 1 week ago (1 children)

I'm not sure what in the world these other answers are, but that is not how GPUs work if you're talking about a desktop.

If you're talking about a laptop, this is not going to work in Linux.

It's hard to tell from your description if this is desktop or laptop, btw. Post the model of it is a laptop as this will be important.

[–] jeena@piefed.jeena.net 7 points 1 week ago (1 children)
[–] just_another_person@lemmy.world 8 points 1 week ago* (last edited 1 week ago) (1 children)

So desktops don't work like laptops in this sense.

On a laptop, the bus for the video output ports can be connected to one or both GPUs, and the software does the graphics switching or offloading.

On a desktop, there is no consolidated bus between the PCIe card and the onboard graphics, so you can't switch between which GPU is rendering what on hardware alone. It's the whole display that is rendered on the device you're plugged into.

Windows does have some sort of offloading utility that allows for this i believe, but I've never used it so don't know how well it works.

On Linux, your display server (X or Wayland) needs to address one GPU at a time to render things.

You can totally use both GPUs with multiple monitors, but I think that's defeating the purpose you have in mind.

[–] jeena@piefed.jeena.net 1 points 1 week ago (1 children)

On Prime you can make your iGPU the primary (display connected to motherboard), and offload some rendering to the dGPU with some caveats. It was only working on Xorg for awhile, but maybe it works better under Wayland now. Couldn't tell you.

[–] jeena@piefed.jeena.net 4 points 1 week ago

Thank you everyone for explaining your view of how it works on Linux, it seems to be very chaotic when it comes to this topic, everyone has their own understanding and some contradict each other. But it was great to get some feedback and food for thought which let me to try other things which I didn't think of trying before.

Now I finally have some things working on the iGPU because I plugged the monitor into the motherboard instead of the dGPU. It seems that the offloading works well still because things like ollama and video editing still are done on the powerfull dGPU and then somehow the results synchronized to the motherboard output and on the screen.

When it comes to the iGPU I see that many applications run on both at the same time like for example Firefox or Chrome when I look at nvtop. Especially when I watch videos in the browser then the iGPU is mostly active. Also when I use GNOME Shell features like seeing the overview by pressing the Super key or switching between virtual desktops.

With help of switcheroo-control I can now force a program like DarkTable to work specifically on the dGPU.

So while I still don't have full controll over it, I feel I'm utilizing both graphics cards now much better and that was what I was looking for before I wrote this question, so thanks a lot everyone!

[–] Gayhitler@lemmy.ml 2 points 1 week ago

You have some good answers and some bad answers here.

It’s not the fault of the people answering, what you’re asking has been piecemeal and scattershot in implementation over the last decade so everyone has some bizarre response they came up with to be happy.

Allow me to share mine: use a kvm switch.

The switch lets you plug two computers into one keyboard, video, and mouse. But you’re gonna just use the video part. Plug it into both your motherboards and gpus video ports and push the button to switch back and forth between the gpu for gaming and the motherboard for everything else.

Why only gaming? Because everything else you reference can make use of a gpu that’s not being used for video. I guess some game engines support rendering frames and then sending them to another output device but that’s not something to rely on.

So when you’re using blender you see the model on your monitor plugged into the motherboard but the heavy lifting is done by the gpu. When you transcode a video the same thing happens.

I came to this solution after trying to do what you’re asking for in x11 and having a bunch of headaches about it everytime an update would come down.

Pushing a little button on the desktop was easier than messing around with software to make a rube Goldberg contraption to do the same thing. Mine had two leds on either side to indicate which “computer” I was using at the time. I ended up wrapping electrical tape around the rim to cover them both up and cut out the word “turbo” from the tape over the green led that indicated I was looking at the gpu.

[–] anon5621@lemmy.ml 2 points 1 week ago (1 children)

do u have installed switcheroo-control and how did u install nvidia driver

[–] jeena@piefed.jeena.net 2 points 1 week ago (1 children)

I did, but that only allows me to run it in the descrete one where it is already running as far as I understand.

[–] anon5621@lemmy.ml 1 points 1 week ago* (last edited 1 week ago) (1 children)

okay maybe u bios u need choose gpu mode as 3d accelerator and how u were install nvidia driver also too,maybe u switched priority using nvidia-settings if so switch back to intel reboot pc and then use switcheroo-control ? I am using dual gpu and my main by default is igpu and it was by default from arch installation

[–] jeena@piefed.jeena.net 1 points 1 week ago (1 children)

Which one is plugged in into your monitor?

[–] anon5621@lemmy.ml 1 points 1 week ago

I don't,using internal laptop screen as I know dgpu directly connected to HDMI so everything gonna render on nvidia...