Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116506 - Hardware Acceleration Guide lacks checks for hardware support of options
Summary: Hardware Acceleration Guide lacks checks for hardware support of options
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: nm (RETIRED)
URL: http://www.gentoo.org/doc/en/dri-howt...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-23 09:25 UTC by nm (RETIRED)
Modified: 2006-05-12 12:34 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dri-howto.xml.patch (dri-howto.xml.patch,3.36 KB, patch)
2005-12-23 10:07 UTC, nm (RETIRED)
Details | Diff
dri-howto.xml.patch (dri-howto.xml.patch,4.30 KB, patch)
2006-01-05 10:46 UTC, nm (RETIRED)
Details | Diff
dri-howto.xml.patch (dri-howto.xml.patch,4.32 KB, patch)
2006-01-05 11:15 UTC, nm (RETIRED)
Details | Diff
dri-howto.xml.patch w/out nVidia (dri-howto.xml.patch,4.32 KB, patch)
2006-01-05 12:05 UTC, nm (RETIRED)
Details | Diff
dri-howto.xml.patch (dri-howto.xml.patch,4.04 KB, patch)
2006-05-06 08:38 UTC, nm (RETIRED)
Details | Diff
dri-howto.xml.patch (dri-howto.xml.patch,4.26 KB, patch)
2006-05-07 07:39 UTC, nm (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nm (RETIRED) gentoo-dev 2005-12-23 09:25:31 UTC
http://www.gentoo.org/doc/en/dri-howto.xml

Okay, this guide is missing some very basic investigations of the user's hardware before it goes ahead and tells him what to do, with only a few warnings about "this may break your system." This is unacceptable; users need to know what their hardware is capable of before they implement the directions of this guide.

Specifically, they need to know the speeds of their video card, its supported write modes, and the motherboard's capabilities as well. These are all present in /proc; one merely has to do $ cat /proc/foo/bar to see what their hardware can do. I have added these checks to the relevant places in the existing doc; if a user's video card, for example, can't do fast writes (or their motherboard can't handle it), then they should not continue with the instruction, obviously.

The patch with the proposed additions will be up shortly. Pity that bugzie doesn't allow simultaneous comment and file submission. I'll even try to avoid turning it into an nVidia-centric section, though my graphics card is nVidia. However, the checks should work regardless of card manufacturer; /proc/device/ should have either nvidia or ati, depending on your system. For examples, I'll be using nVidia; go figure.
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2005-12-23 09:34:03 UTC
Unfortunately adding nvidia makes the name of the guide (dri-howto) invalid, as nvidia doesn't use the DRI.

In the vast majority of cases, no such investigation should be required. I don't know anybody who has an AGP card less than 4x; the fastwrite bit does nothing if not enabled in the BIOS as well; pageflipping just screws up rendering, not damages hardware.

I'm fine with your added checks, but the nvidia part needs some thought as we already have a separate complete nvidia guide.
Comment 2 nm (RETIRED) gentoo-dev 2005-12-23 09:49:28 UTC
(In reply to comment #1)
> Unfortunately adding nvidia makes the name of the guide (dri-howto) invalid, as
> nvidia doesn't use the DRI.
> 
> In the vast majority of cases, no such investigation should be required. I
> don't know anybody who has an AGP card less than 4x; the fastwrite bit does
> nothing if not enabled in the BIOS as well; pageflipping just screws up
> rendering, not damages hardware.
> 
> I'm fine with your added checks, but the nvidia part needs some thought as we
> already have a separate complete nvidia guide.

Right, I know that DRI is useless to nvidia. But things like SBA, fastwrites, and so on are actually not just relevant only to nVidia users. ATI and via chipset owners will want to know about things like that. This is going to be mentioned in the patch I'm about to put up. Have you read the hundreds of forum threads of problems users have with hardware acceleration for their ATI cards and/or VIA chipsets? Especially fast-writes seem to be horrible for VIA chipsets; most of their threads report hard lockups. I'll add a specific warning for this in the patch. Just wait a few more minutes. :)

PS: I know that I'll constantly be using an Nvidia example, but its point is just to show the kinds of things users can run into. I don't have my other laptop available, the one with an intel chipset, otherwise i'd pull some examples from it.
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2005-12-23 09:55:56 UTC
(In reply to comment #2)
> Right, I know that DRI is useless to nvidia. But things like SBA, fastwrites,
> and so on are actually not just relevant only to nVidia users. ATI and via
> chipset owners will want to know about things like that. This is going to be
> mentioned in the patch I'm about to put up. Have you read the hundreds of forum
> threads of problems users have with hardware acceleration for their ATI cards
> and/or VIA chipsets? Especially fast-writes seem to be horrible for VIA
> chipsets; most of their threads report hard lockups. I'll add a specific
> warning for this in the patch. Just wait a few more minutes. :)

No, I haven't had time to troll the forums for problems as much as I used to.

> PS: I know that I'll constantly be using an Nvidia example, but its point is
> just to show the kinds of things users can run into. I don't have my other
> laptop available, the one with an intel chipset, otherwise i'd pull some
> examples from it.

I can redo examples with my Radeon if it's up either very soon, or in a week, because I'm going on vacation.
Comment 4 nm (RETIRED) gentoo-dev 2005-12-23 10:07:08 UTC
Created attachment 75398 [details, diff]
dri-howto.xml.patch

Here are the proposed additions. If there is anything to add (or remove), let me know, of course. :)

For reference to other issues in this doc, see Bug #108904 ; perhaps the additions could be all be incorporated.
Comment 5 Donnie Berkholz (RETIRED) gentoo-dev 2006-01-02 21:48:15 UTC
(In reply to comment #4)
> Created an attachment (id=75398) [edit]
> dri-howto.xml.patch
> 
> Here are the proposed additions. If there is anything to add (or remove), let
> me know, of course. :)
> 
> For reference to other issues in this doc, see Bug #108904 ; perhaps the
> additions could be all be incorporated.

No such thing in /proc/driver for the DRI.

# ls /proc/driver/
rtc  snd-page-alloc
Comment 6 nm (RETIRED) gentoo-dev 2006-01-03 08:48:11 UTC
(In reply to comment #5)
> No such thing in /proc/driver for the DRI.
> 
> # ls /proc/driver/
> rtc  snd-page-alloc

Well, this isn't good. Maybe it's kernel version differences? I'm running gentoo-sources 2.6.12-r9. 

Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2006-01-03 09:03:38 UTC
No, I think it's something that the nvidia binary driver does that no DRI-using drivers do.

2.6.14-gentoo-r5
Comment 8 nm (RETIRED) gentoo-dev 2006-01-03 09:09:13 UTC
(In reply to comment #7)
> No, I think it's something that the nvidia binary driver does that no DRI-using
> drivers do.
> 
> 2.6.14-gentoo-r5

Well, great. I hope that doesn't invalidate the entire patch. The ideas behind it at least should still be valid, even if not all the instructions work.
Comment 9 nm (RETIRED) gentoo-dev 2006-01-05 10:46:52 UTC
Created attachment 76251 [details, diff]
dri-howto.xml.patch

Minor changes.
Comment 10 nm (RETIRED) gentoo-dev 2006-01-05 11:15:04 UTC
Created attachment 76254 [details, diff]
dri-howto.xml.patch

Fixed <date>...bah. 2005 --> 2006. It's a killer. :)
Comment 11 Donnie Berkholz (RETIRED) gentoo-dev 2006-01-05 11:23:04 UTC
If this is going to be committed, it needs to have a parallel for DRI-using cards. I certainly don't mind the idea of mixing the binary driver guides for ati and nvidia together with this into a universal direct rendering guide, but the instructions should either explicitly specify they only work with nvidia (not as good) or be portable (good).
Comment 12 nm (RETIRED) gentoo-dev 2006-01-05 11:48:26 UTC
(In reply to comment #11)
> If this is going to be committed, it needs to have a parallel for DRI-using
> cards. I certainly don't mind the idea of mixing the binary driver guides for
> ati and nvidia together with this into a universal direct rendering guide, but
> the instructions should either explicitly specify they only work with nvidia
> (not as good) or be portable (good).
> 

Absolutely. Unfortunately, I only have an nVidia system available at the moment. So, at the risk of stating the obvious, here is a clear definition of what's needed for a DRI-specific (non-nVidia) guide:

1) check for motherboard/video card capabilities before changing settings
2) Very quick example of some opptions available to such cards (if any, besides SBA and fast-writes

Currently, the following information in my patch is still valid and on-topic:
- explanation of AGP modes/settings
- Fast Writes
- VIA chipset troubles!
- enable options first in BIOS, where necessary

The other stuff isn't helpful, as it's hardware checking for an nVidia setup. I'll take that out and resubmit, so you can see what the more generic doc is like (with only minor updates now).
Comment 13 nm (RETIRED) gentoo-dev 2006-01-05 12:05:13 UTC
Created attachment 76258 [details, diff]
dri-howto.xml.patch w/out nVidia

A more DRI-specific patch. Commented out nVidia hardware checking (will have to find way of keeping the hardware checks, but with Intel/ATI/other graphics card/board) and made some other small fixes.

Also, I can't believe that I've been forgetting to put agpgart in modules.autoload.d. That's critical if agpgart has been built as a module. Fixed. :)
Comment 14 Leonardo Ferreira Fontenelle 2006-03-07 20:16:29 UTC
Linux kernel 2.6.13+ includes DRM for the VIA UniChrome chipset, so x11-drm is blocked from being installed.
Comment 15 nm (RETIRED) gentoo-dev 2006-05-06 07:21:51 UTC
Updated documentation product to keep it current (docs-user --> documentation). Also reviewing what needs to happen here. I haven't forgotten about this bug. :)
Comment 16 nm (RETIRED) gentoo-dev 2006-05-06 07:46:07 UTC
I'll take this one. An updated patch will go up for review shortly. I confirmed Leo's above comment as well. (Also, check the x11-drm ebuild for why it fails).
Comment 17 nm (RETIRED) gentoo-dev 2006-05-06 08:38:29 UTC
Created attachment 86285 [details, diff]
dri-howto.xml.patch

Okay, here's the new patch. Removed nvidia /proc stuff, since non-nvidia cards don't have driver/ in their system's /proc. Still, the section on card/motherboard compatibility checks for SBA & fast writes should be added at some point, so that users don't try something their system can't handle.

But first, I need someone with (preferably) an ATI card to contact me so that I can find where that info may be found in their /proc. Then I can add the checks to the doc.

As it is, please review the proposed patch before it's added. It's a lot more minor now, much more generic as spyderous requested.
Comment 18 nm (RETIRED) gentoo-dev 2006-05-07 05:40:53 UTC
Okay, I added in a few things; slightly modified the last posted patch. Still need an ATI or non-nvidia card user to provide a few bits of his/her /proc, so feel free to contact me on that. In the mean time, marking as RESO NEEDINFO. It's partially fixed, and the proposed addition is in comments in the doc.
Comment 19 nm (RETIRED) gentoo-dev 2006-05-07 06:49:52 UTC
Reopening. I'm working with fox2mike to figure out the needed info. Looks like the information needed can be found in lspci -vv. I'll write something up for this and add it to the guide.

Basically, users will need to make sure their VGA FW and SBA info agrees with the primary host controller FW and SBA capabilities. + means supported, - means unsupported in the Status section after Capabilities.
Comment 20 nm (RETIRED) gentoo-dev 2006-05-07 07:39:28 UTC
Created attachment 86363 [details, diff]
dri-howto.xml.patch

Thanks to fox2mike, I've found and verified a way to check for fast writes. His output was most useful; in fact, it's also useful even for nVidia card owners. :) Patch with addition is attached.
Comment 21 Samuli Suominen (RETIRED) gentoo-dev 2006-05-07 14:50:53 UTC
It says..

Warning: Enabling AGPFastWrite on a VIA chipset will very likely cause your machine to lock up. VIA chipsets do not play nicely with fast writes, so use this setting at your own risk.

Which is also the case with radeon (from r100 to r300) DRI drivers. 50-50 chance of getting machine hardlockups.
Comment 22 nm (RETIRED) gentoo-dev 2006-05-07 14:52:55 UTC
(In reply to comment #21)
> It says..
> 
> Warning: Enabling AGPFastWrite on a VIA chipset will very likely cause your
> machine to lock up. VIA chipsets do not play nicely with fast writes, so use
> this setting at your own risk.
> 
> Which is also the case with radeon (from r100 to r300) DRI drivers. 50-50
> chance of getting machine hardlockups.
> 

You're not also setting your AGP speeds past what is the maximum supported by your chipset, are you? There are several users who try to set 8x though their systems can only handle 4x or 2x...just asking because I've seen it confused with fast write issues as well.
Comment 23 nm (RETIRED) gentoo-dev 2006-05-07 14:55:04 UTC
(In reply to comment #22)
Though there is already a warning about this in the guide ("may increase instability").

While there's less of a chance of this for ATI cards, it's almost a certainty in VIA cards/chipsets, hence the big fat red warning for this brand. :)
Comment 24 Samuli Suominen (RETIRED) gentoo-dev 2006-05-07 15:01:22 UTC
> You're not also setting your AGP speeds past what is the maximum supported by
> your chipset, are you? There are several users who try to set 8x though their
> systems can only handle 4x or 2x...just asking because I've seen it confused
> with fast write issues as well.

I'm positive motherboard and card both supports 8x. It's not just me.. more like majority of people ("learned" that while hanging out on #dri, #xorg (freenode) and reading dri mailing list)
Comment 25 Samuli Suominen (RETIRED) gentoo-dev 2006-05-07 15:02:56 UTC
> > systems can only handle 4x or 2x...just asking because I've seen it confused
> > with fast write issues as well.

FYI,

If AGPMode "8" is setupped on box capable of just "4" it falls back to default "1"  
value with driver "radeon"
Comment 26 nm (RETIRED) gentoo-dev 2006-05-12 12:34:11 UTC
Okay, I finally added the changes to CVS. Closes the bug. Please examine your hardware info carefully before attempting to rice your video cards. :p

Not responsible for lost or stolen articles. Void where prohibited. Cash value 1/20 cent.