Nvenc encoder not running on prime setup

i have a prime setup. p104/8086k 1080p monitor. the opensource driver was selected by default so i switched to nvidia driver 470.86/495(slash cause its selectable in additional drivers)

nvenc is selectable in obs. my os is ubuntu 21.04. on selecting the nvidia driver my intel card was selected by default. games, proton or host use nvidia gpu for vulkan and opengl tasks

, but h.264 to stream. given intel mode was initially selected, that makes me think the nvenc librearies are not bundled with the driver, or they require the settings enabled to work due to intel being initially selected. my nvidia settings are limited due to prime, so could someone tell me how i’d enable nvenc via a terminal command or send a .so libreary folder to place in my /bin or wherever it is libreary? thanks. i need nvenc primarily for streaming, and since alvr (the only way to run occulus with steam games) needs nvenc. and yes i can change gpu index in my settings of alvr.

inn my about pc my system says 'p104-100/pcie/sse2" and my gpu runs an overclock default. so it can handle vr for sure. and my old 16.04 setup could run nvenc with this card, so i think it should be possible here.

edit: with some mild digging, i saw this is a common issue, and its enable in xserver settings, but as i do not have this part of the gui if anyone has the terminal command to enable this, i’d like some help

Please switch to “performance” mode and check if nvenc comes available.

i do not know how to send screen shots, but nvenc comes up as an option in obs, and ffmpeg -encoders 2>/dev/null | grep nvenc gets all 4 nvenc versions. my prime profile is set to nvidia ondemand still nvenc is broken

okay found the upload button. heres obs error message, dispite the ffmpeg and selectability of nvenc. my driver is 470.86 in xserver settings. linux x86_64 is the os in settings
Screenshot from 2022-04-07 04-18-40

Again, please try switching to performance mode.

i am see? my appologies, been in performance mode called it ondemand earlier cause got names mixed up
Screenshot from 2022-04-07 04-26-36

still fails on nvenc

Ok, how did you install ffmpeg?

“sudo apt-get install ffmpeg” was the command. thats my version info in the picture. it is also possible nvenc is missing from the driver itself? im in no way knolagable about drivers. also i have adaptive clocking on but it usually runs full speed by default

If OBS/ffmpeg are correctly installed, only libcuda is needed on the driver side, which gets installed with it.
How did you install OBS, did you use a snap/flatpack version or the ppa?
Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

i installed obs via ppa. heres the file. is that the right one?
nvidia-bug-report.log.gz (388.7 KB)

Driver is installed fine, libcuda is available but I really think your gpu doesn’t have any en-/decoder because it was built for mining.
nvidia-smi:

        Encoder                           : N/A
        Decoder                           : N/A

You can check what ffmpeg says trying to trancode some video

ffmpeg -i "input.mp4" -vcodec h264_nvenc -preset fast "output.mp4"

what does that mean? i dont think it understood the command, also why is it making my games run extremely well? i doubt that an igpu should be able to run god of war and minecraft maxed out shaders at 60 fpsthere is an hdmi port physically on the card btw. nothing in it cause it is flashed with a gigabyte 8gb bios(gigabyte p104 has no port) but msi card. i had to change out the bracket to aceess the port. got these pre flashed.

“input.mp4” is a placeholder for a video you have on your harddisk. Or download some mp4 sample for testing.

is it possibly trying to use the intel card? alvr wont even see the nvidia card

Like suspected, the P104-100 is a mining card and has no encoder.
Don’t know what you’ve been seing in 16.04. Either you didn’t have an nvenc-enabled build of ffmpeg installed so this was just ignored or the encoder was accidentally enabled in an ealier driver version.

so i guess no vr for me. how do i figure out if its the ffmpeg thats bad or the cuda for nvenc is missing?

“No capable devices found” means there’s no encoder on the nvidia gpu.

that is vary strange wonder why 16.04 worked. i guess they disabled it in the update

Maybe. Impossible to say without logs from the 16.04 install.