How can i use cuda with switchable graphics (not using bumblebee)

image

Some object (Quader) press F12 , Render with gpu, but I am sure it is ok.

Cuda has no performance hit if used with Bumblebee. Actually, running in Prime mode makes it have less resources due to allocation of some for the desktop and compositor. Again, this is very noticeable on weak GPUs.

im aware bumblebee can be used with cuda just fine, but it fails in the other areas the OP wants to use the gpu for like gaming

2 Likes

Yeah we're just talking to produce some (maybe) valuable bits of information for OP to consider while you're trying to make cuda work in Intel mode. How's going btw?

Well... What to do if the Manjaro Live USB hangs on MHWD startup with free and non-free drivers?

Most likely you have to do this:

1 Like

everything seems fine, though i would like to confirm somehow with an actual test. session is running on intel and nvidia-smi shows the nvidia card available, blender shows the nvidia for cuda in preferences. but im still unable to find an actual test to run on cuda to confirm it's working properly. i just ran blender for the first time ever about 10 minutes ago so i know not what im doing :sweat_smile:

the only tool in the aur i could find is not working properly, not just for me but in general it's not working.

@LangoLango, you should probably edit the thread title. optimus-manager and bumblebee together might create a singularity and swallow the earth we live on :laughing:

I dunno, just install xmrig-nvidia (AUR), it needs cuda to run properly and builds very fast so you'll know if cuda works simply by running that as command in terminal.

1 Like

XMRig is high performance Monero (XMR) NVIDIA miner, with the official full Windows support.

GPU mining part based on psychocrypt code used in xmr-stak-nvidia.

thanks, never even thought to use a crypto miner to test it. seems to work fine

after stopping miner and unloading nvidia modules:

2 Likes

Nice, this means cuda works. How did you make nvidia load? Simply modprobed it? I don't remember optimus-switch settings, does it blacklist or alias nvidia in Intel mode?

the original optimus-switch setup would load the nvidia modules to /bin/false so thay cant be used

original /etc/switch/intel/intel-modprobe.conf
#blacklists all nouveau/nvidia modules
#so they are not loaded.

blacklist nouveau
blacklist ttm
install nvidia /bin/false
install nvidia-modeset /bin/false
install nvidia-drm /bin/false
install nvidia-uvm /bin/false

#######################################
#this following section can be removed#
#if you plan to use the modesetting   #
#driver intead of the intel driver    #
#######################################

#stops display from "blinking" or "flashing"
#during boot when using the intel driver.

options i915 enable_fbc=1
options i915 fastboot=1
modified /etc/switch/intel/intel-modprobe.conf
#blacklists all nouveau/nvidia modules
#so they are not loaded.

blacklist nouveau
blacklist ttm
#install nvidia /bin/false
install nvidia-modeset /bin/false
install nvidia-drm /bin/false
#install nvidia-uvm /bin/false

#######################################
#this following section can be removed#
#if you plan to use the modesetting   #
#driver intead of the intel driver    #
#######################################

#stops display from "blinking" or "flashing"
#during boot when using the intel driver.

options i915 enable_fbc=1
options i915 fastboot=1

this allows nvidia and nvidia-uvm to be loaded if needed, but not nvidia-modeset and nvidia-drm so they wont interfere with display function.

3 Likes

@dglt Nice bit of detective work there. I learned something new. Thanks!

Is this something you may think about changing in your Optimus-Switch package?

1 Like

i actuall just did some more tinkering and im thinking of maybe including an alternate setup that allows for switching without reboot and would also allow for cuda. it's not setup this way now because i found it to be too unstable like optimus-manager. it works for me as i just tested it again but my gpu also shuts itself off when the nvidia modules are unloaded and power management set to auto. that said i could just include an alternate setup that users could enable and see if it works for them and if not can use the default setup requiring a reboot as it is now. this way it's flexible without over complicating everything.

maybe in the next few days if im feeling ambitious i'll throw something together, thanks for volunteering for lab rat duty @linesma :sweat_smile:. you were the first optimus-switch lab rat other than myself after all.

2 Likes

@dglt Let me drink a couple of beers first to build my courage up!!!

2 Likes

i dont feel like doing it now, but i'll let you know when it's ready to test.

1 Like

@dglt Thanks. I have had enough of nVidia lately. I had to reformat my Shield TV and set it back up.... talk about frustration!

Ok, I did install Manjaro without MHWD, and I am using it right now. What should be the next step if I want to use @dglt solution?

Sorry, I saw now that I need to install video-nvidia, but MHWD is just freezing... I will try to update all packages first.

follow the directions on the optimus-switch github readme.

if your using kde/sddm then it's

after you get it setup and working the way it's meant to work, then make the edits i suggested before for cuda to work. if you need help after it's setup i'll explain but first just set it up the way it's intended to be.

1 Like

I got a black screen. :joy:

I guess I didn't update the kernel, and the acpi_call package failed to install.

Forum kindly sponsored by