LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-07-2022, 02:32 PM   #31
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,704

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386

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.

Last edited by Daedra; 05-07-2022 at 02:34 PM.
 
Old 05-07-2022, 02:34 PM   #32
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,565

Rep: Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427
Quote:
Originally Posted by Procenko View Post
So what is trick?
First, be sure that in /etc/fstab you have this line:
Code:
debugfs   /sys/kernel/debug  debugfs  defaults   0 0
IF NOT, add it and reboot.

Finally, show me the output of this command:
Code:
cat /sys/kernel/debug/dri/0/pstate
BTW, this cat command should be executed as root.

Last edited by LuckyCyborg; 05-07-2022 at 02:50 PM.
 
1 members found this post helpful.
Old 05-07-2022, 03:49 PM   #33
Procenko
Member
 
Registered: May 2022
Posts: 144

Original Poster
Rep: Reputation: 2
So. After all. Fresh Full os install, upgrade, install multilib
then no luck to combine nvidia 340 kernel

https://pastebin.com/raw/cTxBXrD0
 
Old 05-07-2022, 04:05 PM   #34
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,565

Rep: Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427
Quote:
Originally Posted by Procenko View Post
So. After all. Fresh Full os install, upgrade, install multilib
then no luck to combine nvidia 340 kernel

https://pastebin.com/raw/cTxBXrD0
Did you bothered to look into that AUR tarball indicated by me in a previous post? Nope? OK.
 
1 members found this post helpful.
Old 05-07-2022, 04:36 PM   #35
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,808

Rep: Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446
Quote:
Originally Posted by Procenko View Post
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.

Last edited by enorbet; 05-07-2022 at 04:37 PM.
 
2 members found this post helpful.
Old 05-07-2022, 04:41 PM   #36
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,704

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
Quote:
Originally Posted by Procenko View Post
So. After all. Fresh Full os install, upgrade, install multilib
then no luck to combine nvidia 340 kernel

https://pastebin.com/raw/cTxBXrD0
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.
Code:
wget https://slackware.osuosl.org/slackware64-15.0/extra/xf86-video-nouveau-blacklist/xf86-video-nouveau-blacklist-1.0-noarch-1.txz
installpkg xf86-video-nouveau-blacklist-1.0-noarch-1.txz
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.
 
2 members found this post helpful.
Old 05-07-2022, 04:48 PM   #37
Procenko
Member
 
Registered: May 2022
Posts: 144

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by LuckyCyborg View Post
Did you bothered to look into that AUR tarball indicated by me in a previous post? Nope? OK.
Yes. I am try patched manually NVIDIA-Linux-x86_64-340.108-no-compat32 but i have errors

https://aur.archlinux.org/packages/nvidia-340xx
https://forums.developer.nvidia.com/...-13-4-14/54154


Code:
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:
 
Old 05-07-2022, 04:54 PM   #38
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,565

Rep: Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427
Quote:
Originally Posted by Procenko View Post
Yes. I am try patched manually NVIDIA-Linux-x86_64-340.108-no-compat32 but i have errors

https://aur.archlinux.org/packages/nvidia-340xx
https://forums.developer.nvidia.com/...-13-4-14/54154


Code:
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.
 
1 members found this post helpful.
Old 05-07-2022, 05:19 PM   #39
Procenko
Member
 
Registered: May 2022
Posts: 144

Original Poster
Rep: Reputation: 2
Smile

Quote:
Originally Posted by Daedra View Post
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.
Code:
wget https://slackware.osuosl.org/slackware64-15.0/extra/xf86-video-nouveau-blacklist/xf86-video-nouveau-blacklist-1.0-noarch-1.txz
installpkg xf86-video-nouveau-blacklist-1.0-noarch-1.txz
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

Last edited by Procenko; 05-07-2022 at 05:25 PM.
 
Old 05-07-2022, 05:26 PM   #40
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,704

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
Quote:
Originally Posted by Procenko View Post
Woow! Cool! How you do this magic? Can you teach me? You add AUR patches and edit slackbuild file?
https://ibb.co/FXR9c8k
Basically yes, but with the 340 nvidia-kernel SlackBuild it is even easier. If you look at the script the patches get applied with a for loop

Code:
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $SRCNAM
sh $CWD/$SRCNAM.run --extract-only || exit 1
cd $SRCNAM || exit 1
chown -R root:root .
find -L . \
 \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  -o -perm 511 \) -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

for i in $CWD/patches/* ; do patch -p1 < $i ; done

(cd kernel || exit 1
  make SYSSRC=$KERNELPATH module || exit 1
  cd uvm
  sed -i "s|-O2$|-O2 -Wno-error=incompatible-pointer-types|" Makefile
  make SYSSRC=$KERNELPATH module || exit 1
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.

the patches that were needed were
https://aur.archlinux.org/cgit/aur.g...h=nvidia-340xx
https://aur.archlinux.org/cgit/aur.g...h=nvidia-340xx
 
2 members found this post helpful.
Old 05-07-2022, 06:16 PM   #41
Procenko
Member
 
Registered: May 2022
Posts: 144

Original Poster
Rep: Reputation: 2
Smile

Daedra,LuckyCyborg
Thanks for magic!
 
Old 06-13-2022, 07:31 PM   #42
Procenko
Member
 
Registered: May 2022
Posts: 144

Original Poster
Rep: Reputation: 2
Question

Quote:
Originally Posted by LuckyCyborg View Post
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
 
Old 06-14-2022, 01:39 AM   #43
henca
Senior Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 1,004

Rep: Reputation: 675Reputation: 675Reputation: 675Reputation: 675Reputation: 675Reputation: 675
Quote:
Originally Posted by Procenko View Post
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.

regards Henrik
 
3 members found this post helpful.
Old 06-14-2022, 02:26 AM   #44
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,565

Rep: Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427Reputation: 3427
Quote:
Originally Posted by Procenko View Post
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.
 
1 members found this post helpful.
Old 06-14-2022, 02:49 AM   #45
joenew
Member
 
Registered: Mar 2010
Distribution: slackware 15.0 64bit
Posts: 190

Rep: Reputation: 23
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] current and nvidia-legacy340-kernel Question re 10-nvidia.conf file MDKDIO Slackware 6 12-16-2020 01:56 PM
[SOLVED] SBo: nvidia-legacy340-kernel: nvidia.ko failed to build lopuh Slackware 3 03-03-2019 12:21 PM
[SOLVED] Slackware: need 14.2 nvidia-legacy340-driver because nouveau.modeset=0 SLOW video 02Victor Slackware 9 12-16-2017 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration