Bumblebee-Project / Bumblebee

Bumblebee daemon and client rewritten in C
http://www.bumblebee-project.org/
GNU General Public License v3.0
1.29k stars 142 forks source link

[XORG] (EE) /dev/dri/card1: failed to set DRM interface version 1.4: Permission denied #913

Open Artox opened 7 years ago

Artox commented 7 years ago

OpenSUSE 42.3

Linux luise 4.4.79-19-default #1 SMP Thu Aug 10 20:28:47 UTC 2017 (2dd03e8) x86_64 x86_64 x86_64 GNU/Linux

baseboard-manufacturer: Medion
baseboard-product-name: Akoya P6638
baseboard-version     : 1.0       
system-manufacturer   : Medion
system-product-name   : Akoya P6638
system-version        : 1.0       
bios-vendor           : American Megatrends Inc.
bios-version          : 503
bios-release-date     : 11/22/2012

optirun (Bumblebee) 3.2.1

GPUs:
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108M [GeForce GT 635M] [10de:0de3] (rev a1) (prog-if 00 [VGA controller])

And now the context:

When trying to run glxgears or glxinfo (No other applications attempted) through optirun (/primusrun), I get this output on the console:

optirun glxinfo
[  286.247244] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card1: failed to set DRM interface version 1.4: Permission denied
[  286.247284] [ERROR]Aborting because fallback start is disabled.

And this is the dmesg that was printed while, and after running optirun:

[  285.303202] bbswitch: enabling discrete graphics
[  285.840414] MXM: GUID detected in BIOS
[  285.840503] ACPI Warning: \_SB_.PCI0.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[  285.840618] ACPI Warning: \_SB_.PCI0.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[  285.840733] i915 0000:00:02.0: optimus capabilities: disabled, status 
[  285.840766] ACPI Warning: \_SB_.PCI0.RP00.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[  285.840854] ACPI Warning: \_SB_.PCI0.RP00.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[  285.840958] pci 0000:01:00.0: optimus capabilities: disabled, status 
[  285.840962] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.RP00.VGA_ handle
[  285.841040] nouveau 0000:01:00.0: NVIDIA GF108 (0c1180a1)
[  285.859686] nouveau 0000:01:00.0: bios: version 70.08.c7.00.06
[  285.967327] nouveau 0000:01:00.0: fb: 512 MiB DDR3
[  286.018041] vga_switcheroo: enabled
[  286.018145] [TTM] Zone  kernel: Available graphics memory: 4026698 kiB
[  286.018146] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[  286.018147] [TTM] Initializing pool allocator
[  286.018154] [TTM] Initializing DMA pool allocator
[  286.018173] nouveau 0000:01:00.0: DRM: VRAM: 512 MiB
[  286.018175] nouveau 0000:01:00.0: DRM: GART: 1048576 MiB
[  286.018179] nouveau 0000:01:00.0: DRM: TMDS table version 2.0
[  286.018181] nouveau 0000:01:00.0: DRM: DCB version 4.0
[  286.018184] nouveau 0000:01:00.0: DRM: DCB outp 00: 02000300 00000000
[  286.018186] nouveau 0000:01:00.0: DRM: DCB conn 00: 00000000
[  286.031756] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[  286.031759] [drm] Driver supports precise vblank timestamp query.
[  286.085239] nouveau 0000:01:00.0: DRM: MM: using COPY0 for buffer copies
[  286.155934] nouveau 0000:01:00.0: DRM: allocated 1024x768 fb: 0x60000, bo ffff880215f98400
[  286.156021] nouveau 0000:01:00.0: fb1: nouveaufb frame buffer device
[  286.156028] [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 1
[  291.823584] ACPI Warning: \_SB_.PCI0.RP00.VGA_._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
[  291.823847] nouveau 0000:01:00.0: DRM: suspending console...
[  291.823851] nouveau 0000:01:00.0: DRM: suspending display...
[  291.823916] nouveau 0000:01:00.0: DRM: evicting buffers...
[  291.887814] nouveau 0000:01:00.0: DRM: waiting for kernel channels to go idle...
[  291.887847] nouveau 0000:01:00.0: DRM: suspending client object trees...
[  291.888106] nouveau 0000:01:00.0: DRM: suspending kernel object tree...

What I have attempted: Adding a Screen section to /etc/bumblebee/xorg.conf.nouveau:

Section "Screen"
    Identifier "Default Screen"
    Device "DiscreteNvidia"
EndSection

Explicitly set BusID "PCI:01:00:0" Add rcutree.rcu_idle_gp_delay=1 to cmdline

Any suggestions how to proceed?

Lekensteyn commented 7 years ago

You must install the proprietary "nvidia" driver for use with Bumblebee. Have you tried following your distro documentation? https://en.opensuse.org/SDB:NVIDIA_Bumblebee

Artox commented 7 years ago

You must install the proprietary "nvidia" driver for use with Bumblebee. That is news to me. I thought I could choose nouveau, or nvidia; and thus I chose to first get it working with nouveau before pulling in more dependencies and things that could break. Also note that the distro-documentation you linked clearly labels this step optional.

I can try using the nvidia driver later today. Does nouveau really not work? According to the Feature Matrix this GPU should be reasonably well supported.

Artox commented 7 years ago

So I now got around to installing the nvidia drivers. Used rpm packages from https://download.nvidia.com/opensuse/leap/42.3 . Sadly it does not work:

export LIBGL_DEBUG=verbose
optirun glxinfo
name of display: :0
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /home/josua/.drirc: No such file or directory.
libGL: Can't open configuration file /home/josua/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
libGL: Can't open configuration file /home/josua/.drirc: No such file or directory.
libGL: pci id for fd 5: 8086:0166, driver i965
libGL: OpenDriver: trying /usr/lib64/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/i965_dri.so
libGL: Can't open configuration file /home/josua/.drirc: No such file or directory.
libGL: Using DRI3 for screen 0
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  48
  Current serial number in output stream:  47

I can't exactly tell whats wrong here. Either way the one thing that does work: optirun -b none nvidia-settings -c :8 I get to see exactly what I expect, except for a supposed screen resolution of 640x480. I guess thats harmless.

karolherbst commented 7 years ago

@Artox when using Nouveau you don't need bumblebee

Artox commented 7 years ago

@Artox when using Nouveau you don't need bumblebee

Now you caught me cold. I thought without Bumblebee I was stuck with the Intel graphics block (which runs on i915 I think, not nouveau)?

Lekensteyn commented 7 years ago

@Artox If you remove Bumblebee and install nouveau, you can make applications render on the Nvidia GPU by enabling PRIME. Can for example be done with:

DRI_PRIME=1 glxgears

That has less overhead than "optirun glxgears", technically it works in a completely different way. This "PRIME" rendering method is however not available with the Nvidia driver (Nvidia proprietary driver only displaying stuff rendered on the Intel GPU on its outputs, not the other way round).

TheTesla commented 6 years ago

Please try also: optirun sudo glxgears and report your result.