HOWTO: Two Monitors, NVIDIA with misbehaving nouveau driver

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

HOWTO: Two Monitors, NVIDIA with misbehaving nouveau driver

Postby olligod on Wed Jun 01, 2011 6:58 am

Situation at the beginning:

I run a NVidia GeForce8600 GT
-- and need TWO SCREENS, side by side.

Upon installation of a new Mint-11, it installs the nouveau driver to work with the NVidia card.


General technical solutions for 2 screens:
In order to do 2 screens, there are basically two ways to to this:
- The built-in option (is it called Xinerama?), for which nouveau is prepared, too
- Using the NVidia proprietary driver and configure "Twinview"


General Problem:
"nouveau" seems to be a VERY BUGGY DRIVER - other people have experienced that too ... so I needed a different solution and this is what I did to get it right.
Most has been done elsewhere in some form or shape...
--- but I have put it together and added the new twists with the new NVIDIA driver versions as I experienced it.

I my case the nouveau flaws (and it *WAS* nouveau that was the cuplrit, in hindsight) were:
- garbled screen during boot, temporarily. Login screen appeared fine. Two screens had been configured in the Gnome system settings and worked OK.
- Certain Programs caused a *CRASH* of X (return to login screen) or *FREEZE of the whole system. These were mainly wine-run applications; therefore I tried other versions of wine, to no avail.

--- SOOO:
I applied the following solution:
Download the proprietary NVidia driver. ATTN: Not every version will work. My kernel is 2.6.38-8-generic; a working version is NVIDIA-Linux-x86_64-270.41.19.run
-- > EDIT: This is for 64-bit systems of course. Choose other driver for 32-bit <--
(I should mention that I had a version that was a mere 2 months old, called NVIDIA-Linux-x86_64-260.19.44.run => caused a boot freeze,on THIS KERNEL, reproducible, but NOT on older ones !)

Find out your kernel by typing on a command line
Code: Select all
uname -r


So.... above you find a combo of kernel and driver that works at the end...


QUESTION for you IF YOU HAVE READ UNTIL HERE:
Do you have a proper root password? I always have; it may be necessary to create one for those that have NOT been "real root" before on Ubuntu
(I.E. people that have rather done all via "sudo" )
Reason: we will drop to a root shell during boot, for setup. Can you login on Ubuntu without an existing root password here? I never tried to be honest....

... to create root password, go to a command line; type
Code: Select all
sudo su

(enter your user password - this isn't the root password yet)
then, type
Code: Select all
passwd
and then enter a new root password twice.
you may type exit now, to leave the root shell.


HOW TO DO THE DRIVER INSTALL:
One must follow these steps, otherwise the new driver will not compile, load, or work.

First find out whether this problem applies to you:
Code: Select all
lsmod | grep nouveau

If nouveau appears, then you are in business here...

- You need the kernel-headers installed:
Code: Select all
sudo aptitude install linux-headers-2.6.38-8-generic

... for the kernel version above. EDIT: You may replace aptitude with apt-get or apt (the latter for Mint Only, not even for Ubuntu-proper).
This applies throughout this post of course.

- you need the build tools installed:
Code: Select all
sudo aptitude install build-essential

- you need to REMOVE THE NOUVEAU driver:
Code: Select all
sudo aptitude remove xserver-xorg-video-nouveau

- re-do module dependencies:
Code: Select all
sudo depmod -a


at this time, the module is still loaded. Type lsmod| grep nouveau and you will still find it, if it was there before.
- you need to update your init-ramdisk (loads early at boot time):
Code: Select all
sudo update-initramfs -u

EDIT: The command above applies exactly as written if you a running the newest kernel that is available on your system.
That includes any newly installed Mint-11 - and essentially all people not knowing at all what this kernel stuff means :wink: ,
as running some kernel other than the newest installed one would require active choices and knowing what one is doing.
If you DO run an older kernel, you need other options for the command; please consult man pages
(this remark just for completeness...)


On my system, during my experiments, I since had the module also "blacklisted" in /etc/modprobe.d/blacklist.conf;
however I would have to research whether that is still necessary since it should be deinstalled by now anyway
(after the next boot, it should no longer be loaded).



- reboot into "recovery mode" (you need to choose that from the grub prompt of course)
When you are asked how to proceed: choose a "root shell" with or without net access.
(ATTN if you haven't been here before: it is "hidden" below in the dropdown menu). Login as root
- see whether the f***n (that means ..."fine" :D ) "nouveau" module is still there:
Code: Select all
lsmod | grep nouveau

Hopefully not.
- you need to change to "runlevel three"
Code: Select all
telinit 3

Now you need to login once more. You may login as root or as user. If you do it as user, remember that you need "sudo" again in front of all system changing commands below.
- execute the downloaded NVidia binary:Change dir to where it sits (maybe by typing cd /home/yourself/Downloads ). Make it executable by typing
Code: Select all
chmod 755 NVIDIA-Linux-x86_64-270.41.19.run

Then, run it:
Code: Select all
./NVIDIA-Linux-x86_64-270.41.19.run 

"./" is normally necessary as root, that fact is considered a (safety-) feature, not a bug.
If all goes well, a new nvidia kernel module will be compiled & installed. The script runs "depmod" automagically, too. Say "Yes" on the question to run nvidia-xconfig.
- you should update your init-ramdisk again now.
Code: Select all
update-initramfs -u

- reboot, from the command line (boot normal using the default option from the grub menu); simply type (including sudo if necessary)
Code: Select all
reboot


That should give you a smooth graphical boot. Login.

THE DUAL MONITORS -- FINALLY
Run
Code: Select all
sudo nvidia-settings

(run as root-proper would not work without e.g. "sux", but I spare the details since it has no advantage for us here).
On the left, find "X Server Display Configuration".
Activate the second monitor and place it left or right as necessary.
Do not forget to save your config: "Save to X configuration file".


=> ENJOY A STABLE, "BUGFREE" (maybe... :wink:) 2-screens (Twinview) setup !
(rock solid, no crashes, freezes, or garbled display for me whatsoever...)
olligod
Level 3
Level 3
 
Posts: 148
Joined: Wed Feb 11, 2009 6:29 am
Location: Munich, Germany

Linux Mint is funded by ads and donations.
 

Re: HOWTO: Two Monitors, NVIDIA with misbehaving nouveau dri

Postby subeh.sharma on Tue Jul 19, 2011 5:00 am

Hi.

I already have 270.41.06 NVIDIA Driver Version installed in LM11. Does the same steps apply for upgrading it as well?
User avatar
subeh.sharma
Level 2
Level 2
 
Posts: 52
Joined: Fri Jul 15, 2011 5:43 am

Re: HOWTO: Two Monitors, NVIDIA with misbehaving nouveau dri

Postby olligod on Wed Jul 20, 2011 2:48 am

subeh.sharma wrote:Hi.

I already have 270.41.06 NVIDIA Driver Version installed in LM11. Does the same steps apply for upgrading it as well?

If I understand your question correctly (or else may I ask that you specify more precisely what the situation is / what you want):
Do you current have an already working nvidia driver and want to upgrade your Mint kernel (They do offer a new kernel in the upgrade packages)?

In that case, you may need to let the nvidia installer recompile modules for the new kernel.
If you had a working system set up similarly to the one described in my first post, then running the routine again should do the trick.

If you boot into a new kernel (installed AFTER nvidia proprietary driver install), and X works (I am afraid that'll rarely be the case): Do nothing ! Enjoy your system. :D
If however X fails: If offered, go to a root shell. Or else, reboot into recovery mode / new kernel (as stated in last post). Be sure which kernel you are running. If unsure, type "uname -a" and verify that it is the one you want a nvidia driver setup for.

SIDELINE: up to here, you have not changed anything to the nvidia setting. Especially if you had a perfectly working system when nunning the older kernel - and if you need it as a production machine - you may boot into the older kernel for weeks until you decide to switch to the new one.

If however you think it's time to "modernize":
Start, once again, with
Code: Select all
/NVIDIA-Linux-x86_64-270.41.06.run

(version adjusted to your stated version) - and follow the steps outlined, including the initramfs stuff etc stated in the post.
I do not quite remember if it asks you first of a removal of the old kernel moduls (compiled earlier). If so, say yes.

Certainly, if you use a new/different nvidia driver version (after you had one running earlier), a new module compile will be necessary.

The nvidia proprietary drivers generally work like that. Remember though, not all driver versions cooperate with all kernel versions... the one combo that I stated does work -
and I am not going to change it on my machine unless I have to :wink:
I hope that yours will be ok. Generally nvidia keeps pace with kernel releases, i.e.; a new nvidia driver should cooperate with a new kernel release.
Good luck.
olligod
Level 3
Level 3
 
Posts: 148
Joined: Wed Feb 11, 2009 6:29 am
Location: Munich, Germany

Re: HOWTO: Two Monitors, NVIDIA with misbehaving nouveau dri

Postby olligod on Sun Apr 29, 2012 6:43 am

...... NINE MONTHS LATER......NEW SYSTEM -- NO NOUVEAU DRIVER HASSLES LEFT in the default install for me.
I am at LMDE / Update Pack 4 / Mate Desktop, running on the same computer system.

It holds more modern versions of the same technologies as Linux-Mint-11.
Package-wise it is of course not a direct descendant of it.


As it stands today, the problems with nouveau that I described have disappeared pretty much.
Also, I need not even use the proprietary nvidia driver, as the preinstalled open source version seems to support everything *I* need.
(How will Mint-13 (Ubuntu based) behave? Don't know)

Why did I switch to LMDE on my machine of serious production assignments (I do need it to Just Work ...never change a running system !?)
Mint-11 has another 6 months of support to go.
Well ahead of time I wanted to try out a good alternative as a "parallel install" with my separate home partition inherited.
LMDE seemed to have made a quantum leap forward. Turns out it is SOOO GOOD out of the box that I could shorten my gradual switch over from booting my trusted Mint-11 / occasional LMDE boot to 98% LMDE (and soon 100%) to only a few days. Very good. So here I am....the support deadline of Mint-11 will be an issue no more.


==> I can recommend Linux-Mint-Debian without hesitation as an alternative to the (Ubuntu-based) "Main Edition" --
besides other benefits there should be NO nouveau driver /opensource nvidia drivers issues.

But we may want to conserve the experience with the "alternate/proprietary video drivers" for the future....if and when breakage happens, it may be a way out of problems. :wink:
olligod
Level 3
Level 3
 
Posts: 148
Joined: Wed Feb 11, 2009 6:29 am
Location: Munich, Germany


Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 10 guests