# Nvidia drivers again [SOLVED]

## mounty1

Usual deal, no graphics.  Neither /dev/fb0 nor /dev/dri/ exist.  dmesg output.  Kernel config.  Help please.

----------

## dmpogo

 *mounty1 wrote:*   

> Usual deal, no graphics.  Neither /dev/fb0 nor /dev/dri/ exist.  dmesg output.  Kernel config.  Help please.

 

Not that you need any of these with nvidia-drivers

----------

## russK

mounty1,

I'm assuming you mean to use nvidia, not nouveau.

Have you looked through the wiki page?:  https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers

Regards

----------

## mounty1

 *russK wrote:*   

> mounty1,
> 
> Have you looked through the wiki page?:  https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers

 Yes.

----------

## mounty1

[quote="dmpogo"] *mounty1 wrote:*   

> Not that you need any of these with nvidia-drivers

 I'm sure you're right, but /var/log/Xorg.0.log reports the absence of each as an error.

----------

## NeddySeagoon

mounty1,

Show us what Xorg did - pastebin /var/log/Xorg.0.log

----------

## krinn

```
[    0.764018] vboxdrv: loading out-of-tree module taints kernel.

[    0.764715] vboxdrv: Found 1 processor cores

[    0.889364] EXT4-fs (sda5): re-mounted. Opts: (null)

[    1.064589] vboxdrv: TSC mode is Synchronous, tentative frequency 2599793196 Hz

[    1.064591] vboxdrv: Successfully loaded version 6.0.8 (interface 0x00290008)

[    1.077973] VBoxNetFlt: Successfully started.

```

nvidia-drivers and vboxdrv are not friends.

----------

## NeddySeagoon

mounty1,

Tell us about your kernel and where its runnnig. You have some verf odd messages. 

```
[    0.000000] Notice: NX (Execute Disable) protection cannot be enabled: non-PAE kernel!

[    0.000000] APIC: NR_CPUS/possible_cpus limit of 1 reached. Processor 1/0x1 ignored.
```

You are throwing away one core and with PAE off, this has to be a 32 bit system.

----------

## mounty1

 *NeddySeagoon wrote:*   

> Tell us about your kernel and where its running.

 It is a fairly old machine:

```
processor       : 0

vendor_id       : GenuineIntel

cpu family      : 6

model           : 23

model name      : Pentium(R) Dual-Core  CPU      E5300  @ 2.60GHz

stepping        : 10

microcode       : 0xa07

cpu MHz         : 2600.000

cache size      : 2048 KB

fdiv_bug        : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 13

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm dtherm

bugs            : cpu_insecure

bogomips        : 5199.98

clflush size    : 64

cache_alignment : 64

address sizes   : 36 bits physical, 48 bits virtual

power management:
```

This is the same machine with which you helped me a few weeks ago so I know it can be done.  I very carelessly overwrote the entire root partition so am having to build it all again.

As a separate thought, the kernel is built with the Processor Family set to Pentium-Pro.  I did some investigation, but can't find out if there's a better option.

Later:  I am unable to find the correct Processor Family setting for this CPU.  If anyone can tell me that, I would be obliged.

----------

## mounty1

 *NeddySeagoon wrote:*   

> Show us what Xorg did - pastebin /var/log/Xorg.0.log

 Xorg.0.log. Thanks for looking.

----------

## mounty1

Also,

```
pimpama / # ls -ltr /etc/X11

total 24

drwxr-xr-x 2 root root 4096 Nov 29  2018 xsm

-rwxr-xr-x 1 root root 1192 Jul  3 00:07 chooser.sh

-rwxr-xr-x 1 root root  865 Jul  3 00:07 startDM.sh

drwxr-xr-x 4 root root 4096 Jul  3 10:58 xinit

drwxr-xr-x 2 root root 4096 Jul  9 09:52 Sessions

drwxr-xr-x 2 root root 4096 Jul 13 18:46 xorg.conf.d

pimpama / # ls -ltr /etc/X11/xorg.conf.d/

total 4

-rw-r--r-- 1 root root 100 Jul 13 18:46 20opengl.conf

pimpama / # cat /etc/X11/xorg.conf.d/20opengl.conf 

Section "Files"

        ModulePath "/usr/lib/opengl/nvidia"

        ModulePath "/usr/lib/xorg/modules"

EndSection

pimpama / # ls /usr/lib/opengl/

nvidia

pimpama / # ls /usr/lib/opengl/nvidia/

extensions  lib

pimpama / # ls /usr/lib/xorg/modules/

drivers  extensions  input  libexa.so  libfbdevhw.so  libfb.so  libglamoregl.so  libint10.so  libshadowfb.so  libshadow.so  libvbe.so  libvgahw.so  libwfb.so

pimpama / # ls /usr/lib/opengl/nvidia/*

/usr/lib/opengl/nvidia/extensions:

libglx.so  libglx.so.390.116

/usr/lib/opengl/nvidia/lib:

libEGL_nvidia.so          libEGL.so.1.1.0           libGLESv1_CM_nvidia.so.390.116  libGLESv2_nvidia.so.2        libGL.so            libGLX_nvidia.so.390.116

libEGL_nvidia.so.0        libGLdispatch.so          libGLESv1_CM.so                 libGLESv2_nvidia.so.390.116  libGL.so.1          libGLX.so

libEGL_nvidia.so.390.116  libGLdispatch.so.0        libGLESv1_CM.so.1               libGLESv2.so                 libGL.so.1.7.0      libGLX.so.0

libEGL.so                 libGLESv1_CM_nvidia.so    libGLESv1_CM.so.1.2.0           libGLESv2.so.2               libGLX_nvidia.so    libOpenGL.so

libEGL.so.1               libGLESv1_CM_nvidia.so.1  libGLESv2_nvidia.so             libGLESv2.so.2.1.0           libGLX_nvidia.so.0  libOpenGL.so.0

pimpama / #
```

----------

## russK

mounty1,

I do not see a Xorg.0.log entry that says, LoadModule: "nvidia"

Do you have VIDEO_CARDS="nvidia" in make.conf?

Can you post emerge --info x11-base/xorg-drivers ?

Regards

----------

## Jaglover

 *Quote:*   

> As a separate thought, the kernel is built with the Processor Family set to Pentium-Pro. I did some investigation, but can't find out if there's a better option.

 

Any reason you are not using 64-bit operating system, it seems you have at least 2 GB of RAM? 32-bit is less and less supported/tested as it is used only in special cases.

You should use -march=native, or in case you use distcc you can determine -march with

```
gcc -### -E - -march=native 2>&1 | sed -r '/cc1/!d;s/(")|(^.* - )|( -mno-[^\ ]+)//g'
```

----------

## mounty1

Nvidia definitely in make.conf:

```
pimpama / # grep VIDEO /etc/portage/make.conf

VIDEO_CARDS="nvidia fbdev"
```

and:

```
pimpama / # emerge --info x11-base/xorg-drivers

Portage 2.3.68 (python 3.6.8-final-0, default/linux/x86/17.0/desktop/gnome/systemd, gcc-9.1.0, glibc-2.29-r2, 4.14.12-gentoo i686)

=================================================================

                         System Settings

=================================================================

System uname: Linux-4.14.12-gentoo-i686-Pentium-R-_Dual-Core_CPU_E5300_@_2.60GHz-with-gentoo-2.6

KiB Mem:     2067448 total,     67836 free

KiB Swap:    2000056 total,   1999536 free

Timestamp of repository gentoo: Fri, 05 Jul 2019 21:15:01 +0000

Head commit of repository gentoo: ad152022e3fc8080b7f8015cf0a172becfe8237d

sh bash 5.0_p7

ld GNU ld (Gentoo 2.32 p2) 2.32.0

app-shells/bash:          5.0_p7::gentoo

dev-lang/perl:            5.30.0::gentoo

dev-lang/python:          2.7.16::gentoo, 3.6.8::gentoo

dev-util/cmake:           3.14.5::gentoo

dev-util/pkgconfig:       0.29.2::gentoo

sys-apps/baselayout:      2.6-r1::gentoo

sys-apps/sandbox:         2.17::gentoo

sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo

sys-devel/automake:       1.16.1-r1::gentoo

sys-devel/binutils:       2.32-r1::gentoo

sys-devel/gcc:            9.1.0-r1::gentoo

sys-devel/gcc-config:     2.0::gentoo

sys-devel/libtool:        2.4.6-r5::gentoo

sys-devel/make:           4.2.1-r4::gentoo

sys-kernel/linux-headers: 5.1::gentoo (virtual/os-headers)

sys-libs/glibc:           2.29-r2::gentoo

Repositories:

gentoo

    location: /usr/portage

    sync-type: rsync

    sync-uri: rsync://rsync.gentoo.org/gentoo-portage

    priority: -1000

    sync-rsync-verify-max-age: 24

    sync-rsync-verify-metamanifest: yes

    sync-rsync-extra-opts: 

    sync-rsync-verify-jobs: 1

Installed sets: @Cinna-desktop, @linux-firmware, @powerful, @sheila

ACCEPT_KEYWORDS="x86 ~x86"

ACCEPT_LICENSE="@FREE"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/lib/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"

FCFLAGS="-O2 -march=i686 -pipe"

FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"

FFLAGS="-O2 -march=i686 -pipe"

GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo http://mirror.pacific.net.au/linux/Gentoo ftp://ftp.swin.edu.au/gentoo ftp://mirror.pacific.net.au/linux/Gentoo "

LANG="en_GB.utf8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="en en_GB"

MAKEOPTS="-j1 -s"

PKGDIR="/var/cache/binpkgs"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"

PORTAGE_TMPDIR="/mnt/vault"

USE="3dnow 3dnowext X a52 aac acl acpi ada alsa apci autoipd avahi berkdb branding bzip2 cairo cdda cdr cjk cli colord context crypt cups cxx dbus detex disk-partition doc dri dts dv dvb dvd dvdr dvi2tty emboss encode epspdf evo exif extras fam flac fontconfig foomatic fortran freerdp gbm gd gdbm gif git glamor glibc-omitfp gnat_2018 gnome gnome-keyring gnome-online-accounts gnutls gpm graphics gstreamer gtk gtk3 humanities iconv icu imap inotify introspection jadetex jpeg jpeg2k kms kpathsea lame latex lcms ldap libnotify libsecret libtirpc low-memory luatex lzma lzo mad mercurial metapost mmap mms mng mp3 mp4 mpeg msn mtp musepack music nautilus ncurses nfsv41 nls nntp npp nptl nsplugin odbc ogg openexr opengl openmp oscar oss pam pango pcre pdf pdfannotextractor png policykit postgres ppds pstricks publishers pulseaudio qt5 quicktime rdesktop readline real rss sasl science sdl seccomp slang smime spam-report spamassassin spell sql ssh ssl startup-notification subversion svg systemd taglib tcpd tex4ht texi2html theora threads tiff tracker truetype udev udisks unicode upower usb v4l2 vcd vim-syntax vnc vorbis wavpack wayland win32codecs wmf wxwidgets x264 x86 xattr xcb xcomposite xetex xface xine xml xmp xnest xpm xv xvid yahoo zlib" ABI_X86="32" ALSA_CARDS="intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="nvidia fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================

                        Package Settings

=================================================================

x11-base/xorg-drivers-1.20::gentoo was built with the following:

USE="" INPUT_DEVICES="evdev -elographics -joystick -keyboard -libinput -mouse -synaptics -vmmouse -void -wacom" VIDEO_CARDS="fbdev nvidia -amdgpu -ast -dummy (-freedreno) -geode -glint -i915 -i965 -intel -mga -nouveau -nv (-omap) -qxl -r128 -radeon -radeonsi -siliconmotion (-tegra) (-vc4) -vesa -via -virtualbox -vmware"
```

Note that the kernel name is different from that which I posted earlier (4.18.5-gentoo-nvidia) because the computer is dual-boot and I have chrooted to obtain the answers in this post, because it's my wifes computer and she's using it now.

----------

## NeddySeagoon

mounty1,

Even if you don't redo the install to be 64 bit, you should enable the other CPU core and PAE, so you get NX and other good things. 

From your Xorg.0.log

```
[    49.748] (II) NVIDIA GLX Module  390.116  Sun Jan 27 06:04:02 PST 2019

[    49.748] (==) Matched nouveau as autoconfigured driver 0

[    49.748] (==) Matched nv as autoconfigured driver 1

[    49.748] (==) Matched modesetting as autoconfigured driver 2

[    49.748] (==) Matched fbdev as autoconfigured driver 3

[    49.748] (==) Matched vesa as autoconfigured driver 4
```

You have eselect opengl set to nvidia, from the first line of the quote.

The other lines show that the auto driver detection is active and is not considering nvidia-drivers as an option.

You need a stub xorg.conf to tell Xorg to use nvidia-drivers. Its only three lines.

To get the other half of your system active, check your kernel for

[*] Symmetric multi-processing support

[*] Multi-core scheduler support

(2) Maximum number of CPUs

I'm not 100% sure of the kern CPU type you need but 

```
(X) Generic-x86-64
```

will be better than Pentium Pro.

You will still get a 32 bit kernel but it can take advantage of all the new registers in the 64 bit silicon that are not in the Pentium Pro.

To get PAE support, (the NX bit) you must enable HIMEM support.

----------

## mounty1

Thanks Neddy, I added SMP, multi-core and 2 CPUs but couldn't find a Generic-x86-64 option.  I'll have to look harder for which CPU family is closest. 

Although I appreciate your pointing me to better usage of the hardware (I've noticed that is rather slow slow for a machine of its vintage), I do want to get back on the track of getting the Nvidia drivers working again.  I am kicking myself repeatedly for overwriting the working system.  Any suggestions on the next step on the video front?

----------

## NeddySeagoon

mounty1,

What did 

 *NeddySeagoon wrote:*   

> You need a stub xorg.conf to tell Xorg to use nvidia-drivers. Its only three lines. 

  do for you or was it buried in the rest of the post?

I don't have a 32 bit system handy, so I have to cheat to see its config on my amd64

```
# ARCH=x86 make menuconfig
```

 Hmm I don't see that Generic option now either.

----------

## mounty1

Neddy, thank you so much for your usual patience and persistence.

The dual-CPU kernel is (obviously) much faster;  I'm sure my wife will be pleased with the lack of tearing and stuttering when she's watching TV replays etc.

I ran nvidia-xconfig and the /etc/X11/xorg.conf that it generated got the nvidia drivers loaded when X started.  It all works better than ever now.

Thanks to the others who contributed as well (incl. anon-E-moose below);  you all asked useful questions and steered the discussion to success.

----------

## Anon-E-moose

 *mounty1 wrote:*   

> Thanks Neddy, I added SMP, multi-core and 2 CPUs but couldn't find a Generic-x86-64 option.  I'll have to look harder for which CPU family is closest. 

 

```
Wolfdale-3M (Pentium Dual-Core) – 45 nm process technology

    Intel Pentium E5300 – 2.60 GHz (2 MB L2, 800 MHz FSB)
```

For family core2 should be the one to use.

 Edit to add: cat /proc/cpuinfo |grep -i family should return "6" 

As far as selecting Generic-x86-64, that may be constrained by ARCH, which is constrained by the profile you use (just a guess)

----------

## mounty1

[quote="Anon-E-moose"] *mounty1 wrote:*   

> As far as selecting Generic-x86-64, that may be constrained by ARCH, which is constrained by the profile you use (just a guess)

 I suppose in due course I'll have to install a 64-bit Gentoo, just because NVidia provide drivers only for that word-length now.  There's no other reason, on a machine with 2 GiB of RAM.

OBTW Anon-E-moose:  I just had reason to make menuconfig on a 64-bit kernel, and Generic-x86-64 is offered there, so it does seem to be related to architecture.

----------

