Nvidia for newbies using Opensuse 12.2

If you’re new to Linux in general & Opensuse in particular this How to is for you.
The easiest way for newbies that just want to get their Opensuse 12.2 up & running is the One click Install or the Repo Way. Doing it that way is OK but updating the nvidia repos to the Final Release of Opensuse has taken up to a week after final release. Also the One click Installs have had problems in the past so beware them.
You can check into them here:
SDB:NVIDIA drivers - openSUSE

If you’re impatient as I was when I started & if you want to learn how to control your PC instead of it control you here’s the How To.

Introduction:
If you choose to do it the alleged hard way nvidia has made it even easier. It used to be one would have to do 2 things set nomodeset & blackist nouveau. Now you won’t have to do that. While one screen (the bootsplash)will look bad the ones that count the grub & the login screens look fine in nouveau. If you like things the way they are in nouveau that’s cool! But if you don’t or you want nvidia drivers this is for you.
This how to will have screenshots so you’ll know what to expect. It is from my own experience at installation, so you 'll have a good idea of how it’s done.
You’ll learn some CLI (Command Line Interface).
When you need to bring up a terminal (Konsole in KDE Terminal in Gnome) it’ll look like this:

cli stuff here

This is part 1 this part is all done in the screens you’re familiar with.

  1. First we’re going to get some extra things that you need to get the drivers installed, open Yast
  2. Type “gcc” in the Search in the left pane in the right pane find & check gcc
    Type “make” in the Search in the left pane in the right pane find & check make
    Type “kernel” in the Search in the left pane in the right pane
    check kernel-source, kernel-devel & kernel syms. Other things will auto check to install you’ll want them too. Click Accept. When Yast is done close Yast.(Important tip here: Check Yast Online Update regularly When there’s a kernel update check to make sure that the 3 kernels have the same number. This’ll save you a lot of trouble when the kernel updates come out later.)
  3. Got to the nvidia driver site & download the drivers to your Downloads folder:
    Drivers | GeForce

This is part 2 this part is all done in Console (if you can print this part)

  1. When you get to the Login screen look for the red button click it
  2. Select Console login click the OK What you’ll get will look like this
mypc login:
  1. Type in your username then give your user password. You’ll then get the greeting
  2. Now type in su give root when prompted the font should now be red
  3. Type in init 3
  4. If you kept the Nvidia drivers in Downloads type in something like this:
cd /home/yourusername/Downloads
  1. Now type in
 sh NVIDIA-Linux-x86_64-304.37.run
  1. You should get this:http://img713.imageshack.us/img713/9298/startnt.th.jpg](http://imageshack.us/photo/my-images/713/startnt.jpg/)

10)Select Accept by using the arrow keys after you Accept click Enter
11)After a click or 2 you’ll get this: http://img607.imageshack.us/img607/1371/changeover.th.jpg](http://imageshack.us/photo/my-images/607/changeover.jpg/)

12)When you get to this screen click the OK by pressing Enter
13)Type in reboot
14)Repeat steps 1-10 this time though you’ll get screens with questions on them just answer yes to all of them
15) If all has gone well you’ll get a screen which will say," Your X configuration has been successful" click OK
16)Type in reboot

Part 3 is after the reboot & is all done in the screens you’re familiar with.

If you have KDE
  1. In KDE Kickoff>Applications>NVIDIA X Server Settings click it (if you are happy with your screen res skip steps 3 & 4)
  2. Select the X Server Display Configuration in the right pane
  3. Click the Resolution drop down select the screen resolution you want from the list
  4. Click Apply if you like that resolution click Accept
  5. Now click Save to X Configuration File
  6. What you’ll get is this: http://img812.imageshack.us/img812/8031/xorgbox.jpg](http://imageshack.us/photo/my-images/812/xorgbox.jpg/)
  7. Just clear that out of there & rename it xorg.conf click Save it’ll be in your /home Click Quit on the Nvidia Server Settings
  8. Open your /home Dolphin
  9. Kickoff>System>File Manager>File Manager Super User Mode
  10. You’ll be prompted for root give it
  11. In the root Dolphin that shows up click the Root folder in the left pane in the right pane go to /etc/x11
  12. Copy & paste your xorg.conf from your /home Dolphin to the /etc/x11 in the Root Dolphin
  13. reboot

If you have Gnome
1) Open Applications find NVIDIA X Server Settings click it (if you are happy with your screen res skip steps 3 & 4)
2) Select the X Server Display Configuration in the right pane
3) Click the Resolution drop down select the screen resolution you want from the list
4) Click Apply if you like that resolution click Accept
5) Now click Save to X Configuration File
6) What you’ll get is similar to the picture you have in step 6 above.
7) Just clear that out of there & rename it xorg.conf click Save it’ll be in your /home Click Quit on the Nvidia Server Settings
8) Log out then Log in as root
9) Click Activities Click Filesystem
10) On Nautilus Click File select Open New Tab
11) In the first tab click filesystem home folder then go to the yourusername folder
12) In the second tab click the etc folder then click the x11 folder
13) Go back to tab 1 find your xorg.conf copy & paste to x11 folder in tab 2 close Nautilus
14) Reboot when you log back in do so as user

](http://en.opensuse.org/SDB:NVIDIA_drivers)

On 08/20/2012 11:46 AM, Sagemta wrote:
> type in su

i made this same observation on your previous guide:

do not type in “su”, instead type in “su -”

it makes a difference…sometimes the difference is as great as success
or failure of the operation.


dd

How come your previous “guide” vanished together with my comment? To whom did I wrote this comment actually?
You missed the point again. What about learning how to compile a kernel module before writing the 436th tutorial on that topic?

Now, just in case you’re interested in what you didn’t understand, do the following:

  • install 12.2 as soon as it is released.
  • Use nouveau for a while.
  • Do NOT update the kernel when a new one is out (sooner or later, there will be one). Don’t understand me wrong (again)! I do not recommend skipping kernel updates - except for educational purpose in this particular case.
  • After a new kernel has been released (that you didn’t update), follow your instructions to install the nvidia driver … then come back and ask for help! :frowning:

Do you get it? … or not?

It wasn’t you it was nvidia. Their latest driver update to 304.37 totally obsoleted my original post.
Your points are valid, however based from my own experience, these are things the newbie will learn as they grow in Linux.
I wrote this post for the impatient newbie that wants get started on Linux NOW! That’s how I was when I started only then it was 9.3 that was the stable & 10.0 was in its equivalent of RC at the time. Because I figured 10.0 was the one I’d be using I went for it. It’s for this type of person I wrote this for. This is one of many ways that one’s Linux journey starts. It’s the way I started & the type of person with which I’m most familiar.
Will such a person wait for the release? If they were like me no.
Will they use nouveau for while? Probably, but since they’re new & impatient with a very small comfort range an easy step by step is just what they’ll need. Especially if they decide nouveau isn’t for them.
Updating kernels, That’s something they’ll learn in time & yes they will ask for help but that’s for later.
This post is for those first few steps.

@dd
I did give “su” vs “su -” serious thought. However once I got to Part 2 in Console mode & placed myself in the role of a newbie “su” was what I was comfortable with & could easily remember. Because also in that role I saw that despite my (if you can print this part) I wouldn’t do that. The use of" su-" is one of those things that’ll come later like it did for me. So if you could can you put that link here please?

No. They will notice if they’re not able to start X anymore after following your guide.

We don’t care when you started to use Linux. What matters here is that you know what you are talking about when advising others - which doesn’t seem to be the case IMO.

No, “they” should not. You should. The suggestion was addressed to you. You should wait until the next kernel update and test your method - step by step - to see which important step you are missing.

You neither read nor seem to care about my comments - and even got someone to delete them (with you other thread). You don’t understand that your tutorial will lead to problems and not to solutions about two months after the next release is out. Installing the kernel devel package does NOT ensure that it will have the same version as the running kernel (unless they introduced such a dependency in 12.2 … but how would you know it today? And enforcing kernel update for the sole purpose of installing a driver would be a bad idea, anyway) And if they differ, your nvidia module - just like any other kernel module - will fail to compile and your “newbies” will find themselves in a worst situation than before.

I’m sorry but - as Carlos would say - it’s our “duty” to tell others that a method might not work and when, and why.

  • First off, the “impatients” should either not use Linux or learn to be patient.
  • Second, they will rarely need to install the latest nvidia driver and should be happy in most cases with the one from repo. Therefore any other approach is not intended for the impatients but rather for gamers or video hobbyists.
  • And Finally they should not follow this tutorial if they are ‘newbies’, because they will make the same mistake.

However the method will work - for sure - in september, but might not - which doesn’t mean that it won’t - in december (not only because of Christmas).

Didn’t you notice that modern desktop environments come with a screenshot utility? You certainly have one of those installed and might try one of these commands next time to grab the entire screen or the active window:


$ gnome-screenshot --interactive
$ xfce4-screenshooter
$ ksnapshot

If it sounds too simple and ImageMagick is installed, you can also use this at the command line:

$ import -window root /tmp/snap.jpg

If ImageMagick is not installed but imlib2 is there, you can use:

$ imlib2_grab /tmp/snap.jpg

If nothing is installed, use xwd which comes with Xorg (in the example below to capture the selected windows). But you’ll still need convert (included in ImageMagick) to convert the image dump:

$ xwd -frame | convert - snap.jpg

An there should be a shortcut too, such as PrintScreen or Alt+PrintScreen - or something else - that might work for you.

As I stated that which I wrote worked for me.
Nouveau & I have never really gotten along. I’m sure there’s others.
Ksnaphot which I have & use did a good pic. It just wouldn’t upload to imageshack. Don’t know why hasn’t done that before but it did this time, so I improvised. Definitely not the brightest thing I’ve ever done but while not pure, it worked.
On the note of it not working down the line you just gave me an idea. Your comments do get me to see things I didn’t see before. You see this is how some people learn. I know I’m not the brightest bulb in this forum box, but I do learn new things all the time here.

Of course it works for you! But the point is not that it works for you. It has to work for everyone who follows your tutorial. And it is not going to happen if you tell people to install the kernel-devel package without making sure that they have the latest kernel (because only the latest kernel-devel will be installed). The reason why it does - and probably always will - work for you is that you regularly update the kernel. Not everyone does - especially newbies and impatients after a fresh install. And I said that it is not that simple, because users should not have to update the kernel in order to compile a module. Updating the kernel is not a requirement. The requirement is that kernel source/devel and kernel must have the same version. The fact that only the latest kernel-devel is available makes a kernel update an absolute requirement. It’s a common mistake, as this info is missing in most tutorials.

Please try to understand these conditional statements:


IF kernel-devel is installed THEN
    IF kernel version == kernel-devel version THEN
         do nothing
    ELSE
         update kernel kernel-devel OR Error: module won't compile
    ENDIF 
ELSE
   IF kernel devel is NOT installed THEN
        **update kernel** (after user confirmation of course!)
        install kernel-devel
   ENDIF
ENDIF

proceed with driver installation ...

But the installation script should take care of that (Not your fault). The function matchkernel from the atiupgrade](http://forums.opensuse.org/english/other-forums/development/programming-scripting/449058-upgrading-ati-driver-atiupgrade-20.html#post2480823) script could be easily implemented in any script which intends to compile kernel modules (directly or indirectly). Help yourself! It’s open source.

Ok,
I think I’m slowly getting what you mean.
Now you mention that I regularly update the kernel in Yast I have even in the RC the following checked:
kernel-source kernel-syms kernel-desktop kernel-desktop-devel kernel-default-devel kernel-devel & kernel-xen-devel( For my VM)
Hoky as it sounds I check personally check yast every day the Online Update if it has these in blue I click Accept.
Then of course the nvidia drivers are for, want of better words, behind the curve. For that reason I have James’s SANDI script.
Which put them right again, before his script I’d either c&p or have a copy of the Nvidia.run in Downloads reboot then do the steps from Part 2.
I want to confirm is this what you mean by I regularly update the kernel.

On 08/20/2012 11:16 PM, Sagemta wrote:
> @dd
> I did give “su” vs “su -” serious thought. However once I got to Part 2
> in Console mode & placed myself in the role of a newbie “su” was what I
> was comfortable with & could easily remember. Because also in that role
> I saw that despite my (if you can print this part) I wouldn’t do that.
> The use of" su-" is one of those things that’ll come later like it did
> for me.

but why teach a new user to do it wrong?

it is not like it is so hard for you to type into your guide “su -”
rather than “su” (NOT “su-”!)

if you don’t have the time to do your guide correctly for the new user
(or a very old user coming to openSUSE from another distro where “su”
works usually) i’d advise you to not do it at all…please.

> So if you could can you put that link here please?

i’m not sure what link you are asking me to put where???

and, please don’t confuse my words as meaning i’m angry…i’m not, not
at all…i appreciate your willingness to try…but when you have proven
valid input from a couple of folks trying to help you get it
right–and, you then ignore the correcting hints because you didn’t
feel “comfortable with” doing it the correct way after “serious thought”…

well, i soon loose interest in your quest to help new folks learn how to
cut corners by doing things the wrong way.


dd

Once kernel-devel and kernel-source are installed, they will be updated together with the kernel. In this case - the most common case - no problem at all.
When the kernel devel/source is NOT installed and you install it - because you’'ll have to install it at some point - you will get the latest available version of the kernel source … but it doesn’t mean or imply that your kernel is up to date. If it is not, you have a problem. While it will be OK with 12.2 in september, it won’t as soon as a new kernel is released and you perform a fresh install without updating the kernel afterwards. Search the forum for threads about installing nvidia, ati or Oracle Virtualbox manually* and see how many people followed the wrong tutorial and asked why they couldn’t compile the kernel module. That’s exactly the same problem. Thus the step you are missing is: update the kernel before installing the kernel devel package. That’s just one line of text that you have to add, but it’s important.

  • I said “manually”, because if people would use atiupgrade or vboxlive, they wouldn’t have such problems (because those scripts make sure that the kernel-devel package matches the installed kernel version).

And - as already mentioned by @dd - while performing root tasks. you should use **su -l ** ( or su - ) and not just su to open a login shell an inherit root’s environment. No doubt about it.

Yes … although I don’t know exactly what this script does and I’m not using YaST. But these are details. You need to understand the concept:

IF kernel version doesn't match kernel-devel (and vice versa) THEN  (any) module will fail to build. 

I think I posted an example in your previous thread - the one you deleted. You should not delete a thread which contains comments. Do we not already lose enough posts because of this malfunctioning forum and expired cookies?

So the present kernel is 3.4.6-1.1 in a month or 2 that’ll be let’s say 3.4.7.2 or so. Without source & devel updated simultaneously 2 will be out sync & this tutorial as it is now won’t fly.
I know you say you don’t use Yast, but many newbs do, that said I should have put in to have kernel source & kernel devel checked for install.
The original idea I had was to point the newb to yast & install just like I had in post 9. Was my original idea what you meant?
If that is correct then I now have a good guess as to why we have so many problems with nvidia updates & the rest.
When I 1st did this the hard way I went by this page:
SDB:NVIDIA the hard way - openSUSE

If I am getting this right then the list on that page may need fixing.
Lastly, I’m getting better with that su - I need more practice with it. which I’m getting as I experiment with installing over & over to get this right.

Why do you want people to use both YaST and then zypper?
You should first refresh the repos with:

# zypper ref

check if a kernel update is available with:

# zypper lu

If there is one, update it with:

# zypper up kernel-desktop

or

# zypper up kernel-default

or for the impatient:

 
# zypper up  $(uname -r | sed 's|.*-|kernel-|')

lol!

then:


# zypper in kernel-devel, etc

Well, I’m not going to rewrite this tutorial. It looks like I just did actually. :frowning:

But again … only few people will benefit from this method. Installing from repo is the best approach for ‘newbies’. openSUSE is a little bit slower in packaging the latest nvidia driver. 304.37 is already available - as a package - on Fedora and ArchLinux. Is it a big deal to wait a week or two for a driver that will most likely change nothing or might even be worse? We’ve seen that often, and you will find numerous posts from angry nvidia users unable to downgrade to the previous driver.

Yeah, look’s like you’re starting to get the big picture.

not more, not less than 85% of all human writings … and probably more when it gets about software, philosophy and psychology. :open_mouth:

Actually if one has some time to offer and wants to do something useful, he could write a script that:

  • check/update the kernel and install kernel-devel, make and compiler
  • download the latest (or any other) nvidia run file with wget (Who does have time to waste on websites?)
  • install the nvidia driver in a chroot environment (probably the most tricky part)
  • generate a .spec file and create a rpm with an appropriate post-install scriptlet that will disable KMS and rebuild initrd.

so that end users (not just newbies) would just have to type something like: nvidiaupgrade (?) :wink:

Finally wasn’t your original purpose:

You made my day :wink:

Thank you so much, now my SuSE 12.2 is working with my Geforce 9500 GS!

Not completely like you wrote, but it’ working. Here my hints:
To enter “INIT 3”, I took this link:
How to Start openSUSE 12.2 with Grub 2 into Run Level 3 - Blogs - openSUSE Forums
(also not exctly like that, for me, the background was light green, the characters were white
=> nobody can read them, but come on, now, we have done so much things, we can manage that;-))

Also, I needed only one reboot, but, as said in the beginning:
YOU MADE MY DAY, THANK YOU SO MUCH!