[SOLVED] Slackware 15, nvidia-legacy340-driver, X server not start
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just hang it there and do your thing. LuckyCyborg has his point of view and makes some good points, but it is your system and sometimes with Slackware you might break things while learning it, if you are cool with that then just keep going.
Why so? I am 41, and try using Linux on desktop sine 2016. May be i stupid but why why Slackware is so complex compare to other distros? Why here no clear manuals?
May I suggest you have answered your own question. Sure Linux is "just a kernel" but distros ARE different and we grow used to how any one of them we use for a long period of time and everything different seems complex and clumsy. This is not only true of distros but of WM/DEs. This is especially true when the distro you grow used to is so-called "User Friendly" which translates to "We will do it for you" which should add "..even though we have barely a clue how you want to use your PC".
Mission Statement in Slackware states Patrick doesn't assume use case. Slackware does very little for you except giving you the power to make it your own, even to break it, to be an actual Administrator. It doesn't come easy. After having been spoon-fed for years, it's hard learning to feed yourself, but it is obviously a valuable skill to learn if you want to be in charge of your own PC.
I'm guessing you want both Multilib and the proprietary nvidia driver because you like to run some games and many games are still 32 bit. Lucky Cyborg is an educated and successful admin, but maybe he doesn't need Multilib or proprietary drivers. I do. I game. I have never had serious problems with Multilib nor nvidia drivers and I've been using Slackware for over 20 years as my Main. Granted, multilib has only existed since version 14.0 IIRC, and for 14.0 I just chose to use the 32 bit version... BUT, by the time 14.2 was released, multilib at that time, 6 years ago, convinced me to go 64bit with Multilib. I have only had 1 instance of trouble and that was my own fault for being new to slackpkg and slackpkg+. I fixed it and haven't had a single problem since on 4 PCs and 2 dozen still working Slackware installs.
I very much prefer installing nvidia drivers from Runlevel 3 via the nvidia-foo.run installer because of the install time checks and messages if nothing else, but your way is fine. Maybe try both and see what you prefer. BTW I always allow nvidia installer to do the 32bit installs too, even on pure 64bit systems... no problems.
Let me suggest that you download the nvidia-foo.run installer and run "NVIDIA-foo.run --extract-only" so you can read the documentation at your leisure. There is a world of information in there about many subjects including important and useful adjustments and tweaks.
Also, I forget the name, but one member here has modified the 34x driver to accommodate new kernels. That's one possibility but I suggest looking for at least a 390x driver. Just FTR in one of my PCs I was running an old GT 760 Ti GPU and I moved it to another machine. I substituted a much older and far less potent GT 640 but I forgot I still had the driver for the GTX 760 installed in that multilib Slackware system. It worked just fine and is still working months later even though that driver is not listed for the GT 640 by nvidia. If for some reason it fails at some point, it's easy to fix because I boot to Runlevel 3 and don't depend on booting to X.
What might be a helpful solution for someone hungry to learn, assuming you have either a Liveslak on USB or 30GB or so of drive space to install a base system, install two systems, one stock and one for experimentation and backups. It can make life and learning a lot easier and more fun.
That's because as LuckyCyborg stated, the nvidia kernel SlackBuild is missing some arch patches. As a courtesy I made you a SlackBuild that includes that patch. But first make sure you have done these steps. Now that you have multilib working you need to do these steps...
1) You need to blacklist nouveau for the nvidia drivers to work. Easiest way to do this is to use the blacklist package Pat provides.
2) Grab the nvidia kernel slackbuild I made for you here.
3) unpack it and run it as you would any other slackbuild ./nvidia-legacy340-kernel.SlackBuild. This time the kernel modules should actually be built and you "should" have a working nvidia kernel package.
4) install the nvidia driver package from SBo with 32bit support.
5) after both are installed run nvidia-xconfig to create your necessary xorg.conf file.
6) reboot and the nvidia driver should be working now.
bash-5.1# patch -p0 < 0007-kernel-5.15.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c
|--- NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c 2021-11-06 20:08:18.779739237 +0200
|+++ NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c 2021-11-06 20:42:13.443288819 +0200
--------------------------
File to patch:
Code:
bash-5.1# patch -p0 < 0001-kernel-5.7.patch
can't find file to patch at input line 26
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 2154cc447a2377cfd60a7b7c5b619e689ebf71b1 Mon Sep 17 00:00:00 2001
|From: graysky <graysky@archlinux.us>
|Date: Thu, 22 Oct 2020 06:58:53 -0400
|Subject: [PATCH 1/3] kernel-5.7
|
|credit: https://gitlab.manjaro.org/packages?utf8=%E2%9C%93&filter=nvidia-340xx
|---
| kernel/Makefile | 5 +
| kernel/conftest.sh | 81 +++++++++++++
| kernel/dkms.conf | 8 +-
| kernel/nv-drm.c | 229 ++++++++++++++++++++++++++++++++++-
| kernel/nv-linux.h | 49 ++++++++
| kernel/nv-procfs.c | 20 +++
| kernel/nv-time.h | 9 +-
| kernel/nv.c | 2 +-
| kernel/os-interface.c | 8 +-
| kernel/uvm/Makefile | 1 +
| kernel/uvm/conftest.sh | 4 +
| kernel/uvm/nvidia_uvm_lite.c | 29 ++++-
| 12 files changed, 431 insertions(+), 14 deletions(-)
|
|diff --git a/kernel/Makefile b/kernel/Makefile
|index 125a690..2597080 100644
|--- a/kernel/Makefile
|+++ b/kernel/Makefile
--------------------------
File to patch:
bash-5.1# patch -p0 < 0007-kernel-5.15.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c
|--- NVIDIA-Linux-x86_64-340.108-old/kernel/nv-drm.c 2021-11-06 20:08:18.779739237 +0200
|+++ NVIDIA-Linux-x86_64-340.108-new/kernel/nv-drm.c 2021-11-06 20:42:13.443288819 +0200
--------------------------
File to patch:
Code:
bash-5.1# patch -p0 < 0001-kernel-5.7.patch
can't find file to patch at input line 26
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 2154cc447a2377cfd60a7b7c5b619e689ebf71b1 Mon Sep 17 00:00:00 2001
|From: graysky <graysky@archlinux.us>
|Date: Thu, 22 Oct 2020 06:58:53 -0400
|Subject: [PATCH 1/3] kernel-5.7
|
|credit: https://gitlab.manjaro.org/packages?utf8=%E2%9C%93&filter=nvidia-340xx
|---
| kernel/Makefile | 5 +
| kernel/conftest.sh | 81 +++++++++++++
| kernel/dkms.conf | 8 +-
| kernel/nv-drm.c | 229 ++++++++++++++++++++++++++++++++++-
| kernel/nv-linux.h | 49 ++++++++
| kernel/nv-procfs.c | 20 +++
| kernel/nv-time.h | 9 +-
| kernel/nv.c | 2 +-
| kernel/os-interface.c | 8 +-
| kernel/uvm/Makefile | 1 +
| kernel/uvm/conftest.sh | 4 +
| kernel/uvm/nvidia_uvm_lite.c | 29 ++++-
| 12 files changed, 431 insertions(+), 14 deletions(-)
|
|diff --git a/kernel/Makefile b/kernel/Makefile
|index 125a690..2597080 100644
|--- a/kernel/Makefile
|+++ b/kernel/Makefile
--------------------------
File to patch:
You did this wrong. There is what you should do:
Simplest way: grab the tarball prepared by @Daedra for you, extract it and build your package.
Somewhat harder way: extract this SBo tarball, and copy all Arch Linux patches into sub-directory patches (overriding the existent ones) then build the package.
Seriously you did not noticed that the SBo's SlackBuild ships the first 5 patches from that AUR tarball?
Last edited by LuckyCyborg; 05-07-2022 at 04:56 PM.
That's because as LuckyCyborg stated, the nvidia kernel SlackBuild is missing some arch patches. As a courtesy I made you a SlackBuild that includes that patch. But first make sure you have done these steps. Now that you have multilib working you need to do these steps...
1) You need to blacklist nouveau for the nvidia drivers to work. Easiest way to do this is to use the blacklist package Pat provides.
2) Grab the nvidia kernel slackbuild I made for you here.
3) unpack it and run it as you would any other slackbuild ./nvidia-legacy340-kernel.SlackBuild. This time the kernel modules should actually be built and you "should" have a working nvidia kernel package.
4) install the nvidia driver package from SBo with 32bit support.
5) after both are installed run nvidia-xconfig to create your necessary xorg.conf file.
6) reboot and the nvidia driver should be working now.
Woow! Cool! How you do this magic? Can you teach me? You add AUR patches and edit slackbuild file? Or you just add new patches to patch dir of nvidia-legacy340-kernel without edit slackbuild? I do the same but have errors durig assembling package. Why did you succeed? https://ibb.co/FXR9c8k
so to apply the arch patches that LuckyCyborg found it was as simple downloading the patches into the patch directory because the SlackBuild will automatically apply the patches using the for loop.
I avoid the NVidia crapware like a devil the churches.
Bump) Offtop) Can you you explain why linux community hate nvidia? A am also love AMD too for free and opensource politics. But now many software and games developers is nvidia oriented.
Here example https://developer.blender.org/T96614
Can you you explain why linux community hate nvidia?
Because their binary module taints the kernel. That said, we must now also mention that things are going in the right directions since nVidia has opensourced drivers for newer cards, but it will be a long time before those drivers have found their way into the stock kernels and support all cards nVidia sell.
Any bug anywhere in the kernel might require access to the entire kernel source to debug. If the kernel is tainted by a binary module only the provider of the binary module has access to the entire kernel source. If the kernel is tainted by binary modules from different providers no one has access to the entire kernel source.
There is also a legal aspect of things. Every software has some license which describes the terms on how someone might use the software. The provider has the right to set any term they want, the user has the choice to use or not use the software with these terms. It is like buying a car, a buyer can choose or not choose to buy an expensive car that he wants, he cannot choose to only give a smaller amount of money to the car seller for the car.
The Linux kernel comes with a GPL license. This is a free license and means that anyone who uses a Linux kernel has the right to get the source of the kernel, modify the source and use that modified version instead. The GPL license also spreads to anything linked to that code, kernel modules get linked to the kernel. By linking a binary module to a GPL kernel you as a user are violating the GPL license and have pirated the Linux kernel with a copyright infringement.
Bump) Offtop) Can you you explain why linux community hate nvidia? A am also love AMD too for free and opensource politics. But now many software and games developers is nvidia oriented.
Here example https://developer.blender.org/T96614
The latest Xorg server release is 21.1.3 even the slackware-current yet ships the version 1.20.14 .
However, it' a safe bet that the Xorg server will be updated before the Slackware 15.1 will be release.
And guess what? The latest Xorg server compatible with your legacy and EOLed 340.x blob is the version series 1.20.x and this means that almost certainly you will not be capable to use your NVIDIA graphics card and your proprietary Blob (together with a X11 session) with the next release of Slackware.
No matter how "many software and games developers is nvidia oriented" you will see a glorious 80x25 console, and nothing more, when you will try to update to (or install) Slackware 15.1 unless you will use the slower-than-the-snail Nouveau driver or you will buy a newer graphics card.
That's WHY I despise the NVIDIA junkware: the programmed obsolescence under Linux.
Last edited by LuckyCyborg; 06-14-2022 at 03:03 AM.
As regards 340 version, "nvidia-legacy340-driver" SBo package recently marked as "unmaintained" taints slackware-15.0 file system. It has to be re-written to suit the new slack, cause it overwrites various system files.
I saw an interesting solution by LuckyCyborg for 390 driver that moreover doesn't use the ugly nvidia-switch script anymore.
Wondering if it could be the right way also for 340 legacy driver. Kernel side as reported above along this topic Arch community seem to have collect a good series of patches useful for slackers too.
For now if you want to use nvidia-legacy340 I tried it by apply arch patches and use them within the kernel side slackbuild. For driver, I just excluded libOpenCL installation line, but it's not enough... the dirty way I tested it's by running current slackbuild as is and then reinstall ocl-icd package to restrore some system files overwritten by nvidia package.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.