Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[solved] nvidia driver install, wrong kernel module loader

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
tieum
Posts: 12
Joined: 2013-07-29 22:20

[solved] nvidia driver install, wrong kernel module loader

#1 Post by tieum »

Hi,
I've updated my squeeze to wheezy yesterday and I've to say I went through a lot of issues.
I finally manged to do the dist-upgrade and run X with the nouveau driver.
I've installed the headers for the kernel 3.2, removed the one of the 2.6 (also the image)
Here is what I have:

Code: Select all

tieumV:~# dpkg -l |grep linux-
ii  doc-linux-text                       2008.08-1                         all          Linux HOWTOs and FAQs in ASCII format
ii  firmware-linux-free                  3.2                               all          Binary firmware for various drivers in the Linux kernel
ii  linux-base                           3.5                               all          Linux image base package
ii  linux-headers-3.2.0-4-686-pae        3.2.46-1                          i386         Header files for Linux 3.2.0-4-686-pae
ii  linux-headers-3.2.0-4-common         3.2.46-1                          i386         Common header files for Linux 3.2.0-4
ii  linux-image-3.2.0-4-686-pae          3.2.46-1                          i386         Linux 3.2 for modern PCs
ii  linux-image-686-pae                  3.2+46                            i386         Linux for modern PCs (meta-package)
ii  linux-kbuild-3.2                     3.2.17-1                          i386         Kbuild infrastructure for Linux 3.2
ii  linux-libc-dev:i386                  3.2.46-1                          i386         Linux support headers for userspace development
rc  linux-sound-base                     1.0.23+dfsg-2                     all          base package for ALSA and OSS sound systems
ii  util-linux-locales                   2.20.1-5.3                        all          Locales files for util-linux
tieumV:~# 
I've set up the compiler to
tieumV:~# echo $CC
/usr/bin/gcc-4.7

when I run the driver executable, I end up to a screen where it is telling me that the gcc version used to compile the kernel 2.6 was gcc-4.6 and that the module kernel loader reject another one.
I'm worried because it is mentionning my old kernel.
Shouldn't it tell me kernel 3.2?
How can I change this? I've tried to force reinstall module-assistant but nothing happened...
Shall I just ignore this and compile with gcc-4.6? this doesn't sound right...
How can I know the compiler version used to compile the kernel?
(tieumV:~# uname -arm
Linux Tieum-Vostro 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686 GNU/Linux)

Thanks in advance for the help.

I've uploaded a snapshot of the nvidia driver issue here: http://postimg.org/image/6zyifm0jr/
Image

I'm going to work on putting back my wifi driver but I'm afraid to get the same kind of issue...
in case, I'm trying to install NVIDIA-Linux-x86-319.17.run (http://www.geforce.com/drivers/results/61452 )
for my card: # lspci |grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation G86 [GeForce 8400M GS] (rev a1)

PS1: At the moment I can't even launch smplayer or vlc to watch the last Dexter :'(
I've this kind of error:

Code: Select all

tieumV:~/Desktop/FilmZ> smplayer Dexter.S08E05.HDTV.x264-ASAP.mp4 
No protocol specified
smplayer: cannot connect to X server :0
tieumV:~/Desktop/FilmZ> vlc Dexter.S08E05.HDTV.x264-ASAP.mp4 
VLC media player 2.0.3 Twoflower (revision 2.0.2-93-g77aa89e)
[0x8a11a58] inhibit interface error: Failed to connect to the D-Bus session daemon: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[0x8a11a58] main interface error: no suitable interface module
No protocol specified
[0x898b3c8] main interface error: no suitable interface module
[0x89788f0] main libvlc error: interface "globalhotkeys,none" initialization failed
No protocol specified
[0xb5301a90] qt4 interface error: Could not connect to X server
[0xb5301a90] main interface error: no suitable interface module
[0x89788f0] main libvlc error: interface "default" initialization failed
tieumV:~/Desktop/FilmZ> 
I supposed it is because my driver and xorg.conf are wrong... is it?


PS2 : when I boot, I end up in the console, gdm doesn't start. I can just run startx in root.
I don't like gnome3, I've installed xfce but I don't know how I could launch it. I couldn't find anything for this. Can you please also let me know how to do. I would then be able to remove gnome
Last edited by tieum on 2013-07-30 22:37, edited 2 times in total.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: nvidia driver installation, wrong kernel module loader u

#2 Post by bw123 »

tieum wrote:Hi,
I've updated my squeeze to wheezy yesterday and I've to say I went through a lot of issues.
it's okay thanks for posting all the info, tell the people on the forum here how you performed the upgrade, they need specific commands if available. And please include your /etc/apt/sources.list and i will bet you a nickel they can help.
resigned by AI ChatGPT

tieum
Posts: 12
Joined: 2013-07-29 22:20

Re: nvidia driver installation, wrong kernel module loader u

#3 Post by tieum »

hi bw123,
I'm sure I'll get some proper help :)
I did my upgrade normally, changing all my squeeze occurence from my source.list to wheezy.
Here is my source.list

Code: Select all

tieumV:~# cat /etc/apt/sources.list
# deb cdrom:[Debian GNU/Linux 6.0.0 _Squeeze_ - Official i386 DVD Binary-1 20110205-17:27]/ squeeze contrib main

#deb cdrom:[Debian GNU/Linux 6.0.0 _Squeeze_ - Official i386 DVD Binary-1 20110205-17:27]/ squeeze contrib main

deb http://ftp.fr.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.fr.debian.org/debian/ wheezy main contrib non-free

deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

# for fuse-exfat
deb http://backports.debian.org/debian-backports squeeze-backports main
tieumV:~# 
I did an apt-get update
then apt-get upgrade
worked fine.
I had issues for apt-get dist-upgrade, something related to java. It was doing an error straight away. I don't remember the error explicitely, I did some research and I ended up removing openoffice and another java thing that was throwing the error via APT. Can't remember what it was. I bookmarked it in my firefox but I can't launch it anymore and didnt' save my bookmark. I hope I'll be able to get them back by the way.
now when I launch firefox I also get:
tieumV:/root> firefox
No protocol specified
No protocol specified
Error: cannot open display: :0

anyway, with this removal my dist-upgrade went fine.

my xorg.conf was broken because the nvidia driver was not compatible
so after a /usr/bin/Xorg -configure, I modify the xorg.conf to be this:

Code: Select all

tieumV:/etc/X11> cat xorg.conf
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	Screen      1  "Screen1" RightOf "Screen0"
	Screen      2  "Screen2" RightOf "Screen1"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/X11/misc"
	FontPath     "/usr/share/fonts/X11/cyrillic"
	FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
	FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
	FontPath     "/usr/share/fonts/X11/Type1"
	FontPath     "/usr/share/fonts/X11/100dpi"
	FontPath     "/usr/share/fonts/X11/75dpi"
	FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
	FontPath     "built-ins"
EndSection

Section "Module"
	Load  "dri"
	Load  "dbe"
	Load  "glx"
	Load  "dri2"
	Load  "record"
	Load  "extmod"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

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

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

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

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"           	# [<bool>]
        #Option     "HWcursor"           	# [<bool>]
        #Option     "NoAccel"            	# [<bool>]
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "VideoKey"           	# <i>
        #Option     "WrappedFB"          	# [<bool>]
        #Option     "GLXVBlank"          	# [<bool>]
        #Option     "ZaphodHeads"        	# <str>
        #Option     "PageFlip"           	# [<bool>]
        #Option     "SwapLimit"          	# <i>
        #Option     "AsyncUTSDFS"        	# [<bool>]
	Identifier  "Card0"
	Driver      "nouveau"
	BusID       "PCI:1:0:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "Rotate"             	# <str>
        #Option     "fbdev"              	# <str>
        #Option     "debug"              	# [<bool>]
	Identifier  "Card1"
	Driver      "fbdev"
	BusID       "PCI:1:0:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "DefaultRefresh"     	# [<bool>]
        #Option     "ModeSetClearScreen" 	# [<bool>]
	Identifier  "Card2"
	Driver      "vesa"
	BusID       "PCI:1:0:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor    "Monitor1"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen2"
	Device     "Card2"
	Monitor    "Monitor2"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection
When from root, I try to launch gdm (/etc/init.d/gdm3 start) nothing happens.
I just manage to launch X, via startx in root.

Alright, let me know if you need more informations.

In case, here is my Xorg.0.log: http://txtup.co/ErjFR

I'm not an expert on Xorg config, but I was thinking my issues would get resolved once I install the good driver and set it up accordingly manually or via nvidia-config.

Please get back to my first post for the main issues.
Thanks a lot!

bettylou
Posts: 53
Joined: 2013-06-14 22:42

Re: nvidia driver installation, wrong kernel module loader u

#4 Post by bettylou »

You can create an alternative for gcc 4.6. and make it active.

(see below)

I did this and it enabled me to compile the nvidia driver.

The last available NVidia version (that I downloaded) for the drivers was compiled with 4.6, so it fails to install on a machine that is using g++/gcc > 4.6. Hopefully this is soon to be changed, so any reader should check first. One good way to test is to try installing the driver and see if a compiler version error occurs. There may be other types of errors, so watch for the compiler 4.6/4.7 double speak in the console during the driver install. If you see it we can fix it.

Before you can create a gcc-4.6 alternative, you need to install gcc-4.6. But this isn't enough. We need to instruct our machine to use 4.6. This is done with "alternatives." After you install 4.6 there won't be any alternatives. running the following will fail:
sudo update-alternatives --config gcc

You will be told that there no alternatives. We need to make them. (If you browse to /var/lib/dpkg/alternatives you will see that there are alternatives for other things, but gcc won't be in there. In /usr/bin you will see both gcc-4.6 and gcc-4.7.)

run:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 20

Now, when you run
sudo update-alternatives --config gcc

you get a choice.

I usually do this with g++ as well. You can install g++-4.6 and g++-4.7 from Synaptic, then run:

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 20

Last time I installed the driver, I set both gcc and g++ to 4.6. Later, I change the alternatives back to 4.7 with update alternatives.

tieum
Posts: 12
Joined: 2013-07-29 22:20

Re: nvidia driver installation, wrong kernel module loader u

#5 Post by tieum »

Hi bettylou,
thanks for your answer.
I don't know this update-alternatives, it sounds interesting.

Anyway, I did it manually, I found answers to my questions:
1) How to know with what compiler the kernel is compiled:

Code: Select all

tieumV:/# cat /proc/version 
Linux version 3.2.0-4-686-pae (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.46-1
2) How install (compile) nvidia driver:
- first set the CC variable to the gcc version used to compile the kernel
- then run NVIDIA.*file with the option: --kernel-name=`uname -r`

In my case:

Code: Select all

export CC='/usr/bin/gcc-4.6'
tieumV:~/Downloads# ./NVIDIA-Linux-x86-319.17.run --kernel-name=3.2.0-4-686-pae

To finish, I reinstalled gdm3, deleted gnome, and now everything is working perfectly \p/

PS1: I had this error during my apt-get dist-upgrade:

Code: Select all

E: Could not perform immediate configuration on 'default-jre'.
    Please see man 5 apt.conf under APT::Immediate-Configure
    for details. (2)
As found here: http://paulberruti.net/2012/08/could-no ... mment-2559
I solved it by removing openoffice and gcj-jre


PS2: bettylou, you're saying the nvidia driver is compiled with 4.6. What I was understanding is that we are compiling it during the installation of the driver (running the shell script) and that we can choose the version of compiler we want by setting the variable CC BUT it has to match the one of the kernel. Am I wrong?

bettylou
Posts: 53
Joined: 2013-06-14 22:42

Re: [solved] nvidia driver install, wrong kernel module load

#6 Post by bettylou »

Am I wrong?
No, you're closer to right than I. What the installer barks out is:

You appear to be compiling the NVIDIA kernel module with a compiler different from the one that was used to compile the running kernel. This may be perfectly fine, but there are cases where this can lead to unexpected behavior and system crashes.


My understanding of this statement is that, although Wheezy distributes with 4.7 pre-packaged, an earlier compiler was used to create the kernel. Either way, coaxing the system to use kernel that the installer believes to be the one used to compile the kernel fixes the glitch.

The advantage of using alternatives is; they provide a simple way to flip-flop defaults. Their use most commonly takes the form of java JRE selection for platform matching in application deployment. There are of coarse several others to be found in /var/lib/dpkg/alternatives.

Having seen the NVidia warning once, I chose to create the alternative on the off chance that I would need the 4.6 compiler again... perhaps a developer driver re-install.

tieum
Posts: 12
Joined: 2013-07-29 22:20

Re: [solved] nvidia driver install, wrong kernel module load

#7 Post by tieum »

ok, it is a bit strange to provide gcc-4.7, have most apps compiled with it but have the kernel compiled with the previous version...
I've installed the gcc to update-alternatives but I may just let my root CC to the 4.6 and the one of my user to 4.7. (I don't use sudo)

Post Reply