NVIDIA driver Setup

Technical issues/questions of an intermediate or advanced nature.
Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

NVIDIA driver Setup

Post#1 by Bogomips » 18 May 2016, 00:48

After taking a gander at Blaze's meticulous HOWTO in the Russian section, was tempted to try and see if could find driver for card, and perhaps download it.. After futile attempts to find it with manual search on the nvidia UK site (the automatic search requires Java, but when I gave it Java it still insisted on installing it!). went back to Blaze's HOWTO, where a more careful look at the illustrations revealed details which did not show up on the UK and US sites. Armed with this information was able to fill in search criteria as required for this to work and to download the driver package for my GPU: NVIDIA-Linux-x86-304.131 (@donald this also does your card, I think)

Gingerly Building
Guided by Blaze's HOWTO
  • Init 3 plus Activate of crippled_sources.xzm and 05-devel.xzm

    Code: Select all

    sh NVIDIA-Linux-x86-304.131.run
    Complains about Nouveau being around

    Code: Select all

    nvidia-installer log file '/var/log/nvidia-installer.log'
    creation time: Mon May 16 17:50:39 2016
    installer version: 304.131
    nvidia-installer command line:
        ./nvidia-installer
    ERROR: The Nouveau kernel driver is currently in use by your system.  This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding.  
  • Added Activation of blacklist.xzm made no difference.
  • KDE in Text Mode after Activation of crippled_sources.xzm, 05-devel.xzm, and blacklist.xzm Kenel Module made, but after insmod error, nothing remained. Hate these scripts requiring everything to be just the way they want it, and if there's an error, one has no chance of retrieving anything, as all that's been done is deleted. :twisted: However, this being Porteus, managed to salvage nvidia.ko.
Final Lines of nvidia-installer.log:

Code: Select all

     ld -r -m elf_i386 -T /usr/src/linux-4.5.3/scripts/module-common.lds --build-id  -o /tmp/selfgz2507/NVIDIA-Linux-x86-304.131/kernel/nvidia.ko /tmp/selfgz2507/NVIDIA-Linux-x86-304.131/kernel/nvidia.o /tmp/selfgz2507/NVIDIA-Linux-x86-304.131/kernel/nvidia.mod.o
   NVIDIA: left KBUILD.
-> done.
-> Kernel module compilation complete.
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 a driver such as rivafb, nvidiafb, or nouveau is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or NVIDIA GPU installed in this system is not supported by this NVIDIA Linux graphics driver release.

Please see the log entries 'Kernel module load error' and 'Kernel messages' at the end of the file '/var/log/nvidia-installer.log' for more information.
-> Kernel module load error: insmod: ERROR: could not insert module ./kernel/nvidia.ko: Unknown symbol in module
-> Kernel messages:
[   22.323871] input: HDA NVidia Line as /devices/pci0000:00/0000:00:05.0/sound/card0/input6
[   22.324404] input: HDA NVidia Line Out as /devices/pci0000:00/0000:00:05.0/sound/card0/input7
[   22.324598] input: HDA NVidia Front Headphone as /devices/pci0000:00/0000:00:05.0/sound/card0/input8
[   23.198159] ppdev: user-space parallel port driver
[   35.780247] blk_update_request: I/O error, dev fd0, sector 0
[   35.780258] floppy: error -5 while reading block 0
[   36.957457] REISERFS (device sda1): found reiserfs format "3.6" with standard journal
[   36.957477] REISERFS (device sda1): using ordered data mode
[   36.957481] reiserfs: using flush barriers
[   36.984107] REISERFS (device sda1): journal params: device sda1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
[   36.984307] REISERFS (device sda1): checking transaction log (sda1)
[   37.277126] REISERFS (device sda1): Using r5 hash to sort names
[   38.074828] EXT4-fs (sda9): mounting ext2 file system using the ext4 subsystem
[   38.122955] EXT4-fs (sda9): warning: mounting unchecked fs, running e2fsck is recommended
[   38.143181] EXT4-fs (sda9): mounted filesystem without journal. Opts: (null)
[   38.809534] forcedeth 0000:00:07.0 eth0: MSI enabled
[   39.098767] NET: Registered protocol family 10
[   41.876029] Adding 530108k swap on /dev/sda7.  Priority:1 extents:1 across:530108k FS
[   41.883392] Adding 130044k swap on /dev/sda11.  Priority:1 extents:1 across:130044k FS
[  166.168300] nvidia: module license 'NVIDIA' taints kernel.
[  166.168305] Disabling lock debugging due to kernel taint
[  166.178289] nvidia: Unknown symbol mtrr_del (err 0)
[  166.178360] nvidia: Unknown symbol mtrr_add (err 0)
[  491.935101] nvidia: Unknown symbol mtrr_del (err 0)
[  491.935172] nvidia: Unknown symbol mtrr_add (err 0)
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.
Looks more like an internal installer error, rather than any of the given possible causes. Any ideas how to resolve the undefined symbol?
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: NVIDIA driver Setup

Post#2 by donald » 18 May 2016, 05:42

No luck with version 304.131
(Debian)
From kernel 4.3 and newer (commit 2baa891e42d84) mtrr_add and mtrr_del are no longer exported. The Nvidia kernel shim still uses it as of 304.131, causing the module to error out when loading. Disable MTRR if running on 4.3 or greater until upstream fixes it.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: NVIDIA driver Setup

Post#3 by Bogomips » 18 May 2016, 14:51

^ Thanks for heads up, donald. Applied the patch, but having no experience with this kind of patch, did it manually :) Now able to get into kde5. Proceeding to make hand-crafted module. :wink:
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

beny
Full of knowledge
Full of knowledge
Posts: 2086
Joined: 02 Jan 2011, 11:33
Location: italy

Re: NVIDIA driver Setup

Post#4 by beny » 18 May 2016, 20:01

hi to build the nvidia driver on the new kernel we need:
--- a/arch/x86/kernel/cpu/mtrr/main.c 2015-10-18 08:10:52.951166026 +0100
+++ b/arch/x86/kernel/cpu/mtrr/main.c 2015-10-18 08:11:54.651493742 +0100
@@ -448,6 +448,7 @@
return mtrr_add_page(base >> PAGE_SHIFT, size >> PAGE_SHIFT, type,
increment);
}
+EXPORT_SYMBOL(mtrr_add);

/**
* mtrr_del_page - delete a memory type region
@@ -536,6 +537,7 @@
return -EINVAL;
return mtrr_del_page(reg, base >> PAGE_SHIFT, size >> PAGE_SHIFT);
}
+EXPORT_SYMBOL(mtrr_del);

/**
* arch_phys_wc_add - add a WC MTRR and handle errors if PAT is unavailable

this patch start for 4.3 kernel,so try it for the new kernel too

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: NVIDIA driver Setup

Post#5 by Bogomips » 18 May 2016, 21:18

@ beny Thanks for the patch. However at the moment able to temporise with this patch: https://anonscm.debian.org/viewvc/pkg-n ... iew=markup

Legacy Driver 304.131

md5sum nvidia-304.131-i486.xzm
78a6e76afaf282828e41b41e3d8cbb37 nvidia-304.131-i486.xzm

Code: Select all

guest@porteus:~$ ls -lh nvidia-304.131-i486.xzm 
-rw-r--r-- 1 root root 31M May 20 13:17 nvidia-304.131-i486.xzm          
md5sum nvidia-304.131-x86_64.xzm
539c2771b4d31abc2c61b43cc64efd0f nvidia-304.131-x86_64.xzm

Code: Select all

guest@porteus:~$ ls -lh nvidia-304.131-x86_64.xzm 
-rw-r--r-- 1 root root 51M May 19 22:30 nvidia-304.131-x86_64.xzm
Last edited by Bogomips on 20 May 2016, 16:34, edited 2 times in total.
Reason: menu correction
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Kriss
Samurai
Samurai
Posts: 135
Joined: 06 Jul 2011, 07:07
Location: Russia

Re: NVIDIA driver Setup

Post#6 by Kriss » 19 May 2016, 10:28

For expert options there's "-E" if I remember correctly.
It asks you if you want to check for presence of alternative drivers.

Code: Select all

sh NVIDIA-Linux-x86-304.131.run -E
Suggestions/corrections/additions are always welcome.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: NVIDIA driver Setup

Post#7 by Bogomips » 19 May 2016, 18:19

Code: Select all

SELECTION OF OPTIONS AVAILABLE:        sh NVIDIA-Linux-x86_64-304.131.run  <option>
  -A, --advanced-options
      Print usage information for the common commandline options
      as well as the advanced options, and then exit.

  -i, --driver-info
      Print information about the currently installed NVIDIA
      driver version.

  -e, --expert
      Enable 'expert' installation mode; more detailed questions
      will be asked, and more verbose output will be printed;
      intended for expert users.  The questions may be suppressed
      with the '--no-questions' commandline option.

  -q, --no-questions
      Do not ask any questions; the default (normally 'yes') is
      assumed for all yes/no questions, and the default string is
      assumed in any situation where the user is prompted for
      string input.  The one question that is not bypassed by
      this option is license acceptance; the license may be
      accepted with the commandline option '--accept-license'.

  -z, --no-nouveau-check
      Normally, nvidia-installer aborts installation if the
      nouveau kernel driver is in use.  Use this option to
      disable this check.

  -Z, --disable-nouveau
      If the nouveau kernel module is detected by
      nvidia-installer, the installer offers to attempt to
      disable nouveau. The default action is to not attempt to
      disable nouveau; use this option to change the default
      action to attempt to disable nouveau.

  -X, --run-nvidia-xconfig
      nvidia-installer can optionally invoke the nvidia-xconfig
      utility.  This will update the system X configuration file
      so that the NVIDIA X driver is used.  The pre-existing X
      configuration file will be backed up.  At the end of
      installation, nvidia-installer will ask the user if they
      wish to run nvidia-xconfig; the default response is 'no'. 
      Use this option to make the default response 'yes'.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Evan
Shogun
Shogun
Posts: 466
Joined: 11 Apr 2016, 09:00
Distribution: Distribution: *

Re: NVIDIA driver Setup

Post#8 by Evan » 19 May 2016, 22:21

<removed>
Last edited by Evan on 24 Jun 2016, 11:38, edited 1 time in total.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: NVIDIA driver Setup

Post#9 by Bogomips » 20 May 2016, 00:33

^ Suck it and see, as they say. 8)

nvidia-304.131 64 bit Driver Module: http://forum.porteus.org/viewtopic.php? ... a26#p45430 for Check Out.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: NVIDIA driver Setup

Post#10 by donald » 23 May 2016, 09:32

@ Bogomips
Bogomips wrote:Applied the patch, but having no experience with this kind of patch, did it manually :)
Get you the Patch -- save it as nv.patch
Extract the nvidia *.run file -- (*.run -- extract-only)
copy the nv.patch file into the same dir containing the file you need to patch;
( nv-linux.h in our case )
now patch the file:

Code: Select all

patch -p1 < ./nv.patch
(or path/to/patch), the program will tell you if success.
(delete the nv.patch file if it was placed into the dir.. :) )

cd into the dir where the extracted nvidia'.run Folder is and execute:

Code: Select all

./NVIDIA-Linux-x86-304.131/makeself.sh \
--target-os Linux --target-arch x86 \
NVIDIA-Linux-x86-304.131 \
NVIDIA-Linux-x86-304.131-patched.run \
"NVIDIA driver 304.131 patched for k4.3+" \
./nvidia-installer
as a result you will now have a patched nvidia*.run file for further use.

btw
what are all the wh files in your module good for? -- i do not have them and the nvidia.ko has a different md5sum than yours.
(compiled on xfce 32 Bit rc2)

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: NVIDIA driver Setup

Post#11 by Bogomips » 26 May 2016, 01:14

@ donald
Thanks for patch tut. Appreciated. :)
donald wrote: btw
what are all the wh files in your module good for? -- i do not have them and the nvidia.ko has a different md5sum than yours.
(compiled on xfce 32 Bit rc2)
Ran manually patched nvidia installer under kde in text mode, wishing to eliminate possibility of driver issue as being cause of not being able to boot into GUI on kde. After driver created and modprobed, changed to init 4 and was able to get GUI going. Thereafter a module was needed in order to run kde5 in AF mode. Followed examle of Blaze's excellent howto, and created one, by whittling down a changes module to bare essentials, hence all the wh files. Main concern was that size be comparable with that of 3.1 driver and not to omit any essential files. While procedure still fresh in mind did 64 bit module, checked boot into 64 bit GUI using said module, and uploaded it in spirit of sharing :friends:

Comparison:
  • 32 bit

    Code: Select all

    guest@porteus:~$ ls -lh nVidia-304.123-porteus-v3.1-i486-1ftm.xzm
    -rw-r--r-- 1 guest users 30M Dec  9  2014 nVidia-304.123-porteus-v3.1-i486-1ftm.xzm
    
    guest@porteus:~$ ls -lh nvidia-304.131-i486.xzm
    -rw-r--r-- 1 root root 31M May 20 13:17 nvidia-304.131-i486.xzm
    
  • 64 bit

    Code: Select all

    nVidia-304.123-porteus-v3.1-x86_64-1ftm.xzm
                56627200        25-Nov-2014 11:58
    
    guest@porteus:~$ ls -lh nvidia-304.131-x86_64.xzm
    -rw-r--r-- 1 root root 51M May 19 22:30 nvidia-304.131-x86_64.xzm
Last edited by Bogomips on 26 May 2016, 01:16, edited 1 time in total.
Reason: changes module
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Re: NVIDIA driver Setup

Post#12 by donald » 26 May 2016, 08:42

Comparison:
32 bit

Code: Select all

guest@localhost:~/test$ ls -lh NVIDIA-Linux-x86-304.131-patched.xzm
-rw-r--r-- 1 guest guest 30M Mai 24 06:59 NVIDIA-Linux-x86-304.131-patched.xzm
File-tree

Code: Select all

.
|-- etc
|   |-- OpenCL
|   |   `-- vendors
|   |       `-- nvidia.icd
|   |-- X11
|   |   `-- xorg.conf
|   `-- modprobe.d
|       `-- nvidia-installer-disable-nouveau.conf
|-- lib
|   `-- modules
|       `-- 4.5.3-porteus
|           `-- kernel
|               `-- drivers
|                   `-- video
|                       `-- nvidia.ko
`-- usr
    |-- bin
    |   |-- nvidia-bug-report.sh
    |   |-- nvidia-cuda-proxy-control
    |   |-- nvidia-cuda-proxy-server
    |   |-- nvidia-debugdump
    |   |-- nvidia-installer
    |   |-- nvidia-settings
    |   |-- nvidia-smi
    |   |-- nvidia-uninstall -> nvidia-installer
    |   `-- nvidia-xconfig
    |-- lib
    |   |-- libGL.la
    |   |-- libGL.so -> libGL.so.1
    |   |-- libGL.so.1 -> libGL.so.304.131
    |   |-- libGL.so.304.131
    |   |-- libOpenCL.so -> libOpenCL.so.1
    |   |-- libOpenCL.so.1 -> libOpenCL.so.1.0
    |   |-- libOpenCL.so.1.0 -> libOpenCL.so.1.0.0
    |   |-- libOpenCL.so.1.0.0
    |   |-- libXvMCNVIDIA.a
    |   |-- libXvMCNVIDIA.so.304.131
    |   |-- libXvMCNVIDIA_dynamic.so -> libXvMCNVIDIA_dynamic.so.1
    |   |-- libXvMCNVIDIA_dynamic.so.1 -> libXvMCNVIDIA.so.304.131
    |   |-- libXvMCgallium.so.1 -> libXvMCr600.so.1.0.0
    |   |-- libcuda.so -> libcuda.so.1
    |   |-- libcuda.so.1 -> libcuda.so.304.131
    |   |-- libcuda.so.304.131
    |   |-- libncurses.so.5 -> libcurses.so
    |   |-- libncursesw.so.5 -> libcursesw.so
    |   |-- libnvcuvid.so -> libnvcuvid.so.1
    |   |-- libnvcuvid.so.1 -> libnvcuvid.so.304.131
    |   |-- libnvcuvid.so.304.131
    |   |-- libnvidia-cfg.so -> libnvidia-cfg.so.1
    |   |-- libnvidia-cfg.so.1 -> libnvidia-cfg.so.304.131
    |   |-- libnvidia-cfg.so.304.131
    |   |-- libnvidia-compiler.so.304.131
    |   |-- libnvidia-glcore.so.304.131
    |   |-- libnvidia-ml.so -> libnvidia-ml.so.1
    |   |-- libnvidia-ml.so.1 -> libnvidia-ml.so.304.131
    |   |-- libnvidia-ml.so.304.131
    |   |-- libnvidia-opencl.so.1 -> libnvidia-opencl.so.304.131
    |   |-- libnvidia-opencl.so.304.131
    |   |-- libnvidia-tls.so.304.131
    |   |-- libudev.so.1 -> libudev.so.0
    |   |-- libvdpau_nvidia.so -> vdpau/libvdpau_nvidia.so.304.131
    |   |-- tls
    |   |   `-- libnvidia-tls.so.304.131
    |   |-- vdpau
    |   |   |-- libvdpau_nvidia.so.1 -> libvdpau_nvidia.so.304.131
    |   |   `-- libvdpau_nvidia.so.304.131
    |   `-- xorg
    |       `-- modules
    |           |-- drivers
    |           |   `-- nvidia_drv.so
    |           |-- extensions
    |           |   |-- libglx.so -> libglx.so.304.131
    |           |   `-- libglx.so.304.131
    |           |-- libnvidia-wfb.so.1 -> libnvidia-wfb.so.304.131
    |           `-- libnvidia-wfb.so.304.131
    `-- share
        |-- X11
        |   `-- xorg.conf.d
        |       `-- nvidia-drm-outputclass.conf
        |-- applications
        |   `-- nvidia-settings.desktop
        |-- doc
        |   `-- NVIDIA_GLX-1.0
        |       |-- LICENSE
        |       |-- NVIDIA_Changelog
        |       |-- README.txt
        |       |-- html
        |       |   |-- acknowledgements.html
        |       |   |-- addressingcapabilities.html
        |       |   |-- addtlresources.html
        |       |   |-- appendices.html
        |       |   |-- audiosupport.html
        |       |   |-- commonproblems.html
        |       |   |-- configlaptop.html
        |       |   |-- configmultxscreens.html
        |       |   |-- configtvout.html
        |       |   |-- configtwinview.html
        |       |   |-- configuringagp.html
        |       |   |-- depth30.html
        |       |   |-- displaydevicenames.html
        |       |   |-- dma_issues.html
        |       |   |-- dpi.html
        |       |   |-- editxconfig.html
        |       |   |-- faq.html
        |       |   |-- flippingubb.html
        |       |   |-- framelock.html
        |       |   |-- glxsupport.html
        |       |   |-- i2c.html
        |       |   |-- index.html
        |       |   |-- installationandconfiguration.html
        |       |   |-- installdriver.html
        |       |   |-- installedcomponents.html
        |       |   |-- introduction.html
        |       |   |-- knownissues.html
        |       |   |-- minimumrequirements.html
        |       |   |-- newusertips.html
        |       |   |-- nvidia-debugdump.html
        |       |   |-- nvidia-ml.html
        |       |   |-- nvidia-smi.html
        |       |   |-- nvidiasettings.html
        |       |   |-- openglenvvariables.html
        |       |   |-- optimus.html
        |       |   |-- powermanagement.html
        |       |   |-- procinterface.html
        |       |   |-- programmingmodes.html
        |       |   |-- sdi.html
        |       |   |-- selectdriver.html
        |       |   |-- sli.html
        |       |   |-- supportedchips.html
        |       |   |-- vdpausupport.html
        |       |   |-- xcompositeextension.html
        |       |   |-- xconfigoptions.html
        |       |   |-- xineramaglx.html
        |       |   |-- xrandrextension.html
        |       |   `-- xvmcsupport.html
        |       `-- nvidia-settings.png
        `-- man
            `-- man1
                |-- nvidia-cuda-proxy-control.1.gz
                |-- nvidia-installer.1.gz
                |-- nvidia-settings.1.gz
                |-- nvidia-smi.1.gz
                `-- nvidia-xconfig.1.gz

29 directories, 114 files
:friends:

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: NVIDIA driver Setup

Post#13 by Bogomips » 26 May 2016, 10:56

kde5 32 bit

Tweaking Nvidia Driver Setup

Case of limited Resources: 880 MiB RAM and 800.00 MHz CPU. Desirable that nvidia driver taking up 30 M (51 M for 64 bit) not be loaded into ram, if running in ram. This can be achieved by just putting blacklist.xzm in either of base, modules or extramod folders, followed by activation of driver module in init 3, either from rc.local or from cliexec script. Not sure though, if significant degradation of performance through having nvidia driver on a loop.

KDE5
  • Code: Select all

    guest@porteus:~$ cat /proc/cmdline 
    quiet initrd=initrd.xz from=/dev/sda10/tmp/iso/rc2/i486/Porteus-KDE-v3.2rc2-i586.iso rootcopy=UUID:b173/rcpy extramod=/dev/sda5/black cliexec=mount~--bind~/home/guest/p9/tmp~/tmp copy2ram ramsize=30% noauto delay=10 BOOT_IMAGE=vmlinuz 
    
    guest@porteus:~$ cat /var/log/porteus-livedbg 
    # Recognized devices:
    ...
    /dev/sda10: LABEL="p_10" UUID="ed3f74cd-26bb-47bd-86b0-5e690663dd55" TYPE="ext2" 
    /dev/sda11: UUID="6a0167f6-5cf7-412d-b85f-0076ca590371" TYPE="swap" 
    /dev/sdb1: UUID="23B9-F6C2" TYPE="vfat" 
    /dev/sdb2: UUID="3cedaa92-6cfd-4f71-8994-54ab948be7cc" TYPE="ext2" 
    /dev/sdc1: UUID="ab55fc94-4882-417b-b173-7f159944fa9b" TYPE="ext2" 
    /dev/sdc2: UUID="30e88aba-c81c-49ea-9e9b-d23edd56b578" TYPE="ext4" 
    
    # Booting device:
    /mnt/isoloop
    
    # Porteus data found in:
    /mnt/isoloop/porteus
    
    # Changes are stored in:
    memory
    
    # Non standard /rootcopy dir:
    UUID:b173/rcpy
    
    # Modules activated during boot time:
    /memory/copy2ram/000-kernel.xzm
    /memory/copy2ram/001-core.xzm
    /memory/copy2ram/002-xorg.xzm
    /memory/copy2ram/003-kde5.xzm
    /memory/copy2ram/blacklist.xzm
    /memory/copy2ram/h3x.xzm
    
  • Code: Select all

    guest@porteus:~$ free -m
                  total        used        free      shared  buff/cache   available
    Mem:            880         590          28          71         260         174
    Swap:           644         411         233
    
    guest@porteus:~$ ls /mnt/live/memory/images/   
    000-kernel.xzm/  002-xorg.xzm/  blacklist.xzm/  nvidia-304.131-i486.xzm/
    001-core.xzm/    003-kde5.xzm/  h3x.xzm/
    
  • No Aberrations playing a Video with SMplayer (Swap though significantly reduced)

    Code: Select all

    guest@porteus:~$ free -m
                  total        used        free      shared  buff/cache   available
    Mem:            880         578          17          74         283         183
    Swap:           644         606          38
    
Last edited by Bogomips on 26 May 2016, 11:04, edited 2 times in total.
Reason: loop
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
Blaze
DEV Team
DEV Team
Posts: 3869
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

NVIDIA DRIVER HOWTO

Post#14 by Blaze » 30 May 2016, 18:34

1. NVIDIA DRIVER HOWTO
2. (Don't forget to copy 05-devel.xzm, crippled_sources.xzm and blacklist.xzm to /porteus/base/)
Need to clean nvidia module via my script nvidia.sh (+ download this arhive nvidia.tar.bz2 - he is need for my script)

Code: Select all

#!/bin/bash
# Build and clean nVidia xzm driver module for Porteus by Blaze for arch x86 or x86_64:
dir2xzm /mnt/live/memory/changes /tmp/nvidia.xzm
cd /tmp
mkdir /tmp/nvidia
xzm2dir nvidia.xzm nvidia
cd /tmp/nvidia
rm -rf /tmp/nvidia/dev
rm -rf /tmp/nvidia/mnt
rm -rf /tmp/nvidia/root
rm -rf /tmp/nvidia/tmp
rm -rf /tmp/nvidia/var
rm -rf /tmp/nvidia/etc/*[^OpenCL,X11]
rm /tmp/nvidia/etc/adjtime
rm /tmp/nvidia/etc/ld.so.cache
rm /tmp/nvidia/etc/localtime
rm /tmp/nvidia/etc/X11/xorg.conf.nvidia-xconfig-original
tar xvjf /tmp/nvidia.tar.bz2
rm /tmp/nvidia/lib/modules/*porteus/modules.*
rm -rf /tmp/nvidia/usr/src
rm -rf /tmp/nvidia/usr/lib/gio
rm -rf /tmp/nvidia/usr/lib/gtk-2.0
rm -rf /tmp/nvidia/usr/lib/gtk-3.0
rm -rf /tmp/nvidia/usr/lib64/gio
rm -rf /tmp/nvidia/usr/lib64/gtk-2.0
rm -rf /tmp/nvidia/usr/lib64/gtk-3.0
rm -rf /tmp/nvidia/usr/share/mime
rmdir /tmp/nvidia/usr/share/pixmaps
rm /tmp/nvidia/usr/share/applications/mimeinfo.cache
dir2xzm /tmp/nvidia /tmp/nvidia-repack.xzm
cd /tmp
mv /tmp/nvidia-repack.xzm /mnt/sdb1/porteus/modules
rm /mnt/sdb1/porteus/base/blacklist.xzm
rm -rf /tmp
reboot
In my script you are need to replace sdb1 on your location with Porteus, for example sdc1

Boot up Porteus into 'Text mode' and login as root with password toor

Copy NVIDIA-Linux-x86-340.96.run, nvidia.sh and nvidia.tar.bz2 to the /tmp directory (Note. You can use for it mc command) and run these commands in terminal

Code: Select all

cd /tmp
chmod +x NVIDIA-Linux-x86-340.96.run
chmod +x nvidia.sh
./NVIDIA-Linux-x86-340.96.run
Answer 'Accept' and 'Yes' on all questions.

After run this command

Code: Select all

/.nvidia.sh
nvidia-repack.xzm will be copy to /mnt/sdbX/porteus/modules (sdbX it's your patch (way) to Porteus) and Porteus will reboot.
Last edited by Bogomips on 31 May 2016, 15:14, edited 2 times in total.
Reason: Exposure
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: NVIDIA driver Setup

Post#15 by Bogomips » 31 May 2016, 15:13

@ Blaze
Copied your post here, and edited it for the same driver as in your howto in Russian section, in order to give it more exposure.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Post Reply