WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] nvidia drivers - segmentation fault  (Read 5330 times)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
[SOLVED] nvidia drivers - segmentation fault
« on: December 01, 2013, 04:16:05 PM »
I did build the nvidia graphics drivers on TC 4.x, TC 5.0.x and now trying to do so on TC 5.1.

The same driver version which I have compiled under 5.0 seems to still work on 5.1, though. I have seperated the nvidia kernel module into another .tcz so I have one big nvidia extension and two smaller nvidia-module extensions (for 3.8.10 & 3.8.13 kernel).

I don't know if that's a good idea. Advice is apreciated.

--

Since 5.x, I'm using coreplayer2's script for kernel sources to be set up.

To build the drivers I'm using Rich's scripts which were actually meant for building legacy drivers, I think. However, It does work in terms of gathering the created files out of the file system so that they can be easily packed in an extension (which I do manually).

I have these compiler flags set in  ~/.ashrc
Code: [Select]
export CFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export LDFLAGS="-Wl -O1"

For TC 5.0, after compiling I just have to change one directory which contains the actual driver (I guess) due to the update to Xorg-7.7 (/usr/local/lib/X11/...  vs.  /usr/local/lib/xorg/...).
After doing so, everthing works fine (except of an error message during boot/loading extension: "unknown operand" - no idea if that's bad) and 3D acceleration is available.

Doing the same on TC 5.1 - reboot; whith the new nvidia extension + new nvidia module set OnBoot - I don't get any error messages during boot while extensions are getting loaded but just after that, "segmentation fault" is displayed (appended at the yellow list of loaded tczs).
Then it tryes to start X and just hangs with a black screen (I have to SysRq-Alt-B to get out).

Differences I have noticed in my newer build:
- Kernel module is not compressed
- One additional symlink (/usr/local/lib/xorg/modules/libwfb.so -> libnvidia-wfb.so.319.17)

--

Can I just use my 'old' nvidia extension (build with 3.8.10 kernel sources) combined with my 'new' nvidia-module extension (build with 3.8.13 kernel sources)? Are the kernel sources only needed to create nvidia.ko (nvidia-module)?

However, I'm pretty sure I did everything the same way as I did for TC 5.0 a few weeks ago. Should I take care of something when compiling agains kernel sources?

Thanks for reading.
« Last Edit: March 24, 2014, 02:56:52 PM by Misalf »
Download a copy and keep it handy: Core book ;)

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
Re: nvidia drivers - segmentation fault
« Reply #1 on: December 01, 2013, 05:28:42 PM »
making my custom nvidia extension I saw, like you, that there is no compressed kernel module (only nvidia.ko) but I have compressed it to nvidia.ko.gz and let it in the same place as nvidia.ko.

My custom kernel works for me without errors.

I make this extension from NVIDIA-Linux-x86.319.17.run

Offline TinyFun

  • Newbie
  • *
  • Posts: 33
Re: nvidia drivers - segmentation fault
« Reply #2 on: January 19, 2014, 03:40:15 PM »
@misalf

would it be possible to post links to the scripts by Coreplayer and Rich  you mentioned ?

Quote
Since 5.x, I'm using coreplayer2's script for kernel sources to be set up.

To build the drivers I'm using Rich's scripts which were actually meant for building legacy drivers, I think.

Am struggling with driver for my nvidia card, downloaded binary from nvidia's website, but the README does not offer much hope. filesystem they use is different from TC.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: nvidia drivers - segmentation fault
« Reply #3 on: January 19, 2014, 04:07:34 PM »
TC uses standard linux filesystems for mounted drives. Nvidia's drivers don't care about filesystems.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11500
Re: nvidia drivers - segmentation fault
« Reply #4 on: January 19, 2014, 05:37:27 PM »
Hi TinyFun
Quote
would it be possible to post links to the scripts by Coreplayer and Rich  you mentioned ?
The scripts I posted are here:
http://forum.tinycorelinux.net/index.php/topic,12965.msg71304.html#msg71304

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: nvidia drivers - segmentation fault
« Reply #5 on: March 21, 2014, 05:31:31 PM »
I deleted my nvidia extension by accident. There is not much free space left on my HDD so I deleted extensions with "3.8.10" in their file names. I wasn't aware anymore that I was using the drivers I built under 3.8.10 but the kernel module built under 3.8.13.. bummer.

Anyway, I downloaded a new copy of the nvidia drivers source and made a new extension.
It's still seg-faulting.

Anyone with an idea how to find out what the problem could be?
Download a copy and keep it handy: Core book ;)

Offline Cryptus

  • Newbie
  • *
  • Posts: 5
Re: nvidia drivers - segmentation fault
« Reply #6 on: March 24, 2014, 09:36:34 AM »
Misalf,

try to use the *other* libnvidia-tls.so library - at least with the newer drivers NVidia provides two of them, one is installed in the default lib directory, one in a subdirectory lib/tls.
I had the same problems, and disabling the default one (rename it or move to a backup folder) helped.

HTH, Frank
„Denn was berauscht die Leyer vorgesungen, / Das hat des Schwertes freie That errungen.“

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: nvidia drivers - segmentation fault
« Reply #7 on: March 24, 2014, 01:06:10 PM »
Cryptus,

Thank you! That did it. Works now.
Since I know now which file is the source for the trouble, I also found this thread and Arslan S.' post in particular:
http://forum.tinycorelinux.net/index.php/topic,2635.msg19712.html#msg19712

So the driver works now with 3D acceleration.
However, I'm still getting this error message during boot / extension loading:
Code: [Select]
ash: /tmp/tcloop/nvidia-331.49-3.8.13-tinycore/usr/local/lib/xorg/modules: unknown operand
nvidia-331.49-3.8.13-tinycore.tcz is my extension and everything seems to work so far.
If anyone could tell me wether I can ignore this error message or how to get rid of it, that would be nice.

Thanks.
Download a copy and keep it handy: Core book ;)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11022
Re: nvidia drivers - segmentation fault
« Reply #8 on: March 24, 2014, 02:16:46 PM »
Usually extensions don't have multiple "modules" directories, which explains why this wasn't found sooner. Fixed in git, to be in 5.3.
The only barriers that can stop you are the ones you create yourself.

Offline Cryptus

  • Newbie
  • *
  • Posts: 5
Re: nvidia drivers - segmentation fault
« Reply #9 on: March 24, 2014, 02:49:29 PM »
Hopefully solved now...
Just to let you know: yes, I built the nvidia extension with the 331.49 drivers for myself about one month ago and get the same warning "unknown operand",
but the drivers do work flawlessly.
„Denn was berauscht die Leyer vorgesungen, / Das hat des Schwertes freie That errungen.“

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: nvidia drivers - segmentation fault
« Reply #10 on: March 24, 2014, 02:55:25 PM »
I've applied that fix from the git - All pretty again.

Thanks!
Download a copy and keep it handy: Core book ;)