WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] NVIDIA-Linux-x86-173.14.39-pkg1.run  (Read 33741 times)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #60 on: June 09, 2015, 08:57:25 AM »

Try running linux-kernel-sources-env and NVIDIA-Linux-x86-173.14.39pkg1.run as default user


Sent from my iPad using Tapatalk HD

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #61 on: June 09, 2015, 09:54:54 AM »
Having said that, NVIDIAxxxxxxx.run should be run as  root  via sudo nvidiaxxxxxxx.run


Sent from my iPad using Tapatalk HD

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #62 on: June 09, 2015, 10:11:56 AM »
Sooner or later you will probably face the situation where you need to create an extension out of the compiled files so they survive a reboot. I suggest you take Rich's scripts, which I did too, with minor modifications.
Hi Stone.Giant
[...]
You might want to read through this thread:
http://forum.tinycorelinux.net/index.php/topic,12965.msg71206.html#msg71206
You will also find the build scripts I used in reply #8.
Download a copy and keep it handy: Core book ;)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #63 on: June 09, 2015, 11:08:07 AM »
Downloading the scripts currently doesn't work at my end so I post the ones that I still have around.

Make sure to change the VERS variable to the version nuber of the driver you want to compile in both scripts.
Also save the scripts in the same directory where  NVIDIA-Linux-x86-$VERS.run  is located.
After saving them and making them executable, exit out of X (CTRL+ALT+Backspace).
Then run  ./create-nvidia-raw  (as normal user).

create-nvidia-raw
Code: [Select]
#!/bin/sh
KERN=`uname -r`
VERS="319.17"

tce-load -w compiletc findutils squashfs-tools procps
tce-load -i compiletc findutils squashfs-tools procps

touch NOW
sleep 5
sudo sh ./NVIDIA-Linux-x86-$VERS.run --accept-license --no-network
rm -f nvidia-raw.tar.gz
rm -rf nvidia-raw
mkdir -p nvidia-raw/rawpackage
find /usr -newer NOW -not -type d > nvidia-raw.list
find /lib -newer NOW -not -type d | grep /lib/modules/$KERN/kernel/drivers/ >> nvidia-raw.list
tar -T nvidia-raw.list -czvf nvidia-raw.tar.gz
cd nvidia-raw/rawpackage
tar -xf ../../nvidia-raw.tar.gz
cd ..
#sudo nvidia-xconfig --mode=1280x1024 --force-generate --virtual=1280x1024


I'm not entirely sure but you might need to manually copy created files from
/usr/local/lib/X11
to
/usr/local/lib/xorg
(you might need to edit the created extension if the drivers won't work after reboot)

At this point, the driver is already installed but won't survive a reboot.
Try  startx  to see if things work.

Note the last line which is commented out in above script. This command is sometimes needed in order to create a working  xorg.conf .
If that's the case, (Failed in waitforX) execute said command with your desired resolution, try  startx  again, and if things work, add  etc/X11  to your  /opt/.filetool.lst  and do a backup.


If that went well, run  ./create-nvidia-package  (also as normal user)

create-nvidia-package
Code: [Select]
#!/bin/sh
KERN=`uname -r`
VERS="319.17"

cd nvidia-raw
sudo rm -rf package
mkdir package
cp -r rawpackage/* package
mv package/usr/share package/usr/local/
mv package/usr/local/share/applications/nvidia-settings.desktop package/usr/local/share/applications/nvidia-$VERS-$KERN.desktop
sed -i 's/Exec=/Exec=sudo /' package/usr/local/share/applications/nvidia-$VERS-$KERN.desktop
sed -i 's/Icon=/Icon=nvidia-settings\nIcon=/' package/usr/local/share/applications/nvidia-$VERS-$KERN.desktop
sed -i 's/Icon=\/usr/X-FullPathIcon=\/usr\/local/' package/usr/local/share/applications/nvidia-$VERS-$KERN.desktop

mkdir package/usr/local/tce.installed
echo -e "#!/bin/sh\nln -sf /usr/local/lib/xorg/modules/extensions/libglx.so.$VERS /usr/local/lib/xorg/modules/extensions/libglx.so" > package/usr/local/tce.installed/nvidia-$VERS-$KERN
sudo chown -R root:staff package/usr/local/tce.installed
sudo chmod -R 775 package/usr/local/tce.installed
mv package/lib/modules package/usr/local/lib/
gzip package/usr/local/lib/modules/$KERN/kernel/drivers/video/nvidia.ko
rm -f package/usr/bin/nvidia-uninstall
rm -f package/usr/bin/nvidia-installer
rm -rf package/lib
rm -f package/usr/lib/*tls*.*

rm -f nvidia-$VERS-$KERN.tcz
mksquashfs package nvidia-$VERS-$KERN.tcz
md5sum nvidia-$VERS-$KERN.tcz > nvidia-$VERS-$KERN.tcz.md5.txt
cd package
find -not -type d | cut -c3- | sort -d > ../nvidia-$VERS-$KERN.tcz.list
cd ..


Then move the created extension to  /etc/sysconfig/tcedir/optional/ .
Add the extension to  /etc/sysconfig/tcedir/onboot.lst .
Reboot.
Download a copy and keep it handy: Core book ;)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #64 on: June 09, 2015, 11:35:15 AM »
I also find Ctrl+Alt+backspace doesn't always remove the lock on the adapter however pkill Xorg does


Sent from my iPhone using Tapatalk

Offline Stone.Giant

  • Full Member
  • ***
  • Posts: 100
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #65 on: June 09, 2015, 01:28:34 PM »
Here's my progress: I now successfully climbed up to next level of error. Kindly download attachment (149KB)

http://www.4shared.com/file/sotDqYIpba/nvidia-installer.htmll

Quote
ERROR: Unable to build the NVIDIA kernel module.
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.
 

I'll gona test Rich's scripts in later time.



« Last Edit: June 09, 2015, 01:31:39 PM by Stone.Giant »

Offline Stone.Giant

  • Full Member
  • ***
  • Posts: 100
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #66 on: June 10, 2015, 06:30:48 AM »
what's my next move?

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #67 on: June 10, 2015, 07:32:37 AM »
I can't download the file you uploaded.
Can you use pastebin.com? You can post as guest there. No need for an account.

I'm going to recompile my nvidia extension using Rich's scripts now. I'll see if I can automate any needed renaming of folders.
Download a copy and keep it handy: Core book ;)

Offline Stone.Giant

  • Full Member
  • ***
  • Posts: 100
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #68 on: June 10, 2015, 08:02:41 AM »
I can't download the file you uploaded.
Can you use pastebin.com? You can post as guest there. No need for an account.

I'm going to recompile my nvidia extension using Rich's scripts now. I'll see if I can automate any needed renaming of folders.

Kindly seach for nvidia173.14.39_installer-log in pastebin.com. Thanks

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #69 on: June 10, 2015, 09:08:19 AM »
This one?  http://pastebin.com/wUeeX085
(BTW, you should have gotten a link from pastebin to be able to post here what you pasted there.)
Lots of warnings.. Honestly, I don't know.
Maybe the kernel source isn't prepared properly.
In that case, this might help:
http://wiki.tinycorelinux.net/wiki:custom_kernel


I just did the following successfully...
Edited create-nvidia-raw:
Code: [Select]
#!/bin/sh
KERN=`uname -r`
VERS="304.125"

tce-load -w compiletc findutils squashfs-tools procps
tce-load -i compiletc findutils squashfs-tools procps

touch NOW
sleep 5
sudo sh ./NVIDIA-Linux-x86-$VERS.run \
--accept-license \
--no-network \
--no-runlevel-check \
--x-module-path=/usr/local/lib/xorg/modules

rm -f nvidia-raw.tar.gz
rm -rf nvidia-raw
mkdir -p nvidia-raw/rawpackage
find /usr -newer NOW -not -type d > nvidia-raw.list
find /lib -newer NOW -not -type d | grep /lib/modules/$KERN/kernel/drivers/ >> nvidia-raw.list
tar -T nvidia-raw.list -czvf nvidia-raw.tar.gz
cd nvidia-raw/rawpackage
tar -xf ../../nvidia-raw.tar.gz
cd ..
rm -f /usr/lib/*tls*.*

#sudo nvidia-xconfig --mode=1280x1024 --force-generate --virtual=1280x1024
Removed any nvidia drivers from  onboot.lst .
Rebboted.
Core tryed to startx -> failed in waitforX (no wonder, there's no driver currently).
Did this in linux console (I have 2GB RAM):
Code: [Select]
tce-load -i linux-kernel-sources-env
linux-kernel-sources-env.sh
./create-nvidia-raw
startx
It compiles right away without errors and X launches. Also  sudo nvidia-settings  works.
You might need to already have a valid xorg.conf though. If X doesn't start, do:
sudo nvidia-xconfig --mode=1280x1024 --force-generate --virtual=1280x1024
Or whatever screen res you need. Also, nvidia might need to be listed as Driver in the Device section of xorg.conf.
Download a copy and keep it handy: Core book ;)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #70 on: June 10, 2015, 09:25:40 AM »
I had another look at this:

* the kernel kbuild fails at this test:
Code: [Select]
include/config/auto.conf:
$(Q)test -e include/generated/autoconf.h -a -e $@ || ( \
echo >&2; \
echo >&2 "  ERROR: Kernel configuration is invalid."; \
echo >&2 "         include/generated/autoconf.h or $@ are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)

if the kernel source has been prepared, both autoconf.h and auto.conf are present, but busybox and coreutils test both fail here.

Replacing the whole lot with "include include/generated/autoconf.h" makes things work, but shouldn't be neccessary.

* the fix-build-with-linux-3.16.patch is required.

After all this, NVIDIA-Linux-x86-173.14.39-pkg1 compiles.

* install overwrites the Xorg /usr/local/lib/libGL.so and /usr/local/lib/xorg/modules/extensions/libglx.so, which might not be good.

If you pm me, I can provide a link to nvidia-173.14.39-3.16.3-tinycore.tcz to test if you wish - I have no suitable hardware so the packaging might not be correct...

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #71 on: June 10, 2015, 10:11:06 AM »
Quote
* install overwrites the Xorg /usr/local/lib/libGL.so and /usr/local/lib/xorg/modules/extensions/libglx.so, which might not be good.

The driver version I use has this option
Code: [Select]
./NVIDIA-Linux-x86-304.125.run -A
...
  --no-opengl-files
      Do not install any of the OpenGL-related driver files.
...
Download a copy and keep it handy: Core book ;)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #72 on: June 10, 2015, 02:32:34 PM »
Quote
Replacing the whole lot with "include include/generated/autoconf.h"
It's not clear exactly how to duplicate this, any help please?

Also
Quote
the fix-build-with-linux-3.16.patch is required
is this the patch from Ubuntu forums?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #73 on: June 10, 2015, 03:02:40 PM »
I'm referring to the kernel top level Makefile. Replace the text I pasted with "include include/generated/autoconf.h" (I haven't figured out why this should be necessary).

The patch is here:

http://www.tinycorelinux.net/6.x/x86/tcz/src/nvidia_driver/NVIDIA-Linux-x86-173.14.39-pkg1.patch

« Last Edit: June 11, 2015, 05:21:59 AM by Juanito »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: NVIDIA-Linux-x86-173.14.39-pkg1.run
« Reply #74 on: June 10, 2015, 04:27:43 PM »
Aaah...  ok thank I think I understand now :)   Sorry I was looking at your fix and was drawing a total blank on what this was..