LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   VGA mode problem with kernel 2.6.18 (https://www.linuxquestions.org/questions/slackware-14/vga-mode-problem-with-kernel-2-6-18-a-494322/)

OMT 10-21-2006 04:33 AM

VGA mode problem with kernel 2.6.18
 
Hello there :)

I've just installed the new kernel 2.6.18 from the /testing directory of the Slackware packages (Slackware 11.0). Everything works fine, but when the system starts up and the kernel is booting, when it reaches the hotplug, it switches to higher vga mode, not the normal one. The problem is that in such vga mode I cannot install the NVidia driver, since it requires "normal" mode of the vga. In my lilo.conf I had set up the "normal" mode, and I never changed it. It is in "normal" right now too. So, what is the reason for this switching to other than "normal" mode despite the lilo.conf, and how could it be fixed? I've made some searching in this forum for this problem, but never found anything (most people actually want to go in higher, not lower mode of the vga, I know).

Thanx in advance :)

willysr 10-21-2006 05:03 AM

have you installed udev?
usually, kernel 2.6.x will use udev rather than hotplug

NB: Don't forget to give execute permission on /etc/rc.d/rc.udev and also rename /etc/rc.d/rc.udev.new to /etc/rc.d/rc.udev

OMT 10-21-2006 11:01 AM

Yes, I did all that, otherwise the kernel refused booting at all. Turning off hotplug didn't help either - the vga was normal, but the driver refused to install.

raska 10-21-2006 11:34 AM

Quote:

Originally Posted by OMT
...The problem is that in such vga mode I cannot install the NVidia driver, since it requires "normal" mode of the vga....

What did the installer say?
I have never seen such requirement as the vga must be in 'normal' mode. There must be something else you are missing.

OMT 10-21-2006 12:11 PM

Well, the installer sais nothing very informational, just "Installation failed". The reason for me to think it is because of the vga mode is that some time ago I needed to repair the Slackware installation after upgrade failure, and unwillingly made the vga mode in higher level (the installation program on the Slackware cd asked me for mode, and I chose the wrong one). So, no problems appeared then, unless I tried to install the driver (which was needed to be done). When I edited the lilo.conf back to "normal" mode of the vga, the installation performed perfect. So, I was pondering could it be the same problem right now?

raska 10-21-2006 12:18 PM

There is a installation log but I can't recall where it is put. Maybe in the same installer's path, or in /tmp
You should check also dmesg and the logs in /var/log/

Just out of curiosity, did you install the kernel-sources package?
You said you are running the 2.6.18 kernel from /testing, so you must have the source of your running kernel uncompressed in /usr/src/linux-2.6.18/ and likely the /usr/src/linux/ softlink pointing to the former path

OMT 10-21-2006 02:38 PM

Yes, there is kernel source installed. I just downloaded the latest driver from the NVidia site, and whyle trying to make a kernel module it said that it cannot complete the process, since the gcc is different from the one used for the kernel (gcc is the latest from Slackware 11.0 - v.3.4.6). Maybe it was the same problem with the older version I was trying to install but it never said something like that when failing to install. So, now the gcc seems to be the problem...

willysr 10-21-2006 08:40 PM

you have to use the same GCC version being used to compile your kernel, so i guess it will be a good idea to recompile your kernel or try to compile the kernel from source code if you haven't have one (or you may want to downgrade your GCC first, install NVidia, and then upgrading your GCC again)

OMT 10-22-2006 03:20 AM

Yes, I installed the same version of gcc which was used in compiling the kernel (v.3.4.6) it didn't made difference to the driver installer at all. Downgrading also didn't help. I don't think that recompiling the kernel is good idea, since otherwise from the driver everything is working fine, and never before I needed a recompilation to install that driver. There must be something else which doesn't allow the driver to install.

Here is part of the log generated by the installer (too long ot include all of it, if you need more, tell me and I'll paste it here):
Quote:

Using: nvidia-installer ncurses user interface
-> License accepted.
-> No precompiled kernel interface was found to match your kernel; would you li
ke the installer to attempt to download a kernel interface for your kernel f
rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: Yes)
-> No matching precompiled kernel interface was found on the NVIDIA ftp site;
this means that the installer will need to compile a kernel interface for
your kernel.
-> Kernel source path: '/lib/modules/2.6.18/source'
-> Performing CC test with CC="cc".
-> Performing rivafb check.
-> Cleaning kernel module build directory.
executing: 'cd ./usr/src/nv; make clean'...
rm -f -f nv.o nv-vm.o os-agp.o os-interface.o os-registry.o nv.o nv-vm.o os-
agp.o os-interface.o os-registry.o nvidia.mod.o
rm -f -f build-in.o nv-linux.o *.d .*.{cmd,flags}
rm -f -f nvidia.{o,ko,mod.{o,c}} nv_compiler.h *~
rm -f -rf .tmp_versions
-> Building kernel module:
executing: 'cd ./usr/src/nv; make module SYSSRC=/lib/modules/2.6.18/source S
YSOUT=/lib/modules/2.6.18/build'...

NVIDIA: calling KBUILD...
make CC=cc KBUILD_OUTPUT=/lib/modules/2.6.18/build KBUILD_VERBOSE=1 -C /lib/
modules/2.6.18/source SUBDIRS=/tmp/selfgz8032/NVIDIA-Linux-x86-1.0-7676-pkg1
/usr/src/nv modules
make -C /lib/modules/2.6.18/build \
KBUILD_SRC=/usr/src/linux-2.6.18 \
KBUILD_EXTMOD="/tmp/selfgz8032/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv" -f
/usr/src/linux-2.6.18/Makefile modules
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are miss
ing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it.
"; \
echo; \
/bin/false)

willysr 10-22-2006 03:31 AM

have you tried on running make oldconfig && make prepare on the kernel source directory just like the installer told??

OMT 10-22-2006 04:25 AM

Yes, I did. Nothing changed. The installer gave up the same way as before. Even the log says the same - to run make oldconfig && make prepare.

A little update. The last log was from driver version 7676. This is a part from version 8776 (it says the same as above, but a little down in the log this is what is says):
Quote:

-> Kernel module compilation complete. (!?!)
ERROR: Unable to load the kernel module 'nvidia.ko'. This happens most
frequently when this kernel module was built against the wrong or
improperly configured kernel sources, with a version of gcc that differs
from the one used to build the target kernel, or if a driver such as
rivafb/nvidiafb is present and prevents the NVIDIA kernel module from
obtaining ownership of the NVIDIA graphics device(s).

Please see the log entries 'Kernel module load error' and 'Kernel
messages' at the end of the file '/var/log/nvidia-installer.log' for
more information.
-> Kernel module load error: insmod: error inserting './usr/src/nv/nvidia.ko':
-1 No such device (?)

OMT 10-22-2006 05:03 PM

After some file browsing in /lib/kernel/modules I finally installed the driver and found the reason lilo.conf vga mode settings to be overridden on startup. So, the kernel v.2.6.18 comes with kernel modules "nvidia" and "riva" already, and when the kernel boots, it loads them too, and vga goes in vesa mode. Problem is that when the NVidia driver tries to install, it gets confused and quits, because there is already one nvidiafb.ko module.

So, if someone has the same problem as me, here is what I did: I moved the "riva" and "nvidia" modules located in /lib/modules/2.6.18/kernel/drivers/video somewhere else (just in case), then reboot, and finally run the NVidia driver installer. That repaired it all.

That's all, thanx to everyone here who replied on my questions :) See ya :)

willysr 10-22-2006 07:46 PM

that's strange solutions (but at least it worked), since i think NVIdia Installer will overwrite them. I never moved those modules out of kernel modules directory and NVidia can still works

OMT 10-23-2006 03:39 AM

Well, yeah, it is strange but when the installation failed last several times, the installer told me to remove kernel modules "riva" and "nvidia", check the gcc or to reconfigure kernel sources - first I didn't know there are such kernel modules there, so I was working in the directions of the other two solutions - and as you saw, with no success. I have no idea why it was necessary for me to do that and not neceserry for you to do it, but after all, it all went well after that intervention :)


All times are GMT -5. The time now is 10:12 PM.