Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot start Xorg. could not insert 'nvidia' no such device.
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
notCarl
n00b
n00b


Joined: 28 Sep 2016
Posts: 27

PostPosted: Fri Oct 07, 2016 3:31 am    Post subject: Cannot start Xorg. could not insert 'nvidia' no such device. Reply with quote

I am trying to get a fresh installed set up. My current problem has to do with my nvidia drivers I believe. When I try to run x.org with $startx I get a "mod probe: ERROR: could not insert 'nvidia' : no such device.
Then Using config file..
using config directory..
using system config..
I am new to Gentoo and expect my .conf files to be riddled with errors.

Here is my /etc/portage/make.conf
https://paste.pound-python.org/show/UYty50Oag7NP50MUTUaA/

I have an intel i5 and an nvidia gtx 970 if that matters.

Here is my /etc/X11/xorg.conf
https://paste.pound-python.org/show/2ga7g8Tjz09mmceoC0HD/
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Fri Oct 07, 2016 3:44 am    Post subject: Reply with quote

Probably some driver in kernel grabbed the card and nvidia driver cannot load. No telling, you haven't provided Xorg log nor kernel config nor dmesg.
Back to top
View user's profile Send private message
notCarl
n00b
n00b


Joined: 28 Sep 2016
Posts: 27

PostPosted: Fri Oct 07, 2016 4:15 am    Post subject: Reply with quote

xorg log: https://paste.pound-python.org/show/CORChvVnXefjJ1UQGWe5/

Kernel .conf: https://paste.pound-python.org/show/s1pGkxmI9VwV86joXTkE/

I unfortunately don't know what the dmesg is that I should be looking for
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Fri Oct 07, 2016 4:42 am    Post subject: Reply with quote

You should follow Gentoo nVidia wiki.
Back to top
View user's profile Send private message
notCarl
n00b
n00b


Joined: 28 Sep 2016
Posts: 27

PostPosted: Fri Oct 07, 2016 6:43 am    Post subject: Reply with quote

Been going through the Xorg and Nvidia Wiki word for word during my free time the last few days.
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1520
Location: KUUSANKOSKI, Finland

PostPosted: Fri Oct 07, 2016 7:06 am    Post subject: Reply with quote

Hi.
Install wgetpaste if you haven't already.

Then run
as root (preferably):
wgetpaste -c dmesg
... and give us the link.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
notCarl
n00b
n00b


Joined: 28 Sep 2016
Posts: 27

PostPosted: Fri Oct 07, 2016 7:11 am    Post subject: Reply with quote

here is the dmesg link: https://paste.pound-python.org/show/ai8UWiYloo8i94Q4LhR7/
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1520
Location: KUUSANKOSKI, Finland

PostPosted: Fri Oct 07, 2016 7:33 am    Post subject: Reply with quote

Well, there you have it:
https://paste.pound-python.org/show/ai8UWiYloo8i94Q4LhR7/:
[    7.622773] NVRM: The NVIDIA probe routine was not called for 1 device(s).
[    7.622775] NVRM: This can occur when a driver such as:
               NVRM: nouveau, rivafb, nvidiafb or rivatv
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
[    7.622776] NVRM: Try unloading the conflicting kernel module (and/or
               NVRM: reconfigure your kernel without the conflicting
               NVRM: driver(s)), then try loading the NVIDIA kernel module
               NVRM: again.
[    7.622778] NVRM: No NVIDIA graphics adapter probed!
[    7.622779] [drm] Module unloaded
Check that you don't have those conflicting modules loaded.
You may blacklist them or remove completely by reconfiguring your kernel and compiling it.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43209
Location: 56N 3W

PostPosted: Fri Oct 07, 2016 7:40 am    Post subject: Reply with quote

notCarl,

The nVidia binary blob driver will not load if a kernel framebuffer driver has grabbed the video device.
More exactly, it will to coexist with a framebuffer driver that sets up the hardware.

In the framebuffer part of the kernel setup, almost everything must be off.
CONFIG_FB_NVIDIA=m will prevent the nVida kernel module loading.

CONFIG_FB_VESA=y used to work for me, with dire warnings from the nVidia driver.
CONFIG_FB_EFI=y may work. I don't have an EFI system to test.
# CONFIG_FB_SIMPLE is not set might work too as it does not do any hardware setup.

All the other Framebuffer hardware drivers in that kernel menu must be off.

You also have CONFIG_DRM_NOUVEAU=m. That's the open source kernel module for your card.
If that loads before the binary blob kernel module, the same thing happens.
In particular, it sets up the video card and gives you a nice framebuffer console.

CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y tells that you have your display in portrait mode.
If that's correct, fine.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Fri Oct 07, 2016 12:08 pm    Post subject: Reply with quote

CONFIG_FB_EFI=y works, FWIW.
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 630

PostPosted: Fri Oct 07, 2016 4:02 pm    Post subject: Reply with quote

I agree with Neddy and Buffoon,

As a reference, I have a working box with nvidia,

My kernel .config has this for _FB,
zgrep _FB_ /proc/config.gz: https://paste.pound-python.org/show/E2zmWEvJmx9KTI50kSt8/


And I have this:
Code:
 $ zgrep -i nouveau /proc/config.gz
# CONFIG_DRM_NOUVEAU is not set


HTH
Back to top
View user's profile Send private message
notCarl
n00b
n00b


Joined: 28 Sep 2016
Posts: 27

PostPosted: Mon Oct 10, 2016 4:42 pm    Post subject: Reply with quote

I believe I may have made some progress, but I have a new error now. "could not insert 'nvidia' : Unknown symbol in module, or unknown parameter.

After lots of searching online, I found a thread with similar problems and the problem was that an old kernel was being loaded.
I used $uname -a, and the kernel I'm using is version #1 last built on Friday September 30th. I have definitely rebuilt my kernel many times since then with make menuconfig and then rebuilding by following the wiki. All the steps found on the wiki for rebuilding are below.

$make && make modules_install
$mount /boot
$make install
$grub-mkconfig -o /boot/grub/grub.cfg

Is uname -a showing a date of september 30th a sign that I am still using my first kernel build and not using the new ones after I've added/removed driver configurations?

Here is dmesg: https://paste.pound-python.org/show/NLSGwVNmeOPjqxMY3s6R/
kernel cfg: https://paste.pound-python.org/show/aOwRmgrRAAcsEcJQ4BlX/
make.conf: https://paste.pound-python.org/show/4b7DhPlikeJQuVgK5w9l/
xorg log: https://paste.pound-python.org/show/yvCRp4r6qHfBeXBlb1so/
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43209
Location: 56N 3W

PostPosted: Mon Oct 10, 2016 5:24 pm    Post subject: Reply with quote

notCarl,

dmesg:
[    0.000000] Linux version 4.4.21-gentoo (root@livecd) (gcc version 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4) ) #1 SMP Fri Sep 30 11:22:39 CDT 2016

That's an end of September kernel build that in use.

Lets check some file dates and times to see what's actually happening.
Sight of
Code:
ls -l /boot
and the content of grub.cfg might be useful too.

First of all, there are two ways to
Code:
cd /usr/src/<kernel>

One is
Code:
cd /usr/src/linux
That depends on the linux symlink pointing to the right place.
Code:
$ ls -l /usr/src/
total 48
lrwxrwxrwx  1 root root   18 Oct 10 16:24 linux -> linux-4.8.1-gentoo
drwxr-xr-x 26 root root 4096 Sep 30 23:21 linux-4.6.0-gentoo
drwxr-xr-x 26 root root 4096 Oct 10 17:01 linux-4.8.1-gentoo

For users building out of kernel kernel modules. The link must be correct as its followed by the out of kernel modules to know which kernel to build against.
Its quite common to deliberately build nvidia-drivers against one kernel while you run another.
Think kernel upgrades. Is your symlink correct?
If not, fix it, rebuild and reinstall your kernel, then
Code:
emerge -1 nvidia-drivers
so you know that nvida-drivers is built against the right kernel.

Test here and look at uname -a after the reboot.

With the symlink sorted out, if you are still running an old kernel. Proceed as follows.
Code:
cd /usr/src/linux
ls -l .config
make note of the file date and time. A kernel build starts with this file. It must be the oldest of all the files we will examine.
If its Sep 30, you have not been configuring this kernel, or if you have, the changes have not been saved.
Next
Code:
ls -l arch/x86/boot/bzImage
This is your kernel binary. If all is well it will be newer than the .config file.
If not, it does not belong to the .config above. That suggests the kernel build failed and you didn't notice. Hence there is an old file here.
This file, or one of its copies, gets installed to /boot.
Do
Code:
ls -l /boot
Is there a file with the same timestamp within a few seconds?
If not, the install failed. Is /boot full ?
Try
Code:
df -h
df -ih
running out of space or i-nodes is a very bad thing.

Is this the right boot?
You should see directories for grub and lost+found if you have a separate boot partition.
lost+found will be missing if /boot is a directory on your root filesystem.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Oct 10, 2016 5:30 pm    Post subject: Reply with quote

In addition to what Neddy said, if Gentoo is your sole OS I'd recommend not to rely on grub-mkconfig, control it manually instead.
Back to top
View user's profile Send private message
notCarl
n00b
n00b


Joined: 28 Sep 2016
Posts: 27

PostPosted: Mon Oct 10, 2016 5:52 pm    Post subject: Reply with quote

I listed my system link and it is pointing to an old kernel, and i see the kernel with todays date below it. That almost sounds like good news. However! I went through most of your steps before making any wgetpaste links, and I think I made a mistake mounting my /boot directory. No disk space is even close to being full, but my lost+found and boot are both in my / directory and the boot directory is empty when i $ls -l /boot. Am I doomed?

here is my df -h
https://paste.pound-python.org/show/PMYKc9Fhwp2ro6vCjwHH/
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Oct 10, 2016 6:26 pm    Post subject: Reply with quote

Empty /boot means your boot partition is not mounted.
Back to top
View user's profile Send private message
notCarl
n00b
n00b


Joined: 28 Sep 2016
Posts: 27

PostPosted: Mon Oct 10, 2016 6:41 pm    Post subject: Reply with quote

Would this fstab config give any clue to why my boot isn't mounted on startup ?
https://paste.pound-python.org/show/SpwLE4vJNJQoLPzsK3g8/
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Oct 10, 2016 7:09 pm    Post subject: Reply with quote

There is no need to mount /boot at boot time, this is why Gentoo default is noauto. You need to mount it though when you upgrade your kernel.
Back to top
View user's profile Send private message
notCarl
n00b
n00b


Joined: 28 Sep 2016
Posts: 27

PostPosted: Mon Oct 10, 2016 7:22 pm    Post subject: Reply with quote

Alright. I see now that it is normal for /boot to not mount on startup.
Here is my ls -l /boot
https://paste.pound-python.org/show/2C6fltllDPHD0wVX3COn/

Grub.cfg: https://paste.pound-python.org/show/n8xVRhMelJOvli9Zk873/

here is my ls -l /usr/src: https://paste.pound-python.org/show/KZa8NVwb7T57Zl0cjtZG/

It lists the more current kernel, however when i use eselect kernel list it only shows [1] linux-4.4.21-gentoo *
I also see in the wiki that I can either USE="symlink" or I can set it manually. Are these the correct steps?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43209
Location: 56N 3W

PostPosted: Mon Oct 10, 2016 10:31 pm    Post subject: Reply with quote

notCarl,

ls -l /boot:
-rw-r--r-- 1 root root  5091680 Oct 10 01:33 vmlinuz-4.4.21-gentoo

Is the kernel you need to boot. At least, its your newest kernel.
There is no matching initrd, but if the kernel is configured properly, that's OK.

Your ls -l /usr/src is correct.
linux-4.4.21-gentoo is your only kernel. linux is a link to your kernel. Its name never changes, unlike the real kernel directory.

In /boot, you have three kernels
Code:
-rw-r--r-- 1 root root  4951072 Sep 30 11:22 kernel-genkernel-x86_64-4.4.21-gentoo
-rw-r--r-- 1 root root  5091680 Oct 10 01:33 vmlinuz-4.4.21-gentoo
-rw-r--r-- 1 root root  5091680 Oct 10 00:07 vmlinuz-4.4.21-gentoo.old


The default Grub entry, starting at line 92 in your pastebin, boots kernel-genkernel-x86_64-4.4.21-gentoo, which is your Sep 30 kernel.
The first two entries in the Advanced Submenu also boot that kernel.
You need to boot the third entry in the Advanced Submenu.

There may be a problem. Grubs autoblackmagic has made that boot entry read.
Line 161 ...

Code:
      echo   'Loading Linux 4.4.21-gentoo ...'
      linux   /vmlinuz-4.4.21-gentoo root=UUID=9ea1f55f-2284-4010-af49-25842c2e8b8e ro 
      echo   'Loading initial ramdisk ...'
      initrd   /initramfs-genkernel-x86_64-4.4.21-gentoo
but that initrd belongs to your original kernel. Its modules will not match your new kernel.

If you need an intrd to boot, you need a new one. If not, comment out
Code:
       echo   'Loading initial ramdisk ...'
      initrd   /initramfs-genkernel-x86_64-4.4.21-gentoo
so your kernel does not get confused.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
notCarl
n00b
n00b


Joined: 28 Sep 2016
Posts: 27

PostPosted: Mon Oct 10, 2016 11:36 pm    Post subject: Reply with quote

Thanks for the help so far.

I followed your steps and made sure to comment those two lines in the 3rd event to load the kernel, but the problem remains. Can I build a new initramfs file for my newest kernel or do I have to rebuild the kernel again? Is there a reason I have 3 kernels in my /boot but only one initramfs? I imagine this error was caused when I kept making adjustments and rebuilding my kernel without using $mount /boot
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43209
Location: 56N 3W

PostPosted: Mon Oct 10, 2016 11:42 pm    Post subject: Reply with quote

notCarl,

When you build a kernel manually, you don't get an initrd.
When you use genkernel, left to its own devices, it will build an initrd too.

You can tell genkernel just to build an initrd but I've never used genkernel, so I don't know the command.
You can also build into your kernel everything needed to boot, so no modules need to be loaded to be able to mount root.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 630

PostPosted: Mon Oct 10, 2016 11:57 pm    Post subject: Reply with quote

notCarl,

In addition to the good pointers already given ...

nvidia generally won't be in the initrd, it can live in /lib after the kernel pivots from the initrd to your real root.

If 'uname -r' matches 'eselect kernel show' and 'ls -l /usr/src', it's generally OK to 'emerge nvidia-drivers' and then 'modprobe nvidia'


HTH
Back to top
View user's profile Send private message
notCarl
n00b
n00b


Joined: 28 Sep 2016
Posts: 27

PostPosted: Tue Oct 11, 2016 5:43 am    Post subject: Reply with quote

Spent a good while following guides making an initramfs filesystem in my /usr/src/ as well as an initrd script. Unfortunately the guide gave me filler code that wont do much. I tried to use this new initrd in place of the 3rd entry of advanced submenu but I'm still loading the september kernel

Is it necessary that the grub menu boots my original september kernel in the paste bin and then in the first two entries in the Advanced Submenu?
That's three times for the same kernel, is that normal?

Would it be possible and easier for me to rebuild a kernel as well as rebuild my grub.cfg to avoid this mess with my duplicate initrd and the same kernel being loaded repeatedly in the grub.cfg?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43209
Location: 56N 3W

PostPosted: Tue Oct 11, 2016 10:27 am    Post subject: Reply with quote

notCarl,

When grub loads, it displays a menu. You choose the kernel to load at that time.
If it makes it easier, edit the grub.cfg with useful kernel names.

At line 111 from your pastebin, which starts
Code:
submenu 'Advanced options for Gentoo GNU/Linux'

Change it to read,
Code:
submenu 'My New Kernel is Inside this Menu'


At line 150 change
Code:
menuentry 'Gentoo GNU/Linux, with Linux 4.4.21-gentoo'
to read,
Code:
menuentry 'Choose This Menu Item and Press Enter'


That will give you instructions on the Grub menu screen.

You only have
Code:
 set timeout=5
5 seconds to start using the keyboard at the grub menu before your Sep 30 kernel is automatically booted.
If you need longer, change the timeout at lines 83 and 87.

If you use a bluetooth keyboard, you probably can't interact with the Grub menu, since bluetooth won't work until the kernel is loaded, which is too late.
In that case, more drastic edits are called for if a non bluetooth keyboard cannot be used.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum