You are not logged in.

#1 2014-02-20 08:18:38

sibislaw
Member
Registered: 2014-02-20
Posts: 7

Problems with nvidia graphics driver after kernel recompilation

Hi everyone. I have problem with graphics driver after kernel recompilation.
So i recompiled kernel using ABS (arch build system) and my new kernel dont recognize graphics card,
i have only access to 3 resolutions and no graphics acceleration (3d app crashes).

Now i have 2 kernels in boot menu.

1)
Linux arch 3.12.9-2-ARCH #1 SMP PREEMPT Fri Jan 31 10:22:54 CET 2014 x86_64 GNU/Linux  <- this is "old" kernel, on which graphics works good

and lspci -v for this kernel (only important for the problem lines pasted)

        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia

2) second kernel is the same version, but in lspci -v

        Kernel modules: nouveau

And that is the problem. Kernel side has only nouveau drivers. I cant use nouveau drivers on my system because
it cause crashes after random period of time - GPU LOCKUP.

I want to use orginal nvidia drivers in new kernel, but the new kernel has no option in xconfig to compile with nvidia
orginal drivers. I have only nvidia framebuffer option. How can i compile my kernel to support orginal nvidia drivers ?

Is there any simple method in ABS?

Last edited by sibislaw (2014-02-20 08:20:14)

Offline

#2 2014-02-20 11:10:43

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Problems with nvidia graphics driver after kernel recompilation

You need the nvidia packages for your kernel (don't use the same name as the official nvidia packages):
inspire you with the linux-lts kernel and its associated nvidia packages.

Offline

#3 2014-02-20 12:39:22

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: Problems with nvidia graphics driver after kernel recompilation

Offline

#4 2014-02-20 14:07:47

sibislaw
Member
Registered: 2014-02-20
Posts: 7

Re: Problems with nvidia graphics driver after kernel recompilation

How can i add this nvidia package https://wiki.archlinux.org/index.php/NV … tom_kernel to my kernel after compiling it ?

Offline

#5 2014-02-20 14:41:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems with nvidia graphics driver after kernel recompilation

Have you triad adjusting https://projects.archlinux.org/svntogit … nvidia-lts to your situation, as berbae suggested?

Offline

#6 2014-02-21 06:46:34

sibislaw
Member
Registered: 2014-02-20
Posts: 7

Re: Problems with nvidia graphics driver after kernel recompilation

My knowledge is to small. I have now directory with my kernel sources, PKGBUILD etc. This directory was created by abs. I make steps from tutorial https://wiki.archlinux.org/index.php/Ke … ild_System.

Can you tell me how can i add this nvidia module to my sources in abs directory ? Sorry but i dont uderstand these tutorials to well.

Offline

#7 2014-02-21 09:36:57

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Problems with nvidia graphics driver after kernel recompilation

In your first post you said that you already built your kernel using the ABS; and now you seem to tell that you just begin to build your kernel from the ABS PKGBUILD. This is not very clear.

Have you already built your kernel or not? And how did you proceed and with what result?
Tell the package name you created and the reason you want to recompile the kernel.
Did you install it with pacman?

Now for the Nvidia driver kernel module, you don't need to add it to the kernel source tree; the module will be generated when you build the nvidia package using the ABS too and modifying the PKGBUILD copied from there.
You need at least a 'nvidia-custom' package; the 'nvidia-utils' package doesn't seem to necessitate a special build, judging from the linux-lts kernel and its associated 'nvidia-lts' package.

When you post, say precisely what commands you used and the exact result from them.
Don't replace that with human sentences, because this doesn't show well what you exactly have done.

Say precisely how you build your packages from the ABS, to be sure it's correct.

Good luck.

Offline

#8 2014-02-21 13:26:40

sibislaw
Member
Registered: 2014-02-20
Posts: 7

Re: Problems with nvidia graphics driver after kernel recompilation

What i have done (in my home folder):

1. ABSROOT=. abs core/linux
2. goto newly created core/linux directory
3. edited PKGBUILD  for xconfig and custom kernel name
4. makepkg, xconfiged kernel to support CAN sockets
5. installed kernel and headers with pacman -U .....

And my question is, where (which step) i need to add nvidia module sources to kernel ? Nouveua i can add is step 4 (in xconfig). But in XConfig there is no option for nvidia prioprietary drivers.

Offline

#9 2014-02-21 13:32:43

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems with nvidia graphics driver after kernel recompilation

Have you tried adjusting nvidia-lts PKGBUILD for your kernel?

Offline

#10 2014-02-21 15:45:03

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Problems with nvidia graphics driver after kernel recompilation

sibislaw wrote:

And my question is, where (which step) i need to add nvidia module sources to kernel ? Nouveua i can add is step 4 (in xconfig). But in XConfig there is no option for nvidia prioprietary drivers.

I already have answered this in my previous post: you need to build a 'nvidia-custom' package for your kernel using the ABS;
you can look at how it is done for the 'linux-lts' kernel and its associated 'nvidia-lts' package.

Offline

#11 2014-02-21 19:03:00

sibislaw
Member
Registered: 2014-02-20
Posts: 7

Re: Problems with nvidia graphics driver after kernel recompilation

I still dont understand how i am going to make one kernel from two packages (kernel package + nvidia package).

Offline

#12 2014-02-21 19:04:38

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Problems with nvidia graphics driver after kernel recompilation

You have two packages: nvidia driver and the kernel. What seems to be the problem?

Offline

#13 2014-02-21 22:17:58

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Problems with nvidia graphics driver after kernel recompilation

sibislaw wrote:

I still don't understand how i am going to make one kernel from two packages (kernel package + nvidia package).

I think I understand what bothers you about that:
the kernel comes with a core binary '/boot/vmlinuz-linux...' and many modules placed in /usr/lib/modules/$(uname -r)/; these modules are compiled from the source code of the kernel and are under open source license.
But the Nvidia driver is closed source proprietary code; to be built it needs the header files of the kernel against it it is built, and the closed code from Nvidia.
It cannot be a part of the kernel official modules and so it is placed in the /usr/lib/modules/extramodules-3.xx-ARCH/ where the 'version' file of the kernel is placed. So it uses parts of the kernel code and the closed code from Nvidia; it is an extra module, not included in the kernel; this is why there is another package just for it, apart from the kernel package.
And this is also why there is this line in the dmesg output:
nvidia: module license 'NVIDIA' taints kernel.
Is it clearer for you now?

Last edited by berbae (2014-02-21 22:24:18)

Offline

#14 2014-02-22 20:03:07

sibislaw
Member
Registered: 2014-02-20
Posts: 7

Re: Problems with nvidia graphics driver after kernel recompilation

Yes, now i understand. But...

My question to user "berbae" is: are you talking about nvidia modules installed by pacman ? I have installed nvidia prioprietary drivers by pacman.

My prioprietary nvidia drivers work on old, orginal kernel from arch bang instalation, and on the same system they dont work with new kernel compiled by me from abs sources.

Offline

#15 2014-02-23 10:29:16

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Problems with nvidia graphics driver after kernel recompilation

sibislaw wrote:

are you talking about nvidia modules installed by pacman ?

Yes but there is only one module in the nvidia package.

I have installed nvidia prioprietary drivers by pacman.

I re-post here what I wrote in my post #7

berbae wrote:

When you post, say precisely what commands you used and the exact result from them.
Don't replace that with human sentences, because this doesn't show well what you exactly have done.

What nvidia drivers are you talking about and for what kernel?

My prioprietary nvidia drivers work on old, orginal kernel from arch bang instalation, and on the same system they dont work with new kernel compiled by me from abs sources.

What are you talking about? This is too vague: tell the commands you used, the versions...

If you want to use several kernels, you need a different nvidia package for each one of them:

linux
nvidia

linux-lts
nvidia-lts

linux-custom
nvidia-custom

Each nvidia package will install one kernel extra module compiled against its associated kernel header files.
For the nvidia-custom package, you build it using the ABS and install it with pacman (look at how the nvidia-lts package is made).

I don't know how I can be clearer than that. So I will stop here these explanations.
Good luck.

Last edited by berbae (2014-02-23 10:33:25)

Offline

#16 2014-02-23 13:53:35

sibislaw
Member
Registered: 2014-02-20
Posts: 7

Re: Problems with nvidia graphics driver after kernel recompilation

berbae wrote:

linux-custom
nvidia-custom

Each nvidia package will install one kernel extra module compiled against its associated kernel header files.

I think this is the clue to my problem. I will try tomorrow in work to do this and i'll report back if it's worked. Ok, thanks for help.

Offline

Board footer

Powered by FluxBB