Prime render offload

Hi all, so I’ve tried finding some info on this forum and also went through the archwiki article as well as about 7 fresh installs on my new laptop to get the nvidia graphics card to work.

I have here a laptop with an RTX 2060 and an i7-9750H and what I’d like to achieve finally is to be able to use the discrete graphics for games and such and keep the integrated graphics for light work, ideally while being able to plug in my main screen at any time and use that as the primary (probably another topic I guess?)

So I stumbled upon the archwiki articles for nvidia, nvidia optimus and prime render offloading as well as bumblebee.

First attempts were just about running nvidia-installer-dkms -b to get it to work with bumblebee, but that just resulted in complete freezes at boot, just when the display manager (gdm) was started (I presume, since the last messages I could see on screen before the freeze are the same ones I see before gdm comes up)

I reset these attempts by running nvidia-installer-dkms -n but had to remove one package manually because it was breaking a dependency (lib32-virtualgl I think) and the system was running fine again, except for the useless nvidia card of course.

Then the next step was to try the method that is officially supported by nvidia, which is prime render offloading. That did seem to work a little better, went through the archwiki article about that and glxinfo told me that the RTX2060 is being used. So I tried to persist all of that with nvidia-xconfig which created the /etc/X11/xorg.conf file. Rebooted the system and gdm came up but upon logging into my session (i3wm) everything froze again. So I just renamed the xorg.conf to xorg.conf.bak and now I’m back to square 1 it seems.

Since the whole system seems to freeze with either bumblebee or prime render I can’t find anything out of the ordinary in the journalctl but maybe I’m just looking in the wrong place. However it seems to me that something in the xorg config is preventing the iGPU from “starting”

Care to help a noob?

EDIT1: Using the dec 2019 endeavourOS iso
EDIT2: Using i3wm and a few gnome utils like gnome-polkit

Hello @hesxenon

Which ISO are you using currently to try to install?

errr, iso? Maybe I misunderstood something completely here, but I’m just downloading the nvidia and nvidia-prime package?

Yes, I’m just asking which ISO you are using to do the install. Are you using the current ISO which was put out in Dec?

yes, I am

How are you getting it to boot with the Nvidia RTX 2060? Are you disabling the Nvidia to install first?

I’m booting with the nouveau driver and haven’t had obvious issues with that, so no I’m not disabling anything explicitly first. Should I?

No i’m just surprised it boots on the nouveau. So after the install did you try running the installer for Nvidia DKMS with the test option first? This will show you if here are any problems.

no I did not, just tried it now with nvidia-installer-dkms -b -t (because I assume my system is in a “clean” state now) and it didn’t report any errors on stdout, however it can’t write to /tmp/nvidia-installer.log because of permissions (but sudo or root won’t work with -t)

You run it like that in test without sudo. Then to install use sudo if there are no errors.

sudo nvidia-installer-dkms -b

Edit: It just doesn’t write the log file because it doesn’t have privliages

yeah, I’m just saying that test mode did not report any errors on stdout but I can’t verify any log files which might contain more info.

installing it will most likely result in another freeze, should I try it? Might take some time before I get to answer because my fix for that is booting the kernel to runlevel 3 which means accessing the forum is kinda tedious :slight_smile:

It say’s no errors so i would try. I don’t know what the freezing is from?

just seeing that the installer is adding my account to the bumblebee group, maybe the issue was that i ran it as root and not with sudo? Will reboot and update you

1 Like

just rebooted and it froze, the boot messages go away and I’m just seeing a cursor on the top left with no text, can’t switch ttys or anything.

Typing from my phone now.

Oh no…what type of laptop is it?

a schenker xmg neo 15, let me know if you need further info, currently on runlevel 3 as root

I’ve never heard of that. Anyway i have another question. So are you unable to install just the nvidia-dkms without bumblebee or do you get the same thing?

starting gdm with timed exit has the same effect and gdm doesn’t exit gdm --timed-exit maybe I missed a parameter to that but it seems that the whole system freezes… shouldn’t I be seeing a kernel panic or something like that in this case?

if I install the driver without bumblebee I get the same thing, but that gives me an idea, wait a sec

If you get it back running you could also try installing straight nvidia drivers without dkms just to see.

sudo pacman -S nvidia nvidia-utils lib32-nvidia-libgl nvidia-settings