WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TC & NVidia  (Read 29612 times)

SeventhSin

  • Guest
Re: TC & NVidia
« Reply #60 on: July 05, 2019, 01:47:40 PM »
Great, but did you read all the install notes within the info file first?
http://tinycorelinux.net/10.x/x86/tcz/nvidia-390.87-4.19.10-tinycore.tcz.info

Code: [Select]
Or use "nvidia-xconfig", you may need to install
these additional dependencies:
Xorg-7.7-3d-dev.tcz
xorg-server-dev.tcz
pkg-config.tcz
autoconf.tcz
bash.tcz.
run "mkdir -p /etc/X11"
run "sudo nvidia-xconfig"
run "startx"
then add /etc/X11/xorg.conf to your backup

Oopsie... busted!  :o

My initial working assumption was that the extension would configure the system fully. My noggin automatically made it, because as a developer I follow the fundamental principle of never trusting the user and naturally I thought everybody follows it too.  My bad.  ::)

I'll test again after my machines are done building. I think I have a couple of suggestions, but I want to test my assumptions first. In the interim, I'm thinking (out-loud):

a) Maybe the simplest and safest path would be to add the nvidia-xconfig dependencies to the driver extension as well?
b) Maybe saving a couple of MB is not worth the trouble of optimizing too much, because...

In tinycore it is expected to read the extension info file before installing,  indeed it is the default action of tce-ab from the command line to view the "extension_name.info" file before installing

... the above expectation will be probably violated time and time again.  :-X

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: TC & NVidia
« Reply #61 on: July 05, 2019, 03:20:04 PM »
Just a reminder : don't forget to evaluate our related project, dCore, for your project needs.

It might reduce some of the toolkit-approach to getting your X needs / drivers together, yet at the same time seem to have much the same overall objectives as TinyCore.  The same, but different. :)

Skills learned in one benefit the other, and one may end up being a better fit for your project.  All without leaving the fold so to speak...
That's a UNIX book! - cool  -- Garth

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: TC & NVidia
« Reply #62 on: July 05, 2019, 04:41:24 PM »
Hi SeventhSin
... b) Maybe saving a couple of MB is not worth the trouble of optimizing too much, because...

In tinycore it is expected to read the extension info file before installing,  indeed it is the default action of tce-ab from the command line to view the "extension_name.info" file before installing

... the above expectation will be probably violated time and time again.  :-X

From  http://tinycorelinux.net/welcome.html:
Quote
The user has complete control over which applications and/or additional hardware to have supported, be it for a desktop, a netbook, an appliance, or server, selectable by the user by installing additional applications from online repositories, or easily compiling most anything you desire using tools provided.

From http://tinycorelinux.net/intro.html:
Quote
Not a 'turnkey' operating system. Tiny Core can help you do what you need to do, but Tiny Core stays tiny by not including tools like a browser or word processor (but Tiny Core can help you download and install those really quickly).


Not for everyone. Tiny Core is fast, powerful, and flexible. You can use Tiny Core without much technical knowledge, but, like any strong tool, Tiny Core becomes really useful if you know how to use it. Great starter skills could include command line usage, simple shell scripting, and Linux file and permission management, and some reasonably fast typing skills.
Based on those quotes, I would suggest reading is always a requirement when using a distro such as this. Of course, you would
have had to read the quoted pages in the first place to realize that. :)

SeventhSin

  • Guest
Re: TC & NVidia
« Reply #63 on: July 05, 2019, 05:02:12 PM »
Based on those quotes, I would suggest reading is always a requirement when using a distro such as this. Of course, you would
have had to read the quoted pages in the first place to realize that. :)

Am I in the process of getting ... politically spanked?  :o

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: TC & NVidia
« Reply #64 on: July 05, 2019, 05:28:29 PM »
LOL

Sorry it wasn't meant that way, just showing where to look for install instructions.

Meanwhile Xorg doesn't necessarily need an /etc/X11/Xorg.conf file any more.   However Xorg loads appropriate drivers if it know where to look.   So I created a default Xorg.conf.d nvidia config file which appears to work as expected.

I've added code to the Nvidia extension startup script to create this default Xorg Nvidia config file, meanwhile you may try this script
Code: [Select]
#!/bin/sh

if [ ! -e /usr/local/share/X11/xorg.conf.df/20-Nvidia.conf ]; then
sudo touch /usr/local/share/X11/xorg.conf.d/20-Nvidia.conf
sudo chmod a=rw /usr/local/share/X11/xorg.conf.d/20-Nvidia.conf
cat <<EOF >/usr/local/share/X11/xorg.conf.d/20-Nvidia.conf

Section "Device"
        Identifier "Nvidia Card"
        Driver "nvidia"
        VendorName "NVIDIA Corporation"
EndSection


EOF

fi


Usual procedure: create an executable file where you can execute it on next boot,  copy and save the above code to the it.   Run the script before running " startx "

Results may depend on your hardware, but I think you'll be successful with this.


But please don't forget this on 32bit installations,
Quote
NOTE: Some Nvidia cards require to specify a vmalloc limit on 32bit kernels therefore consider
      adding vmalloc=256MB to your boot config command line otherwise the driver may fail to load
      eg "linux /boot/vmlinuz vmalloc=256MB"
YMMV try 256MB first, 384MB works best for my system
« Last Edit: July 05, 2019, 05:54:03 PM by coreplayer2 »

SeventhSin

  • Guest
Re: TC & NVidia
« Reply #65 on: July 05, 2019, 06:31:20 PM »
LOL

Sorry it wasn't meant that way, just showing where to look for install instructions.

@coreplayer2, no need to be sorry, you are perfectly right to pinpoint that there are in fact installation instructions and those should be read. I was addressing Rich, who seemed willing to give me a good spanking for skipping release notes.  ::)

Going to test the proprietary extension ASAP. Keep you posted.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: TC & NVidia
« Reply #66 on: July 05, 2019, 09:06:09 PM »
Oooops my bad, I just noticed a typo in this script

Corrected
Code: [Select]
#!/bin/sh

if [ ! -e /usr/local/share/X11/xorg.conf.d/20-Nvidia.conf ]; then
sudo touch /usr/local/share/X11/xorg.conf.d/20-Nvidia.conf
sudo chmod a=rw /usr/local/share/X11/xorg.conf.d/20-Nvidia.conf
cat <<EOF >/usr/local/share/X11/xorg.conf.d/20-Nvidia.conf

Section "Device"
        Identifier "Nvidia Card"
        Driver "nvidia"
        VendorName "NVIDIA Corporation"
EndSection


EOF

fi




Sent from my iPhone using Tapatalk

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: TC & NVidia
« Reply #67 on: July 07, 2019, 04:05:53 PM »
hello SeventhSin

Regarding the Nvidia 32bit repo extensions,  nvidia-390.87-4.19.10-tinycore.tcz and nvidia-390.87-4.19.10-tinycore64.tcz (for Core64 only) have been updated with
1. separation of unneeded GLX/OpenGL files, reducing the extension size considerably
2. creation of config file to assist Xorg detect and use Nvidia driver without need to run nvidia-xconfig

see http://forum.tinycorelinux.net/index.php/topic,23026.msg143908.html#msg143908


nextup: Nvidia extensions for corepure64

regards
« Last Edit: July 07, 2019, 04:07:38 PM by coreplayer2 »

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: TC & NVidia
« Reply #68 on: July 07, 2019, 05:30:49 PM »
hey, i don't have any nvidia card right now. but this sounds good, so if i get to make a choice soon about new hardware i'll remember there's a lightweight driver for nvidia as part of tc. thanks coreplayer2 ;)

(i have an aversion to create Xorg config files, so i'm happy i would not need to do that, haha)

SeventhSin

  • Guest
Re: TC & NVidia
« Reply #69 on: July 08, 2019, 08:10:19 AM »
hello SeventhSin

Regarding the Nvidia 32bit repo extensions,  nvidia-390.87-4.19.10-tinycore.tcz and nvidia-390.87-4.19.10-tinycore64.tcz (for Core64 only) have been updated with
1. separation of unneeded GLX/OpenGL files, reducing the extension size considerably
2. creation of config file to assist Xorg detect and use Nvidia driver without need to run nvidia-xconfig

see http://forum.tinycorelinux.net/index.php/topic,23026.msg143908.html#msg143908


nextup: Nvidia extensions for corepure64

regards

Hey coreplayer2. That sounds great, thank you for this!

I was actually about to start the tests, but I will wait for the 64 bit extension to pop-up in it's final form in the repo. That way I can test both x86-32 & x86-64 with the latest enhancements in one go.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: TC & NVidia
« Reply #70 on: July 31, 2019, 03:18:42 AM »
Hello SeventhSin

Nvidia drivers updated to 390.116 and posted

In x86 repo
nvidia-390.116-4.19.10-tinycore.tcz
nvidia-390.116-4.19.10-tinycore64.tcz  (core64 version)

In x86_64 repo
nvidia-390.116-4.19.10-tinycore64.tcz  (corepure64 version)

http://forum.tinycorelinux.net/index.php/topic,23026.msg144532.html#msg144532

hope those work for you,  remember the 32 version will likely require " vmalloc=256MB " bootcode

Offline wilzyy

  • Newbie
  • *
  • Posts: 2
    • shroud settings
Re: TC & NVidia
« Reply #71 on: August 10, 2019, 02:36:36 AM »
Thanks on the guide it works for me!

Offline mutantape

  • Newbie
  • *
  • Posts: 3
Re: TC & NVidia
« Reply #72 on: April 30, 2020, 04:29:28 PM »
Thanks a lot, with these extensions i've been able to see TC in full screen for the first time ever, years after i first came to know it. And it makes a huge difference in readibility.( not to mention the potential problems with screen burn)

I am using an Nvidia GT520 card.
In Tc 10.0, i just load
nvidia-390.116-4.19.10-tinycore.tcz
Xorg-7.7.tcz
and it works, after Ctrl/Alt/Backspace then startx...Well,almost, since i have a french keyboard, i have to add an xorg.conf file like the one below (in /etc/X11, that i have to make persistent):

Did you also see those sites stating it is possible to change the scaling in Vesa Bios using code such as :
Code: [Select]
mov ax,4F14h ;VESA VBE OEM function
    mov bl,2     ;Subfunction 02 = Set Panel Expansion/Centering
    mov bh,1     ;00 = Return Current Setting, 01 = Set Centering/Expansion
    mov cx,0001h ;Exp. mode: 00 = Scaled, 01 = Centered 1:1, 02 = Left Corner 1:1
    int 10h      ;call VGA/VBE service
https://www.tonymacx86.com/threads/nvidia-how-to-get-rid-of-the-black-border.121519/

This suggests it could work with Xvesa, provided this code can be executed early enough in the boot.


Code: [Select]
# **********************************************************************
# Module section -- this  section  is used to specify
# which dynamically loadable modules to load.
# **********************************************************************
#
Section "Module"

# This loads the DBE extension module.
Load        "dbe"  # Double buffer extension

EndSection

# **********************************************************************
# Files section.  This allows default font paths to be set
# **********************************************************************

Section "Files"

# Multiple FontPath entries are allowed
FontPath   "/usr/share/X11/fonts/misc/"
FontPath   "/usr/share/X11/fonts/Type1/"
FontPath   "/usr/share/X11/fonts/TTF/"

EndSection

# **********************************************************************
# Server flags section.
# **********************************************************************

Section "ServerFlags"

# Enables mode switching with xrandr
Option "RandR" "on"

# With this, Xorg talks to udev to add evdev devices
Option "AutoAddDevices" "true"

# Xorg 7.4, Ubuntu Jaunty, CTRL-ALT-BACKSPACE is disabled by default...
Option "DontZap" "false"

EndSection

# ===============================================================

Section "InputClass"
Identifier "keyboard-all"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver      "evdev"
Option      "XkbRules" "evdev"
Option      "XkbModel" "pc104" #xkbmodel0
Option      "XkbLayout" "fr"
Option      "XkbVariant" "" #xkbvariant0
Option      "XkbOptions" "terminate:ctrl_alt_bksp" #xkboptions0
EndSection

Section "Monitor"
Identifier   "Monitor0"
VendorName   "Monitor Vendor"
ModelName    "Monitor Model"
EndSection

Section "Modes"
Identifier "Modes0"
EndSection

Section "Device"
Identifier     "Device0"
Driver         "nvidia"
VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
Identifier "Screen0"
Device     "Card0"
Monitor    "Monitor0"
EndSection

Section "ServerLayout"
Identifier     "X.org config"
Screen         "Screen0"
EndSection

    [EDIT]: Added code tags.  Rich
« Last Edit: April 30, 2020, 05:02:42 PM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: TC & NVidia
« Reply #73 on: April 30, 2020, 05:05:03 PM »
Hi mutantape
Welcome to the forum.

Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly.
« Last Edit: August 01, 2020, 01:23:54 PM by Rich »

Offline mutantape

  • Newbie
  • *
  • Posts: 3
Re: TC & NVidia
« Reply #74 on: April 30, 2020, 05:11:32 PM »
Unfortunately, i am no closer to my goal of having qemu + kvm working on a full screen TC.

qemu + qvm seem to work very well on TC 6.4, but then this version does not have those magic nvidia drivers->black borders
TC 10.0 has the nvidia drivers so is full screen, but then qemu +kvm seem to be broken on this one.
Qemu+ kvm seem to work better on TC 11.1, though perhaps full screen is a bit strange, but again with no nvidia drivers.
(all of that on the same physical machine exactly, always using the 32 bit versions though the machine can take 64).

I've tried to compile the 390.116 for TC 11.1, but there are compilation errors, it does not seem to be able to adjust to the new kernel.
I've been able to compile and install the 390.132 (Nvidia still lists my card in this one), but when i go startx i get a black screen and the machine is completely stuck, it is not even possible to exit the Gui with Ctrl Alt Backspace. Blindly typing sudo reboot or poweroff has no effect.

I start TC 11.1 with boot option nvidia-drm.setmode=1, then i load
i2c-5.4.3-tinycore.tcz
graphics-5.4.3-tinycore.tcz (without those two i get an nvidia-drm.ko load error)
Xorg-7.7.tcz (need the various related folder to put nvidia files)
compiletc.tcz
linux-kernel-sources-env.tcz
Then i do the cliorx command suggested in linux-kernel-sources-env info which apparently starts the full kernel compilation.
Since i have no memory left in rootfs after that i move the resulting linux tree to /dev/shm, then run the
NVIDIA-Linux-x86-390.132.run with --kernel-source-path option, specifying my new path in shm.
It builds ok there is a long pause where nothing happens, then it proceeds to files installation, and loads modules to memory.
Every message seems  Ok, and the installer exits.
startx->fall into the black hole.
Anyone with more luck or talent in these matters ?

By the way is there a magic TC tool to automatically extract new files added in the rootfs by such an installer ? There seems to be no way to do a simple make install to a folder.  I am thinking of a
ls -lR > file.txt before and after, then a diff and a small bash script to copy based on the info, but surely TC developers must already have something for  this ?


« Last Edit: April 30, 2020, 05:30:09 PM by mutantape »