You are not logged in.

#1 2022-01-13 23:16:27

mpr
Member
Registered: 2022-01-13
Posts: 11

use cuda on wayland

Hello,

I recently got a new laptop which has both an integrated intel gpu and a discrete nvidia gpu (GeForce RTX 3060 Mobile). Since I don't do any gaming or graphics applications I don't need to use the nvidia gpu for rendering but I do need to use it for testing deep learning models (mostly PyTorch). When I want to install the nvidia driver from the arch repository pacman asks to install a whole list of xorg-* dependencies. However, I use Wayland -- no XWayland -- and I don't want to clutter up my system with the additional xorg-* packages.

I've seen in a post in a Ubuntu forum, https://askubuntu.com/questions/830983/ … alling-x11, where a headless nvidia driver was recommended but I couldn't find anything of the sort in the Arch repo or in the AUR.

Is there any way I can use the nvidia gpu for cuda tasks without having to install Xorg or XWayland? Ideally, I'd like to have the nvidia gpu turned off by default and just turn it on when needed (as bumblebee should do).

If that's not possible I'd consider installing a second Arch system which I'd only use for the gpu (ie disable the integrated gpu). Would that only involve a second kernel installation or something more complex?

Thanks for your help!

Offline

#2 2022-01-14 03:36:43

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,743

Re: use cuda on wayland

Fugly Hack,

pacman -Syu nvidia-utils --assume-installed xorg-server

Less fugly, you could build and maintain your own "headless" nvidia-utils package. See https://wiki.archlinux.org/title/Arch_Build_System for how to acquire PKGBUILDs and adjust relevantly to only include the dependencies as needed.

Alternatively, I doubt that the literal megabytes of additional diskspace are going to hurt your disk. Which would be the far more pragmatic approach YMMV

Last edited by V1del (2022-01-14 03:37:06)

Offline

#3 2022-01-15 23:32:01

mpr
Member
Registered: 2022-01-13
Posts: 11

Re: use cuda on wayland

Hey V1del, thanks that worked really well! I've got both gpus up and running.

Offline

Board footer

Powered by FluxBB