LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-14-2010, 06:03 PM   #1
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-14.1 on a Lenovo T61 6457-4XG
Posts: 3,959

Rep: Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936
nano How-To for using X with nVidia GPUs on slackware-current after March 31 updates


EDIT : post updated on April 2, 2010. I suppose that you upgraded -current following March 31 update.

Since Mon Mar 1 22:43:53 UTC 2010, slackware-current include following components:
- kernel 2.6.33 (upgraded to 2.6.33.1 since March 31)
- Xorg7.5, including xorg-server-1.7.5
- libdrm-2.4.18

Since then, several of us did encounter problems to use their nVidia gpu under X, for instance see this thread

I hope this post can help them coping with this situation.

But bear in mind that these problems will probably disappear in a not so distant future following updates of -current.
Then this nano How-To will become useless; when I will be aware of that I will either delete it or at least let you know.

To use a nVidia gpu under X we need a kernel driver as well as a driver for X (big finding!), chosen among:
- "vesa" (open source, not nVidia specific)
- "nv" (open source, nVidia specific, provided by nVidia)
- "nvidia" (closed source, provided as binary by nVidia, also known as "blob")
- "nouveau" (open source, in active development, expected to replace nv)

Conclusions

This part has been updated on April 2nd, 2010 following March 31 update of -current which include a better "nv" driver for X
[EDIT April 3rd] Blacklisting nouveau is not necessary if you set up a VGA (no VESA framebuffer) in lilo.conf and run lilo again: either comment "VGA=" option in lilo.conf or choose "VGA=normal" or "VGA=ext" instead of" VGA=nnn"
[EDIR April 6th]Temporary workaround if you get a blank screen at boot: use the nomdeset kernel parameter at boot time, see this post for explanations.


1) To use the vesa driver (works but has limited features), issue following commands as root.
Code:
echo "blacklist nouveau" >> /etc/modprobe.conf/blacklist.conf # don't write ">" instead of ">>" otherwise the file will be overridden
echo -e 'Section "Device"\nIdentifier "n"\nDriver "vesa"\nEndSection' > /etc/X11/xorg.conf
2) To use the nv driver (better handling of high resolutions, XRandR work), issue following commands:
Code:
echo "blacklist nouveau" >> /etc/modprobe.conf/blacklist.conf # don't write ">" instead of ">>" otherwise the file will be overridden
echo -e 'Section "Device"\nIdentifier "n"\nDriver "nv"\nEndSection' > /etc/X11/xorg.conf
3) Of course you can try the blob (I didn't).
I can't give any advise there, but be aware that not all versions work and some only if patched, as of today.

4) My advise is to give "nouveau" a try.
Gamers won't get 3D hardware acceleration yet but some nice features are already provided:
- KMS (kernel modesetting)
- good dual head support
- support for xrandr (X Resize and Rotate) version 1.2
For that you will need some more steps explained at the end of this post.

Explanations

Here is the summary of what I did and got (I always boot at runlevel 3):
- Booting a fresh -current install I got a black screen, probably because the "nouveau" kernel driver, though automatically chosen, miss its firmware
- Then I added "blacklist nouveau" at the end of /etc/modprobe.conf/blacklist.conf
- Then no problem while booting but after "startx" (under Fluxbox) I saw only the mouse cursor on a black screen. I could move it... that's it.
- Then I did set up an /etc/X11/xorg.conf file with driver "nv". X started but display was unusable with very weird colors.
- Then I replaced the driver "nv" by "vesa" and all was fine.
- I also tried "nouveau" with success (details follow)

I didn't try the "blob" (closed source nVida driver) but several people did encounter problems with it.

How-To use Nouveau

Please note first that though "nouveau" be modularized (as it should) in both -huge and -generic 2.6.33.1 kernels this don't suffice to use it "out of the box" in -current for several reasons:
- the driver for X is not included in xorg7.5 release
- a firmware for "nouveau", which is necessary with 2.6.33. kernel, doesn't ship with it
- the code for "nouveau" included in 2.6.33.1 is not compatible with libdrm-2.4.18, included in -current.

As we will see now, it is nevertheless possible to use "nouveau" in "current" with some more installation steps

In short for the impatient among us:

Have slackware-current or slackware64-current installed, including kernel 2.6.33 (preferably -generic) and xorg-server-1.7.5 (I suppose you use HAL and have no xorg.conf file in /etc/X11, orherwise adapt step 13 below accordingly).

First, blacklist nouveau in /etc/modprobe.d/blacklist.conf or set-up a VGA (no VESA framebuffer) mode in /etc/lilo.conf and run lilo, that is to say include the "VGA=normal" or "VGA=ext" option in /etc/lilo.conf

Then do what follows at runlevel 3:
Code:
1. mkdir -p ~/tmp && cd ~/tmp
2. wget http://people.freedesktop.org/~pq/nouveau-drm/master.tar.gz && tar xzf master.tar.gz
3. cd master/include && wget http://cgit.freedesktop.org/nouveau/linux-2.6/plain/nouveau/Makefile?h=master-compat
4. mv Makefile?h=master-compat Makefile && make
5. su && make install
6. cd /lib/modules/2.6.33.1/kernel/drivers/gpu && rm ttm/ttm.ko drm.ko nouveau/nouveau.ko && depmod -a && Ctrl + d
7. cd ~/tmp && git clone git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau/
8. cd xf86-video-nouveau && ./autogen.sh && make
9. su
10. For slackware-current : cp src/.libs/nouveau_drv.so /usr/lib/xorg/modules/drivers
10. For slackware64-current : cp src/.libs/nouveau_drv.so /usr/lib64/xorg/modules/drivers
11. grab the latest firmware package from http://people.freedesktop.org/~pq/nouveau-drm/ 
12. tar zxf nouveau-firmware-XXXXXXXX.tar.gz -C /lib/firmware # as of today replace XXXXXXXX by 20091212
13. echo -e 'Section "Device"\nIdentifier "n"\nDriver "nouveau"\nEndSection' > /etc/X11/xorg.conf
14. Ctrl + d # back to regular user
15. startx
For those wanting to know what they are doing (if any):

1. Feel free to use another directory if you prefer
2. We get what is necessary to build drm, ttm and nouveau modules compatible with libdrm 2.4.18. See http://nouveau.freedesktop.org/wiki/InstallDRM. Be aware that you'll get a snapshot, so your mileage may vary
3. We go where the makefile should go (don't ask me why) and download it there
4. We name the makefile Makefile and make the modules
5. We install the modules as root. After that you'll find it there :
/lib/modules/2.6.33.1/extra/ttm/ttm.ko
/lib/modules/2.6.33.1/extra/drm.ko
/lib/modules/2.6.33.1/extra/nouveau/nouveau.ko
6. We erase the corresponding modules shipped with package kernel-modules-2.6.33.1 as otherwise they would conflict with the new ones, and make the system aware of the new ones
7. We grab the source of the nouveau driver for X
8. We make this driver, whose name is nouveau_drv.so
9. We become root again (did you guess ?)
10. We put nouveau_drv.so where it should go, which depends on the ARCH of your distribution
11. Be aware that you'll get a snapshot, so your mileage may vary
12. This will create a directory in /lib/firmware with the many firmware files needed for various GPU
13. Minimum /etc/X11/xorg.conf for nouveau to work under X. Tune it to your liking.
14. Does that need an explanation ?
15. If you are superstitious, cross your fingers first. Anyhow, the chances that this will trigger an earthquake and/or a tsunami can be considered low, according to experts.

Would you ever like to go back to a "stock" slackware-current, do this:
- rm -rf /lib/firmware/nouveau
- removepkg kernel-modules # don't reboot after that!
- rm -rf /lib/modules/2.6.33.1 # don't reboot after that!
- installpkg kernel-modules-2.6.33.1
- rm -f /usr/lib/xorg/modules/drivers/nouveau_drv.so or rm -f /usr/lib64/xorg/modules/drivers/nouveau_drv.so

As usual, "this don't work here", remarks, comments, proposed enhancements etc. are gratefully welcome.

But before you complain, look here. In particular anything remaining from a previous blob (nVidia's closed source driver) installation can cause problems.

Credits go to the nouveau Wiki, mainly:
http://nouveau.freedesktop.org/wiki/
http://nouveau.freedesktop.org/wiki/InstallNouveau
http://nouveau.freedesktop.org/wiki/InstallDRM
http://nouveau.freedesktop.org/wiki/FAQ
http://nouveau.freedesktop.org/wiki/TroubleShooting

Last edited by Didier Spaier; 04-06-2010 at 11:33 AM. Reason: URL added
 
Old 03-14-2010, 06:13 PM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
Didier, perhaps you can un-check "Automatically parse URLs" or somehow put the URLs in plain-text, so they aren't weirded like that? Looks like mainly the WGET links are affected.

And/or put the tutorial in code tags so it can be readily copied & pasted into a text editor?

Thanks I'll be trying this again eventually, not too distant future.

Last edited by GrapefruiTgirl; 03-14-2010 at 06:15 PM.
 
Old 03-26-2010, 02:44 PM   #3
camerabambai
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 40

Rep: Reputation: 0
/home/giuseppe/master/drivers/gpu/drm/drm_sysfs.c:78: error: expected ')' before '(' token
/home/giuseppe/master/drivers/gpu/drm/drm_sysfs.c: In function 'drm_sysfs_create':
/home/giuseppe/master/drivers/gpu/drm/drm_sysfs.c:110: error: 'class_attr_version' undeclared (first use in this function)
/home/giuseppe/master/drivers/gpu/drm/drm_sysfs.c:110: error: (Each undeclared identifier is reported only once
/home/giuseppe/master/drivers/gpu/drm/drm_sysfs.c:110: error: for each function it appears in.)
/home/giuseppe/master/drivers/gpu/drm/drm_sysfs.c: In function 'drm_sysfs_destroy':
/home/giuseppe/master/drivers/gpu/drm/drm_sysfs.c:133: error: 'class_attr_version' undeclared (first use in this function)
make[2]: *** [/home/giuseppe/master/drivers/gpu/drm/drm_sysfs.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/home/giuseppe/master/drivers/gpu/drm] Error 2

Thanks for howto,i get this error with current master
repos,someone can help?
Thanks

Wow!
Found this..

http://mirror.leaseweb.com/archlinux/other/nouveau-drm/

Perfect works fine.
I have build pkgs,if someone intersted

http://rapidshare.com/files/36856321...4-1mg.txz.html
http://rapidshare.com/files/36856321...4-1mg.txz.html
http://rapidshare.com/files/36856321...4-1mg.txz.html

I have also enable 3d(very slow compared
to nvidia binary).

Last edited by unSpawn; 03-27-2010 at 08:17 PM. Reason: //Merged for legibility reasons
 
Old 03-26-2010, 03:43 PM   #4
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-14.1 on a Lenovo T61 6457-4XG
Posts: 3,959

Original Poster
Rep: Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936
Same here. My guess is that's because of the last update of the nouveau git tree last Monday, see latest news on top of this page. So either install 2.6.34-rc2 (which could break some other thing, by the way...) or use an alternate installation method as explained there.

Good luck

PS meanwhile I can't compile xf86-video-nouveau any more either, at least against 2.6.34-rc1. Dunno why ???

I'm going to try against 2.6.33 and 2.6.34-rc2 when I find time to do that and see what I come up with.

Too bad I dropped the last X module that I built successfully...

Last edited by Didier Spaier; 03-26-2010 at 04:14 PM.
 
Old 03-26-2010, 04:49 PM   #5
camerabambai
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 40

Rep: Reputation: 0
Someone know how to revert git repo?
Or better..a working master.tar.gz
for kernel-2.6.33?
Thanks

Last edited by camerabambai; 03-26-2010 at 04:52 PM.
 
Old 03-26-2010, 04:53 PM   #6
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
To switch to and clone a particular version of the repo using tags, enter your local repo and use:
Code:
git reset --hard <version-of-whatever-it-is>

git checkout -f <branch>

git pull <optional remote-repo-address>
If not using tags, I'm not sure -- git does a lot of stuff I'm not familiar with yet.

Sasha
 
Old 03-26-2010, 10:02 PM   #7
HerbertJ
LQ Newbie
 
Registered: Oct 2008
Posts: 26

Rep: Reputation: 16
Hello, I just upgraded to current 64, and now I just get a blank screen after some text on nouveau.
The only think I can think of is that my monitor doesnt support whatever resolution nouveau is setting itself to.
I can only assume that whatever genius programmed this thing never considered the possibility of a monitor that only supports 1024x768 and set the resolution way too high. Nice one whoever you are. Well as it stands I can no longer do anything with my computer. Since I can't see what im typing I cant update the computer too easily whenever an update does come out. Plus all these xorg nouveau hacks dont apply to me since I don't get that far.

Of course, perhaps this is the slackware teams idea of a sick joke, the driver being pronounced no-view, and its exactly what I got.

So the question is, is there anyway to disable no-view at boot, or am i without hope?
 
Old 03-26-2010, 11:03 PM   #8
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 226Reputation: 226Reputation: 226
Blacklist the nouveau module
 
Old 03-27-2010, 08:41 AM   #9
camerabambai
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 40

Rep: Reputation: 0
Quote:
Originally Posted by Hefty Herb View Post
Hello, I just upgraded to current 64, and now I just get a blank screen after some text on nouveau.
The only think I can think of is that my monitor doesnt support whatever resolution nouveau is setting itself to.
I can only assume that whatever genius programmed this thing never considered the possibility of a monitor that only supports 1024x768 and set the resolution way too high. Nice one whoever you are. Well as it stands I can no longer do anything with my computer. Since I can't see what im typing I cant update the computer too easily whenever an update does come out. Plus all these xorg nouveau hacks dont apply to me since I don't get that far.

Of course, perhaps this is the slackware teams idea of a sick joke, the driver being pronounced no-view, and its exactly what I got.

So the question is, is there anyway to disable no-view at boot, or am i without hope?
Blacklist nouveau and drm,is necessary even with new drivers.
 
Old 03-27-2010, 08:52 AM   #10
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,057

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
Yeah, I'm going thru this over multiple installs
http://www.linuxquestions.org/questi...-1.7.5-798225/
 
Old 03-27-2010, 11:19 AM   #11
camerabambai
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 40

Rep: Reputation: 0
Someone know if is possible to get
nouveau+3d in a pv-ops or xen patched
kernel(dom0)?
Thanks

http://pastebin.com/9SKa269E

This is the crash with nouveau+xen kernel
of course nouveau recompiled for new sources

Last edited by unSpawn; 03-27-2010 at 08:18 PM. Reason: //Merged for legibility reasons
 
Old 03-27-2010, 10:58 PM   #12
HerbertJ
LQ Newbie
 
Registered: Oct 2008
Posts: 26

Rep: Reputation: 16
Is there anyway to blacklist it from lilo at bootup? I've looked around and I see no way to do that thats standardized, and no specific way to do it in slackware.
 
Old 03-27-2010, 11:58 PM   #13
slowpoke
Member
 
Registered: Feb 2010
Posts: 33

Rep: Reputation: 15
Didier Spaier:
Thanks!!!
 
Old 03-28-2010, 03:57 AM   #14
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-14.1 on a Lenovo T61 6457-4XG
Posts: 3,959

Original Poster
Rep: Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936
@Hefty Herb: as stated in the first post, edit the file /etc/modprobe.d/blacklist.conf and append following line at the end :
Code:
blacklist nouveau
You could re-compile the kernel without nouveau as well but frankly you'd waste your time IMHO.

@Slowpoke: you are welcome
 
0 members found this post helpful.
Old 03-28-2010, 11:35 PM   #15
HerbertJ
LQ Newbie
 
Registered: Oct 2008
Posts: 26

Rep: Reputation: 16
Thanks for the reply didier Spaier. As I stated before, I boot into a black screen so I cant even see a login prompt, so I was asking if I could somehow blacklist it at boot time, as in, from lilo. Yes I could go through the trouble of downloading a boot CD, mount my partition, and make the changes. Might as well download another distro and install it. Thanks for the sarcasm that indicated I'm too stupid to read the previous replys. Now everyone know what kind of a-hole you are.

Thats ok, I had a good 10 year run with slackware. Time to move on I guess.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] KDE desktop effects not working with Intel graphics (Slackware-Current; March 7, 2010 piratesmack Slackware 5 03-09-2010 08:08 AM
-current (march 19 '07) + NVIDIA driver. truthfatal Slackware 1 03-20-2007 08:01 AM
Any updates on progress of Slackware current?? SlackwareInAZ Slackware 7 12-24-2006 04:43 PM
Slackware current updates today! neo Slackware 2 04-22-2005 05:32 PM
Why haven't there been any updates to slackware current lately? moger Slackware 18 07-21-2004 10:21 AM


All times are GMT -5. The time now is 07:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration