this post was submitted on 21 Jul 2023
7 points (100.0% liked)

Linux 101 stuff. Questions are encouraged, noobs are welcome!

1023 readers
2 users here now

Linux introductions, tips and tutorials. Questions are encouraged. Any distro, any platform! Explicitly noob-friendly.

founded 1 year ago
MODERATORS
 

I have this laptop (Surface Book 2), a Intel iGPU and Nvidia dGPU.

Whenever I need to update the Nvidia driver/ hotplug the dGPU. I need to first systemctl stop sddm.

I thought the WM/DE only use my iGPU. (sorry for bringing Win logic here)

I'm using Arch & Fedora. Plasma/Gnome+Wayland.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 1 year ago* (last edited 1 year ago) (2 children)

Hotplug? So you're using an external GPU?

In the case of laptops with integtrated graphics + nvidia graphics (soldered) (so called "optimus laptops"), you can configure the display manager to use 1. only the integrated graphics; 2. only the nvidia gpu; 3. both of them, loading the desktop environment with integrated graphics and offloading applications to the nvidia gpu. The tools to manage that vary across distros, for arch a good one is optimus-manager (package name), and for Fedora you can use Envy Control.

Since you're presumably outputting the dedicated GPU video to the laptop's screen through pci-e, and not using the GPU video ports, maybe the optimus tools work for your case scenario (although I'm not entirely sure of that).

Also, it could be a Wayland issue. Try doing the same thing with Xorg. I'm a Xorg user and never had to restart the DE/DM to update Nvidia drivers, but my laptop has a soldered Nvidia chip.

[–] [email protected] 1 points 1 year ago (1 children)

In the case of laptops with integtrated graphics + nvidia graphics (soldered) (so called “optimus laptops”),

my case is In the case of laptops with integtrated graphics + nvidia graphics (soldered) (so called “optimus laptops”)

I thought optimus laptops is old kind of laptop. Newer laptop, like mine (Surface Book 2) use another thing call Prime offload might be same thing? IDK

when I want to run apps with nvidia gpu, I will have to use environment variables, ex __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia osu

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Prime offload might be same thing? IDK

It's the same thing. Prime offload is a tool made specifically for these optimus laptops (NVIDIA) and other switchable graphics systems (laptops with AMD GPUs)

Unless you have a solid reason to use Wayland, I strongly recommend to use Xorg instead. It works better with switchable graphics, and I think that you will be able to offload your games with it without the need to restart SDDM. In your Arch system, follow the installation instructions for the optimus-manager. Since you're using SDDM instead of GDM, it should work without the need of any tweaks.