eglstreams-kms-example icon indicating copy to clipboard operation
eglstreams-kms-example copied to clipboard

Unable to load NVIDIA drm module

Open berenm opened this issue 8 years ago • 3 comments

Hi there,

I'm very interested in these examples, and I was trying to achieve the same thing after reading the slides from the XDC2014. I realized soon after that it wasn't possible until the NVIDIA driver supported DRM, and now it looks like it's there!

So, I am trying to use the DRM support in 364.12 on my Debian, but when I load the kernel module with sudo modprobe nvidia-drm modeset=1, after having killed X11, I got the following messages:

[   64.246966] [drm:nvidia_drm_load [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to allocate NvKmsKapiDevice
[   64.247388] [drm:nvidia_drm_probe_devices [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to register device

I have both an Intel and an NVIDIA card in my laptop, so I'm thinking that Optimus might not be yet very well supported? Any idea would be welcome, but otherwise don't bother too much :)

Have a nice day!

berenm avatar Mar 21 '16 21:03 berenm

Does the optimus notebook have any display connectors that are driven by the NVIDIA GPU, or are they all driven by the Intel graphics hardware? DRM KMS won't be too usable if it cannot display anything. But still, I wouldn't expect nvidia_drm_load to fail. Can you run nvidia-bug-report.sh and attach the resulting log?

aritger avatar Mar 21 '16 22:03 aritger

I'm not entirely sure how the connectors are setup. I know that I have to use xrandr --setprovideroutputsource modesetting NVIDIA-0 in order to offload the graphics acceleration to the NVIDIA card.

Here is the nvidia-bug-report.sh output, when I run it after unloading the nvidia module and after reloading it with modeset=1. X was not started so its log is not included, I can add it if it is useful.

Also, the output of xrandr --listproviders once X is started, for what it's worth.

Providers: number : 2
Provider 0: id: 0x2e6 cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x46 cap: 0x3, Source Output, Sink Output crtcs: 3 outputs: 4 associated providers: 1 name:modesetting

nvidia-bug-report.log.gz

berenm avatar Mar 21 '16 22:03 berenm

Sorry for the slow response, berenm. I suspect the NVIDIA GPU isn't connected to any outputs in your laptop, so nvidia-drm can't do anything useful. It should fail more gracefully and not produce an alarmist error message, though. We'll get that fixed. Thanks.

aritger avatar Mar 28 '16 22:03 aritger