WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Getting kernel files ready for nvidia proprietary drivers installer  (Read 7104 times)

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 179
Hello, everyone. Since the nouveau driver works but is not enough, I decided to try installing the nvidia proprietary driver.
I am currently being filtered by the TinyCore kernel. As I don't have much experience with Linus or TinyCore, I ask for help.

Here is my failed attempt:

I downloaded all equivalent packages present here and the kernel source

I tried to follow the steps mentioned by Juanito

No, you don't need linux-kernel-sources-env to compile kernel modules - it was a way of making things easier, but no longer works due to changes in linux-5.x

This will prepare the kernel source:
Code: [Select]
$ cd linux-5.10.3
$ make mrproper
$ cp ../config-5.10.3-tinycore64 .config
$ make oldconfig
$ make prepare
$ make modules_prepare

But i got a lot of errors
For 14.x x86_64
« Last Edit: May 01, 2023, 10:53:53 AM by CardealRusso »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14828
You can use the compiletc meta extension to download/load all that is commonly required to compile on tinycore.

To prepare the CorePure64-14.x kernel source:
Code: [Select]
tce-load -i compiletc perl5 elfutils-dev ncursesw-dev bc
wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/linux-6.1.2-patched.txz
tar xf linux-6.1.2-patched.txz
wget http://tinycorelinux.net/14.x/x86_64/release/src/kernel/config-6.1.2-tinycore64
cd linux-6.1.2
make mrproper
cp ../config-6.1.2-tinycore64 .config
make oldconfig
make prepare
make modules_prepare

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 179
You can use the compiletc meta extension to download/load all that is commonly required to compile on tinycore.

Hello and thank you, juanito.


I followed all the steps you suggested and was successful. Everything worked.

I just needed to drop multiple copies of the file Module.symvers-6.1.2-tinycore64.gz for the installer to work.

Unfortunately it wasn't enough. The nvidia driver, despite supposedly having compiled successfully, it fails to install.

It's very frustrating that the 410 driver (the last one available in the TCL repository, thanks to coreplayer2) was released just a few months, maybe even days, before my video card became compatible.

Command used
Code: [Select]
sudo /mnt/sdc1/downloads/NVIDIA-Linux-x86_64-525.116.03.run --no-x-check --no-cc-version-check --kernel-source-path /home/tc/Downloads/linux-6.1.2/
log
Code: [Select]
ERROR: Unable to load the kernel module 'nvidia.ko'.  This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if another driver, such as nouveau, is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA device(s), or no NVIDIA device installed in this system is supported by this NVIDIA Linux graphics driver release.

I've tried everything, including several different versions of the installer. nothing works, google results are not very informative and the error itself is very generic and uninformative.
« Last Edit: May 01, 2023, 03:02:09 PM by CardealRusso »

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 179
I also tried this new nvidia open source driver, which is supposedly much easier to install. however, this also generates uninformative errors

https://github.com/NVIDIA/open-gpu-kernel-modules

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11661
Hi CardealRusso
Based on the error message:
... log
Code: [Select]
ERROR: Unable to load the kernel module 'nvidia.ko'.  This happens most frequently when
That part of the message makes it sound like  nvidia.ko  got built.

Quote
Code: [Select]
this kernel module was built against the wrong or improperly configured kernel sources
That seems unlikely. Juanito gave you instructions for TC14.x x86_64.

Quote
Code: [Select]
with a version of gcc that differs from the one used to build the target kernel
I don't think that's it.

Quote
Code: [Select]
or if another driver, such as nouveau, is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA device(s)
This sounds like a possibility. Was Xorg running when you ran this?
Were any of the following drivers loaded:
nv_drv.so, nouveau_drv.so, nouveau.ko.gz

Quote
Code: [Select]
or no NVIDIA device installed in this system is supported by this NVIDIA Linux graphics driver release.
According to the nVidia website, your board is supported by this driver.

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 179
This sounds like a possibility. Was Xorg running when you ran this?
Were any of the following drivers loaded:
nv_drv.so, nouveau_drv.so, nouveau.ko.gz

i tried to install in textmode and nouveau was not installed

about the open kernel drivers. it fails when tried to find something on /lib/modules/6.1.2

Code: [Select]
make -C kernel-open modules_install
make[1]: Entering directory '/home/tc/open-gpu-kernel-modules/kernel-open'
make[2]: Entering directory '/home/tc/open-gpu-kernel-modules/kernel-open'
make[2]: *** /lib/modules/6.1.2-tinycore64/build: No such file or directory.  Stop.
make[2]: Leaving directory '/home/tc/open-gpu-kernel-modules/kernel-open'
make[1]: *** [Makefile:82: modules_install] Error 2
make[1]: Leaving directory '/home/tc/open-gpu-kernel-modules/kernel-open'
make: *** [Makefile:67: modules_install] Error 2

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11661
Hi CardealRusso
Maybe you need to install  linux-6.1_api_headers.tcz ?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14828
You need to create a symlink in /lib/modules/KERNEL named build that points to your prepared kernel source

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 179
You need to create a symlink in /lib/modules/KERNEL named build that points to your prepared kernel source
Hi CardealRusso
Maybe you need to install  linux-6.1_api_headers.tcz ?

Thank you for your help. Unfortunately, all attempts were unsuccessful.

I however give up with one last desperate move, which I'll leave here in case it works for someone else in the future.
While the proprietary drivers were successfully compiling, just not installing, I simply extracted nvidia-390.116-4.19.10-tinycore64.tcz and updated all files and information. I leave this file here:

nvidia-525.116.03-6.1.2-tinycore64.zip
« Last Edit: May 04, 2023, 04:20:25 PM by CardealRusso »

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 179
nvidia-525.116.03-6.1.2-tinycore64.zip

Here is the result of this file
Code: [Select]
Graphics:
  Device-1: NVIDIA vendor: ASUSTeK driver: nvidia v: 525.116.03 arch: Turing
    pcie: speed: 2.5 GT/s lanes: 4 bus-ID: 03:00.0 chip-ID: 10de:1f82
    class-ID: 0300
  Display: server: X.Org v: 1.21.1.6 driver: X: loaded: N/A failed: nvidia
    dri: swrast gpu: nvidia note: X driver n/a display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1440x900 s-dpi: 75 s-size: 488x305mm (19.21x12.01")
    s-diag: 575mm (22.66")
  Monitor-1: HDMI-0 res: 1440x900 hz: 60 dpi: 64
    size: 575x323mm (22.64x12.72") diag: 660mm (25.96") modes: N/A
  API: OpenGL v: 4.5 Mesa 22.3.7 renderer: llvmpipe (LLVM 15.0.7 256 bits)
    direct-render: Yes

it actually looks like its working? but missing glx modules.

Code: [Select]
[    21.408] (II) Module nvidia: vendor="NVIDIA Corporation"
[    21.408] compiled for 1.6.99.901, module version = 1.0.0
[    21.408] Module class: X.Org Video Driver
« Last Edit: May 04, 2023, 04:36:16 PM by CardealRusso »

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 179
Re: Getting kernel files ready for nvidia proprietary drivers installer
« Reply #10 on: May 04, 2023, 05:27:37 PM »
I have some good news

Code: [Select]
Graphics:
  Device-1: NVIDIA vendor: ASUSTeK driver: nvidia v: 525.116.03 arch: Turing
    pcie: speed: 2.5 GT/s lanes: 4 bus-ID: 03:00.0 chip-ID: 10de:1f82
    class-ID: 0300
  Display: server: X.Org v: 1.21.1.6 driver: X: loaded: nvidia gpu: nvidia
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1440x900 s-dpi: 75 s-size: 488x305mm (19.21x12.01")
    s-diag: 575mm (22.66")
  Monitor-1: HDMI-0 res: 1440x900 hz: 60 dpi: 64
    size: 575x323mm (22.64x12.72") diag: 660mm (25.96") modes: N/A
  API: OpenGL v: 4.6.0 NVIDIA 525.116.03 renderer: NVIDIA GeForce GTX
    1650/PCIe/SSE2 direct-render: Yes

The driver was loaded. I managed to install with the installer with this package, i just had to exit the x server to prompt.

glxgears
Code: [Select]
tc@box:~$ env vblank_mode=0 __GL_SYNC_TO_VBLANK=0 glxgears
'76236 frames in 5.0 seconds = 15247.050 FPS
76302 frames in 5.0 seconds = 15260.339 FPS
76522 frames in 5.0 seconds = 15304.348 FPS
77164 frames in 5.0 seconds = 15432.640 FPS
76728 frames in 5.0 seconds = 15345.563 FPS
76911 frames in 5.0 seconds = 15382.092 FPS
76850 frames in 5.0 seconds = 15369.840 FPS
76995 frames in 5.0 seconds = 15398.824 FPS
77072 frames in 5.0 seconds = 15414.350 FPS

Compared to no drivers
Code: [Select]
tc@box:~$ glxgears
1895 frames in 5.0 seconds = 378.986 FPS
1878 frames in 5.0 seconds = 375.515 FPS
2035 frames in 5.0 seconds = 406.945 FPS

And nouveau

Code: [Select]
tc@box:~$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
9274 frames in 5.0 seconds = 1854.556 FPS
9430 frames in 5.0 seconds = 1885.883 FPS
9569 frames in 5.0 seconds = 1913.663 FPS

Had to run the installer of the same version of package for the drivers to load. I dont know what im missing.

Can i get some help to get this  persistent.
I think the only difference is that I am now loading the graphics-KERNEL.tcz. It seems that the lack of this prevented the driver from being installed
« Last Edit: May 04, 2023, 05:31:08 PM by CardealRusso »

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 179
Re: Getting kernel files ready for nvidia proprietary drivers installer
« Reply #11 on: May 04, 2023, 06:14:16 PM »
nvidia-525.116.03-6.1.2-tinycore64.zip

i got it
there are many missing files on /usr/lib. i just updated the kernel files

i`ll try to fix and maybe try to submit to tcz repo

everything is working nicely, i just need to pack it all
« Last Edit: May 04, 2023, 06:19:15 PM by CardealRusso »

aus9

  • Guest
Re: Getting kernel files ready for nvidia proprietary drivers installer
« Reply #12 on: May 04, 2023, 09:48:20 PM »
hi CardealRusso

before you submit, some suggestions for you.

post 9 xorg log
Quote
ACPI: failed to connect to the ACPI event daemon

try installing  acpid and start the daemon....exit to prompt then go back in and check if Xorg log has that message disappear?

post 11 screenshot of terminal....
it looks like you might need to add hicolor-icon-theme.tcz to your dep file.

XDG_RUNTIME_DIR...for sway I set this to a /run/user dir but /tmp can be used like this

Code: [Select]
export XDG_RUNTIME_DIR=/tmp
env | grep tmp
# result...XDG_RUNTIME_DIR=/tmp

Is nvidia-settings an elf file?
if so you can run a dependency check on it like this
Code: [Select]
readelf -d /usr/local/bin/nvidia-settings | grep 'NEEDED'
here is example of my research for dep entries
http://tinycorelinux.net/14.x/x86_64/tcz/src/feh/build-feh.sh
later builds I have remove the junk of 0x0000000000000001 (NEEDED) Shared library:
but you can see that I used searchtce against libX11 found it was a dep of  libXext and that was a dep of imlib2
which worked out well as libpng gave a similar result

then what I do...is search my local TCEs for each entry.
some are TCB....you won't get a hit.....I can see your terminal has libz* and  if you open Apps and use the "provides" search for libz.so.1
you won't get a hit....meaning its not coming from a TCE so its TCB

gnuser and others use search scripts that search the TC repos.
I lack that skill and thoroughness....instead I search for only locally installed TCEs...be they private or not yet submitted etc TCEs like this

Code: [Select]
cat $HOME/.local/bin/searchtce # gap added by me

#!/bin/sh
read -p "input TCE without dot tcz please
" INPUT
grep -l $INPUT.tcz /etc/sysconfig/tcedir/optional/*.dep | cut -d/ -f6


make it executable too please
Good luck

« Last Edit: May 04, 2023, 09:50:13 PM by aus9 »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: Getting kernel files ready for nvidia proprietary drivers installer
« Reply #13 on: May 05, 2023, 01:39:05 AM »
Acpid is not related to nvidia in any way. That with xorg is for stuff like blanking the display when you close the laptop screen etc.
The only barriers that can stop you are the ones you create yourself.

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 179
Re: Getting kernel files ready for nvidia proprietary drivers installer
« Reply #14 on: May 05, 2023, 08:14:12 AM »

Thank you for your attention.

Currently, as I mentioned earlier, I am able to successfully install and load the nvidia drivers. Everything works perfectly.

My current difficulty is creating the nvidia tcz. I'm currently trying to keep track of all files created/moved by the installer but it's been an almost impossible task.

I am currently including the file
nvidia-525.116.03-6.1.2-tinycore64.zip
on boot. This file doesn't have much use other than blocking any other video drivers that tinycore tries to load.

After that I can exit to the prompt and very easily run the nvidia installer. I'll leave here the nvidia installer with the pre-compiled tinycore kernel (6.1.2-tinycore64 only)
NVIDIA-Linux-x86_64-470.182.03-no-compat32-custom.run

onboot:
Code: [Select]
...
firmware-nvidia.tcz (this is from 13.x repo)
graphics-6.1.2-tinycore64.tcz
nvidia-525.116.03-6.1.2-tinycore64.tcz
zip.tcz
compiletc.tcz
elfutils-dev.tcz
ncursesw-dev.tcz
bc.tcz

I also preferred to use the 470 driver as it has a significant performance gain.
Code: [Select]
110632 frames in 5.0 seconds = 22126.268 FPS
111820 frames in 5.0 seconds = 22363.906 FPS
111232 frames in 5.0 seconds = 22246.252 FPS

Compared to driver 525:
Code: [Select]
76236 frames in 5.0 seconds = 15247.050 FPS
76302 frames in 5.0 seconds = 15260.339 FPS
76522 frames in 5.0 seconds = 15304.348 FPS

« Last Edit: May 05, 2023, 08:41:48 AM by CardealRusso »