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

Fedora 25: /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied #824

Open soamaven opened 7 years ago

soamaven commented 7 years ago

Making a new issue, seems similar to #652, but no solution has worked yet.

I have this problem after upgrading to Fedora 25. Kernel is 4.8.11-300.fx.x86_64. ASUS K52 laptop with NVIDIA Optimus 310M, which uses the 340.xx legacy drivers. Bumblebee/optirun/primus worked using last year's 340.96 'blob' on fc23, but does not work with 340.96 or recently released 340.98 drivers on fc25. Per this comment I have tried downgrading libdrm to 2.4.71-2.fc25 (the lowest available versions) from 2.4.74-1.fc25, to no avail. Per #580 I have tried editing /etc/bumblebee/xorg.conf.nvidia to include the following, to no avail:

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

I have also tried to comment/uncomment BusID "PCI:01:00.0" in /etc/bumblebee/xorg.conf.nvidia Per the wiki I have ensured that Driver=nvidia in /etc/bumblebee/bumblebee.conf Per #810 I have tried adding pcie_port_pm=offto /etc/default/grub and ran "grub2-mkconfig -o /boot/grub2/grub.cfg" and rebooted.

I am out of ideas and things to google

Output of optirun -vv glxgears -info:

[  124.406364] [INFO]Configured driver: nvidia
[  124.407462] [DEBUG]optirun version 3.2.1 starting...
[  124.407484] [DEBUG]Active configuration:
[  124.407493] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[  124.407501] [DEBUG] X display: :8
[  124.407507] [DEBUG] LD_LIBRARY_PATH: /usr/lib64/nvidia-bumblebee:/usr/lib/nvidia-bumblebee:/usr/lib64:/usr/lib
[  124.407515] [DEBUG] Socket path: /var/run/bumblebee.socket
[  124.407522] [DEBUG] Accel/display bridge: auto
[  124.407528] [DEBUG] VGL Compression: proxy
[  124.407535] [DEBUG] VGLrun extra options: 
[  124.407547] [DEBUG] Primus LD Path: /usr/lib/primus:/usr/lib64/primus
[  124.407911] [DEBUG]Using auto-detected bridge virtualgl
[  125.219660] [INFO]Response: No - error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

[  125.219682] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

[  125.219688] [DEBUG]Socket closed.
[  125.219699] [ERROR]Aborting because fallback start is disabled.
[  125.219704] [DEBUG]Killing all remaining processes.

dmesg output: http://pastebin.com/NDe4hmFw /var/log/Xorg.8.log output: http://pastebin.com/Z9C9HeDf

Thanks in advance.

gsgatlin commented 7 years ago

What happens if you use the "unmanaged" version and copy NVIDIA-Linux-x86_64-340.98.run into/etc/sysconfig/nvidia/ ? What error message does it give you?

soamaven commented 7 years ago

That is what i have done. I am using the unmanaged repo, and placed the blob into /etc/sysconfig/nvidia. I get the error above.

gsgatlin commented 7 years ago

Hello.

After you copy the blob, what happens if you run as root

bumblebee-nvidia --force --debug

I assume it prints a red [FAILED] after a bunch of "dots" ?

if so, can you paste the /var/log/nvidia-installer.log to fpaste.org or pastebin or similar site and link to it here? Thanks.

soamaven commented 7 years ago

It does not fail:

--debug mode selected.
--force compile selected.
Building NVIDIA video drivers: Creating directory NVIDIA-Linux-x86_64-340.98
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.98.................................................................................................................................................................................................................................

WARNING: Your driver installation has been altered since it was initially
         installed; this may happen, for example, if you have since installed
         the NVIDIA driver through a mechanism other than nvidia-installer
         (such as your distribution's native package management system). 
         nvidia-installer will attempt to uninstall as best it can.  Please see
         the file '/var/log/nvidia-installer.log' for details.

                   [  OK  ]

contents of /var/log/nvidia-installer.log were too big for pastebin free and github comment... any ideas?

soamaven commented 7 years ago

Also weird is

bumblebee-nvidia --check

nvidia.ko compiled into in the kernel tree ok.
modinfo output for NVIDIA:

filename:       /lib/modules/4.8.11-300.fc25.x86_64/kernel/drivers/video/nvidia.ko
alias:          char-major-195-*
version:        340.98
supported:      external
license:        NVIDIA
alias:          pci:v000010DEd00000E00sv*sd*bc04sc80i00*
alias:          pci:v000010DEd00000AA3sv*sd*bc0Bsc40i00*
alias:          pci:v000010DEd*sv*sd*bc03sc02i00*
alias:          pci:v000010DEd*sv*sd*bc03sc00i00*
depends:        drm
vermagic:       4.8.11-300.fc25.x86_64 SMP mod_unload 
parm:           NVreg_Mobile:int
parm:           NVreg_ResmanDebugLevel:int
parm:           NVreg_RmLogonRC:int
parm:           NVreg_ModifyDeviceFiles:int
parm:           NVreg_DeviceFileUID:int
parm:           NVreg_DeviceFileGID:int
parm:           NVreg_DeviceFileMode:int
parm:           NVreg_RemapLimit:int
parm:           NVreg_UpdateMemoryTypes:int
parm:           NVreg_InitializeSystemMemoryAllocations:int
parm:           NVreg_UsePageAttributeTable:int
parm:           NVreg_MapRegistersEarly:int
parm:           NVreg_RegisterForACPIEvents:int
parm:           NVreg_CheckPCIConfigSpace:int
parm:           NVreg_EnablePCIeGen3:int
parm:           NVreg_EnableMSI:int
parm:           NVreg_MemoryPoolSize:int
parm:           NVreg_RegistryDwords:charp
parm:           NVreg_RmMsg:charp
parm:           NVreg_AssignGpus:charp

Check bbswitch kernel module...

bbswitch is loaded into the current kernel ok.

All checks completed successfully! NVIDIA driver appears to have compiled ok.

Documentation on bumblebee for RHEL / CentOS / fedora can be found at:
https://www.linux.ncsu.edu/bumblebee/

And my "Bumblebee Status" GNOME extension informs me that my card is on, but I can't access it. EDIT: When i try (and fail) to run a program with optirun, the extension shows my card as being off.

gsgatlin commented 7 years ago

I'm thinking that error message won't really help us out with the real issue.

https://github.com/Bumblebee-Project/Bumblebee/commit/881fab51122f7fe3c7c18565556ad96c25d0660f

I will give it some more thought. Hopefully @ArchangeGabriel might have some ideas we could try or further logs to gather. I'm sorry I can't think of much else. Could

Section "ServerFlags" Option "IgnoreABI" "1" EndSection

in /etc/bumblebee/xorg.conf.nvidia

maybe not be enough for fedora 25 but enough for fedora 24?

gsgatlin commented 7 years ago

Yeah.....

I think I found the bad news here:

https://devtalk.nvidia.com/default/topic/976844/linux/xorg-1-19-support/

You may wish to complain also?

soamaven commented 7 years ago

Thanks for finding this! Good to know I can stop trying for a while. Definitely adding my complaints!

hlolli commented 7 years ago

Any solutions yet?

Im getting the same problem after some fedora updates, Im on Fedora 25 with NVIDIA v375.26 on kernel 4.8.14-300. Bumblebee installs on my computer successfully just as described by soamaven.

sozforex commented 7 years ago

I had very similar (possibly same) problem on Gentoo. I solved it by adding my user to the "video" group.

Gentoo (systemd) kernel-4.10.0 nvidia-378.13 (patched to work with kernel 4.10) xorg-server-1.19.1

jmfernandez commented 7 years ago

Maybe it is unrelated, but as I have answered in #841 I had the same issue, and it was due an Xorg input driver which was failing to load due a symbol error lookup from the dynamic linker (it was not easy to realize what was happening)

gsgatlin commented 7 years ago

@hlolli Can you post the /var/log/Xorg.8.log and the output from journalctl to a site like pastebin http://pastebin.com/ or https://paste.fedoraproject.org/ links to the two logs. Th error message is a bit of a false error message from what I have been told. Sorry I missed this issue becoming active again. I think you have totally different problem then the original poster.

hlolli commented 7 years ago

xorg log: http://pastebin.com/ZG1b9gNE starting glxgears with optitun and resulting journalctl: http://pastebin.com/EBycvy1Q

I see now referenced to mouse and keyboard, I made a noise on other ticket that its immplausible, but now I think it's not, lol.

gsgatlin commented 7 years ago

One thing I notice is that your kernel command line is missing the parts about nouveau.modeset=0 rd.driver.blacklist=nouveau

Here is what mine looks like:

X.Org X Server 1.19.1 Release Date: 2017-01-11 [ 94270.558] X Protocol Version 11, Revision 0 [ 94270.558] Build Operating System: 4.10.0-0.rc4.git0.2.fc26.x86_64 [ 94270.558] Current Operating System: Linux t540p.eos.ncsu.edu 4.9.13-200.fc25.x86_64 #1 SMP Mon Feb 27 16:48:42 UTC 2017 x86_64 [ 94270.558] Kernel command line: BOOT_IMAGE=/vmlinuz-4.9.13-200.fc25.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap "acpi_osi=!Windows 2013" nouveau.modeset=0 rd.driver.blacklist=nouveau rhgb quiet LANG=en_US.UTF-8

I don't think you should have the "acpi_osi=!Windows 2013" part as that is specific to my particular laptop. But anyways.

Can you look at

/etc/default/grub

and see if its in there?

If not it will need to be added. Normally the bumblebee-nvidia rpm does this step.

Then if you have a bios based system you run (if this exists) /boot/grub2/grub.cfg

grub2-mkconfig -o /boot/grub2/grub.cfg

if its EFI: (if tthis exists) /boot/efi/EFI/fedora/grub.cfg

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Again, normally this is done by the bumblebee-nvidia rpm but on you system maybe something went wrong?

But after doing all that and rebooting does the /var/log/Xorg.8.log Kernel command line: change to have the nouveau driver blacklisted? The nouveau driver must be blacklisted. Maybe also you need to upgrade to a newer kernel?

hlolli commented 7 years ago

@gsgatlin Sharp eyes!

the blacklist statement was already there in /etc/default/grub but I had forgotten to run grub2-mkconfig. So I did that for EFI. And as of now I'm still getting the same bug, but Im going to try to update the kernel asap.

Here's Xorg log with the correct blacklist. I'll update after I update the kernel (1-3 days).

http://pastebin.com/8LdUwv0g

Azzemeen commented 7 years ago

Hello everyone,

I may have discovered a hint. At first, everything was working nice but then after updating I ran into the same problem. None of the suggested solutions worked. BUT I could still make it "work". I am on fedora 24 with 4.10.11-100 with a GTX970M (Newer kernels lead to other GPU problems, hence I went back to the older one) However, in Fedora has some sort of pop-up bar that would open when some programs are started. (Not exactly sure how to call this or how it exactly works) When I attempt to run env WINEPREFIX="/home/MYNAME/.wine" PRIMUS_VERBOSE=2 primusrun /usr/bin/wine64 C:\\windows\\command\\start.exe steam://rungameid/33250 it gives me the well known error. But if I go to the previously mentioned bar/panel then steam shows up in there and I can tell it again to open my game. And it works.

I hope this hint is helpful. At least it shows that on my machine nothing is so severely broken that it would not work anymore...it just pretends to be. If needed I can provide logs or anything you like.

EnriqueBet commented 6 years ago

I have been struggling with this issue over a month!! But today I manage to solve it, apparently, the only thing that I did was to reinstall the kernel-devel library. After that, I was able to run again, primus and optirun. I suspect that when an update is done on our computer, kernel-devel is not automatically updated and i think some of us have this problem. So try:

$ sudo dnf reinstall kernel-devel

See if that work for you also! Hope this helps anyone!