Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nvidia module 340.65 fails to compile on Fedora 21 with Kernel 3.19 [no secure boot] #659

Closed
yourkidding opened this issue May 3, 2015 · 21 comments
Assignees

Comments

@yourkidding
Copy link

Hello everyone!!

This issue is slightly driving me insane. But first things first: I am not a newbee to fedora, experimented with it since f18 and using f21 right now to finally get rid of windows yeahy. I am NOT a computer scientist, just a casual linux user understanding bash and stuff. So usually I search for a solution online (or ask a friend). This time the only answer I got was "post it online". So I am here, looking for help :)

Thank you all in advance!!!!!!!!

system:
Fedora 21
MSI Notebook A6203 [without secure boot]
Intel Core i3-370M
Nvidia Geforce 310M / 1GB DDR3

This issue doesn't seam to be like #656 or #632, although it is about the same kernel-version.

What I did to get my graphics card running:
  1. I followed all steps on the bumblebee site for fedora and installed the NVIDIA proprietary drivers with a specific version, based on my graphics card "bumblebee-nvidia-340.65".

  2. rebooted

  3. run glxspheres

    [noway@localhost ~] $ optirun glxspheres
    [ 2306.251504] [ERROR]The Bumblebee daemon has not been started yet or the socket path
    /var/run/bumblebee.socket was incorrect.
    [ 2306.251612] [ERROR]Could not connect to bumblebee daemon - is it running?

  4. sudo bumblebee-nvidia --debug

    --force compile selected via /etc/sysconfig/nvidia/compile-nvidia-driver
    --debug mode selected.
    Building NVIDIA video drivers: Creating directory NVIDIA-Linux-x86_64-340.65
    Verifying archive integrity... OK
    Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 >
    340.65.................................................................................................................................................
    .............................................................................

    ERROR: Unable to build the NVIDIA kernel module.

    ERROR: Installation has failed. Please see the file
    '/var/log/nvidia-installer.log' for details. You may find suggestions on
    fixing installation problems in the README available on the Linux driver
    download page at www.nvidia.com.

                 [FAILED]
    
  5. On behalf of a friend I checked and installed (32 + 64 bit): kernel-tools, kernel-tools-libs, kernel-tools-libs-devel, dkms-2.2.0.3-30.git.7c3e7c5.fc21.noarch (-> was already installed).
    I removed bumblebee and reinstalled, rebooted ... and it still didn't work... so our guess was, it issue might be solved in a few days with another update. We waited for three weeks to post it on github.

  6. additional info:

    $ uname -a
    Linux localhost.localdomain 3.19.5-200.fc21.x86_64 Complete rework of building #1 SMP Mon Apr 20 19:51:56 UTC 2015
    x86_64 x86_64 x86_64 GNU/Linux

and the log file: http://pastebin.com/JctguGdM
@gsgatlin
Copy link

gsgatlin commented May 3, 2015

@yourkidding I think the problem here is the version of bumblebee-nvidia.
it should be bumblebee-nvidia-346.47-1.fc21.x86_64. So yum update or dnf update to that version. Then reboot.

@yourkidding
Copy link
Author

yum-updated to bumblebee-nvidia-346.47-1.fc21.x86_64, rebooted and got the same issue:

#optirun glxspheres
[ 277.964715] [ERROR]The Bumblebee daemon has not been started yet or the socket path /var/run
/bumblebee.socket was incorrect.
[ 277.964770] [ERROR]Could not connect to bumblebee daemon - is it running?

@gsgatlin
Copy link

gsgatlin commented May 3, 2015

ok. Can you paste your logs to pastebin or similar site? and post the links here.

Did it ever work or is this a recent problem?

@yourkidding
Copy link
Author

Install log with bumblebee-nvidia-340.65 http://pastebin.com/JctguGdM
-> my problem in line 112: ERROR: Unable to build the NVIDIA kernel module.
(I also updated the initial post with this link)

@gsgatlin: It worked in f18 and also about a week ago in windows7 (dual boot)
Install log with bumblebee-nvidia-346.47-1.fc21.x86_64 http://pastebin.com/se7UBaVa
-> the second log file tells to install the to the 340.XX legacy driver

@yourkidding yourkidding changed the title Nvidia module 340.65 fails to compile on Fedora 21 with Kernel 3.19 Nvidia module 340.65 fails to compile on Fedora 21 with Kernel 3.19 [no secure boot] May 3, 2015
@gsgatlin
Copy link

gsgatlin commented May 3, 2015

Ok. Try this...

Go to

http://www.nvidia.com/Download/driverResults.aspx/81761/en-us

and download

NVIDIA-Linux-x86_64-340.76.run

as root

mv /etc/sysconfig/nvidia/NVIDIA-Linux-x86_64-346.47.run

somewhere else like /root/

Then copy

NVIDIA-Linux-x86_64-340.76.run

to

/etc/sysconfig/nvidia/

Then reboot and see if that works any better. Rebooting may not be required since the module didn't load but better to be on the safe side.

@yourkidding
Copy link
Author

wow. something else happened! this seems to be a step in the right direction

$optirun glxspheres
Polygons in scene: 62464
Xlib: extension "GLX" missing on display ":8".
ERROR (603): Could not obtain RGB visual with requested properties

Should I remove everything and start it all again?
AND: What did I do wrong in the first place? Just messed up driver versions by not removing everything properly?

@gsgatlin
Copy link

gsgatlin commented May 3, 2015

Its not that you did anything wrong. If it can be made to work the bumblebee-nvidia package will have be changed. But lets see if it can actually be made to work before making changes like creating another yum repo.

Can you post the logs

/var/log/messages

/var/log/Xorg.8.log

and the output from

bumblebee-nvidia --check

On pastebin or similar site after trying to run the demo program with optirun.

does changing selinux from

enforcing to permissive or disabled help? Is the package "kernel-devel" installed?

@gsgatlin
Copy link

gsgatlin commented May 3, 2015

Oh,, also, can you provide the output from

lspci | grep VGA

Thanks,

@yourkidding
Copy link
Author

the package kernel-devel is installed.

/var/log/messages http://pastebin.com/JCJE3wP0

/var/log/Xorg.8.log http://pastebin.com/TR1zhASF

bumblebee-nvidia --check http://pastebin.com/vCJXn6ZL

lspci | grep VGA http://pastebin.com/Kw4ypkhd

And woohooo! I booted with Selinux disabled and optirun glxspheres worked!! Thank you so much! Could this have been the cause after all?

-> And can I make it work without permanently disabling Selinux?

@gsgatlin
Copy link

gsgatlin commented May 5, 2015

Hello. Sorry I did not get back to you until today. I was sick yesterday...

So the problem here is that I did not take into account laptops that do not work with 346.47 driver.

Your idea to try an older version was along the correct path. But version 340.65 probably cannot be made to work with newer kernels. Which is the reason why nvidia makes legacy drivers on their downloads page.

In the past, other people have asked that I make a "Short Lived Branch version" of my drivers package.

That did not work out too well since it was hard for me to keep up with such things. I just always used the "Long Lived Branch version" on my own laptops.

So maybe a better solution would be to have an "unmanaged" version. It would include the shell script and systemd unit files. and selinux policy module. But it would be up to the end users to download the correct "blob" and place it into /etc/sysconfig/nvidia/ themselves. For you that would mean having to download

"Latest Legacy GPU version (340.xx series)"

and then place it there yourself.

Do you think that solution would work for you?

As for the selinux errrors, it would be difficult for me to troubleshoot that. So for now I would suggest using selinux in permissive mode. If that doesn't work I would suggest disabling selinux for now.

It may be that the selinux module I made for fedora 22 will help. I can include that in my "unmanaged" bumblebee-nvidia assuming that idea would work for you. Then you could test it and see if there is any improvement. selinux has been making things hard for bumblebee lately. I think they are adding a lot of new policies that keep interfering with bumblebee's normal operations.

Let me know what you think about a "unmanaged" version of bumblebee-nvidia?

Also, I probably cannot get to making that unmanaged version for a few days. Today I have to push out an update to VirtualGL and I have to get it done before the outage starts in the fedora build system later today if possible.

Thanks.

@yourkidding
Copy link
Author

Thanks for your help!!

And having unmanaged version would be fine! So every owner of a legacy nvidia card could look for a matching driver without worrying about newer kernel modules.

I dont know if you got my point. my english may be not the best ^^ but I am 100 % for an unmanaged version.

@gsgatlin
Copy link

Hello. I apologize for the delay in getting to this.

So you can

yum remove bumblebee-nvidia

yum remove bumblebee-nonfree-release

yum --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree-unmanaged/fedora21/noarch/bumblebee-nonfree-unmanaged-release-1.2-1.noarch.rpm

yum install bumblebee-nvidia

Then cp the proper blob to
/etc/sysconfig/nvidia/

Then reboot.

Let me know if that worked for you?

@yourkidding
Copy link
Author

sudo yum -y install bumblebee-nvidia
Geladene Plugins: langpacks
Abhängigkeiten werden aufgelöst
--> Transaktionsprüfung wird ausgeführt
---> Paket bumblebee-nvidia.noarch 0:1.0-2.fc21 markiert, um installiert zu werden
--> Abhängigkeit bumblebee wird für Paket bumblebee-nvidia-1.0-2.fc21.noarch verarbeitet
--> Abhängigkeitsauflösung beendet
Fehler: Paket: bumblebee-nvidia-1.0-2.fc21.noarch (bumblebee-nonfree-unmanaged)
Benötigt: bumblebee
Sie können versuchen, mit --skip-broken das Problem zu umgehen.

** translation **

--> paket bumblebee needed

doesn't it recognize the nonfree version? what did I do wrong?

Also: As I updated the kernel, optirun didnt work anymore. Should I try to use F22 now?

@gsgatlin
Copy link

gsgatlin commented Jun 7, 2015

On a fresh fedora 21 install:

[root@localhost ~]# yum -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/fedora21/noarch/bumblebee-release-1.2-1.noarch.rpm ; yum -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree-unmanaged/fedora21/noarch/bumblebee-nonfree-unmanaged-release-1.2-1.noarch.rpm

[root@localhost ~]# yum remove bumblebee-nonfree-release

[root@localhost ~]# yum install bumblebee-nvidia bbswitch primus kernel-devel

http://pastebin.com/8TdNf0ju

After its finished download a appropriate .run file and place it into /etc/sysconfig/nvidia/

And then reboot.

So It looks like maybe you are missing the bumblebee repo. Since yum can't find bumblebee.

It is installed via

yum -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/fedora21/noarch/bumblebee-release-1.2-1.noarch.rpm

It should work for both fedora 21 and fedora 22. I tested it on a spare laptop I own just now with fedora 21 and its working. But I downloaded a different version then you since I can't use the legacy drivers.
(346.72 is what I tested it with)

You may wish to try yum clean all

to clean out any metadata.

@yourkidding
Copy link
Author

Thanks for your help so far, but again it is not working. I believe it was the last kernel update (f21), that broke the fixed situation. I can't remember changing something else, influencing the system.

  • updated the system
  • set SELINUX to permissive mode
  • I tried to use the unmanaged version on a fresh f22 install, following your instructions
  • moved the .run file to /etc/sysconfig/nvidia/ (for me, it was NVIDIA-Linux-x86_64-340.76.run)
  • installed 'kernel-devel'
$ optirun glxspheres64
[  465.449192] [ERROR]The Bumblebee daemon has not been started yet or the socket path /var/run/bumblebee.socket was incorrect.
[  465.449261] [ERROR]Could not connect to bumblebee daemon - is it running?

The logs
/var/log/messages http://pastebin.com/A45BPYx9

/var/log/Xorg.8.log -> empty file

bumblebee-nvidia --check http://pastebin.com/9RykjVyR

lspci | grep VGA http://pastebin.com/aPDSft86

@gsgatlin
Copy link

gsgatlin commented Jun 8, 2015

What happens if you run

bumblebee-nvidia --debug

as root or with sudo? Does it compile ok?

@yourkidding
Copy link
Author

It fails to compile. logfile /var/log/nvidia-installer.log pasted here http://pastebin.com/1tap75f6

$ sudo bumblebee-nvidia --debug
[sudo] password for noway: 
--force compile selected via /etc/sysconfig/nvidia/compile-nvidia-driver
--debug mode selected.
Building NVIDIA video drivers: Creating directory NVIDIA-Linux-x86_64-340.76
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.76.................................................................................................................................................................................................................................

ERROR: Unable to build the NVIDIA kernel module.


ERROR: Installation has failed.  Please see the file
       '/var/log/nvidia-installer.log' for details.  You may find suggestions
       on fixing installation problems in the README available on the Linux
       driver download page at www.nvidia.com.

                   [FAILED]

@gsgatlin
Copy link

gsgatlin commented Jun 8, 2015

I think the problem here is that the .run file you downloaded does not (yet) support the 4.0 kernel in fedora 22/21. So its "NVidia's fault" I guess.

You could try adding this patch:

http://fpaste.org/230141/33795643/

Which I had in the driver package several weeks ago.

or this one:

https://devtalk.nvidia.com/default/topic/813458/linux-4-0-rc1-346-47-build-error-_cr4-functions-fix/

Create a file ending in .patch (like kernel4.patch) and paste the contents into that file. Then copy the kernel4.patch file into /etc/sysconfig/nvidia/

Then re-run the script again with --debug and see if that helped.

The second patch from devtalk.nvidia.com may need to be altered slightly since the patch uses -p1 in the script and the patch on the forums assumes -p0.

Sorry I can't be much more help then that since I don't own hardware old enough to require that version of the driver. (NVIDIA-Linux-x86_64-340.76.run) So I would have no way to test whether or not it worked.

If you have trouble making the patch from the devtalk forum work and the first patch doesn't work I could try to reformat it for your situation. Let us know if that helped to get it to compile.

@yourkidding
Copy link
Author

It totally worked this time! thank you, AGAIN!

  • used the first patch
  • compiled it
  • tested it -> works like a charm
bumblebee-nvidia --debug
--force compile selected via /etc/sysconfig/nvidia/compile-nvidia-driver
--debug mode selected.
Building NVIDIA video drivers: Creating directory NVIDIA-Linux-x86_64-340.76
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.76.................................................................................................................................................................................................................................
(Patch is indented 4 spaces.)
patching file kernel/nv-pat.c
                   [  OK  ]

@gsgatlin
Copy link

gsgatlin commented Jun 8, 2015

Cool. Glad its working. I suspect that the next time a new legacy driver for "Latest Legacy GPU version (340.xx series)" comes out it will probably work in kernel 4.0 without needing a patch.

@ArchangeGabriel
Copy link
Member

OK, closing since this is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants