View previous topic :: View next topic |
Author |
Message |
shazow Apprentice
Joined: 11 Dec 2003 Posts: 176 Location: Canada, Ontario
|
Posted: Tue May 03, 2005 6:57 pm Post subject: [SOLVED] ATI is being mean again, no DRI |
|
|
Salutations!
Several months ago, my ATI (Radeon 9600XT) has been working perfectly, I was even playing World of Warcraft with it. Then, I stopped playing, and now that I check my glxgears, I noticed that DRI isn't working again.
This is the problem (see below for the rest of the output):
Code: | direct rendering: No |
I've tried:- Re-emerging ati-drivers (and again after each kernel compile), and running `opengl-update ati`
- Changing kernels (from gentoo dev sources to mm-sources, gentoo dev sources was giving me a strange error regarding MTRR, switching fixed it, I also suspect adding nomtrr in my grub.conf would have fixed it.)
- Kernel: Trying every combination in `Support for frame buffer devices` (from Y to M to N, no change with DRI).
- Kernel: Compiling /dev/agpgart and my chipset as M vs Y (no change).
- Re-generating my xorg.conf using fglrxconfig
- Toggling Option "UseInternalAGPGART" in xorg.conf
- I've tried following the ATI HOWTO on the Gentoo Wiki from scratch, to no avail.
Here's a snip from /var/log/Xorg.0.log: Code: | (II) fglrx(0): doing DRIScreenInit
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (Unknown error 999)
drmOpenDevice: open result is -1, (Unknown error 999)
drmOpenDevice: Open failed
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (Unknown error 999)
drmOpenDevice: open result is -1, (Unknown error 999)
drmOpenDevice: Open failed
[drm] failed to load kernel module "fglrx"
(II) fglrx(0): [drm] drmOpen failed
(EE) fglrx(0): DRIScreenInit failed!
(WW) fglrx(0): ***********************************************
(WW) fglrx(0): * DRI initialization failed! *
(WW) fglrx(0): * (maybe driver kernel module missing or bad) *
(WW) fglrx(0): * 2D acceleraton available (MMIO) *
(WW) fglrx(0): * no 3D acceleration available *
(WW) fglrx(0): ********************************************* * |
I've seen others on the forum with similar errors, but their solutions don't seem to work for me, and I'm all out of ideas.
Help? :-)
Here are the relevant outputs:
Here are the relevant config files:
Versions:- media-video/ati-drivers-8.12.10
- x11-base/xorg-x11-6.8.2-r1
- linux-2.6.12-rc3-mm2
Thanks in advance, once again,
- shazow
Last edited by shazow on Wed May 04, 2005 3:59 pm; edited 1 time in total |
|
Back to top |
|
|
irasnyd Apprentice
Joined: 16 Feb 2003 Posts: 286 Location: Placentia, CA
|
Posted: Tue May 03, 2005 7:31 pm Post subject: |
|
|
What happens if you try "modprobe fglrx" on the command line? (as root)
Could you give the output of lsmod after you try modprobing the module?
Very nicely layed out request for help, by the way. I wish everyone's requests were like this. |
|
Back to top |
|
|
Wedge_ Advocate
Joined: 08 Aug 2002 Posts: 3614 Location: Scotland
|
Posted: Tue May 03, 2005 7:39 pm Post subject: |
|
|
shazow wrote: | linux-2.6.12-rc3-mm2 |
I would be surprised if the driver actually compiles successfully against that kernel. The thing is that the ebuild will complete successfully even if the fglrx module fails to compile (bad idea IMO), so it's easy to miss with there not being an obvious error message. If the module fails to compile, you won't be able to load it (duh ), and if it's not loaded, 3D acceleration is disabled. There is no mention of fglrx in your dmesg output from what I can see, so I'm guessing this is what's happened. I would switch to a different kernel and try compiling the driver against it (watch the ebuild output carefully) or looking around for a driver patch that will let it compile against the 2.6.12-rc kernels.
irasnyd wrote: | Very nicely layed out request for help, by the way. I wish everyone's requests were like this. |
Agreed _________________ Per Ardua Ad Astra
The Earth is the cradle of the mind, but we cannot live forever in a cradle - Konstantin E. Tsiolkovsky
Gentoo Radeon FAQ |
|
Back to top |
|
|
shazow Apprentice
Joined: 11 Dec 2003 Posts: 176 Location: Canada, Ontario
|
Posted: Tue May 03, 2005 7:41 pm Post subject: |
|
|
Code: | # modprobe fglrx
FATAL: Module fglrx not found. |
So I guess Wedge is right...
I'll try compiling it against a different kernel. Any particular one I should try? Keep in mind, my previous kernel was linux-2.6.11-gentoo-r4, and that one didn't work either (although it also gave an mtrr error, so that may have been the cause for that). Should I go even further back? If I remember, that kernel allowed me to modprobe fglrx, but I would still not get direct rendering due to the mtrr error.
... And thanks for the compliments. If I'm going to ask for help, might as well make life a bit easier for the helpers... (That and I hate superlong code tags...)
- shazow |
|
Back to top |
|
|
irasnyd Apprentice
Joined: 16 Feb 2003 Posts: 286 Location: Placentia, CA
|
Posted: Tue May 03, 2005 7:50 pm Post subject: |
|
|
I might be able to help with the mtrr error if you can post the error. (probably in dmesg I assume)
I was getting a mtrr error, but my 3d acceleration still worked. I've solved the mtrr error on my system, so maybe the solution is the same on yours. |
|
Back to top |
|
|
kanis n00b
Joined: 04 Oct 2004 Posts: 24 Location: Spokane, Washington, USA
|
Posted: Tue May 03, 2005 7:53 pm Post subject: |
|
|
I've just recently had similar problems with my 9800 Pro. I'm really thinking about compiling a universal source of information (that works) on this ATI bullshat. It's come to my attention that the trick to this is to do it all in a specific order, and do everything a certain way otherwise everything goes to hell.
What I did:
Code: |
emerge unmerge ati-drivers
|
recompiled the kernel, and had this under Device Drivers->Character Devices:
Code: |
CONFIG_AGP=y
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
CONFIG_AGP_INTEL=m
CONFIG_AGP_INTEL_MCH=m
|
...obviously, you will have CONFIG_AGP_NVIDIA=m instead. Make sure to make them as modules:
I also had this under Device Drivers->Graphics Support:
Code: |
# CONFIG_FB_RADEON_OLD is not set
CONFIG_FB_RADEON=m
# CONFIG_FB_RADEON_I2C is not set
CONFIG_FB_RADEON_DEBUG=y
|
After recompiling, I did:
After that, I edited /etc/modules.autoload.d/kernel-2.6:
(make sure they're in this EXACT order)
Code: |
agpart
intel-agp
fglrx
|
After that, I edited my xorg.conf, which you seem to have down well. Just make sure to have:
Code: |
Option "UseInternalAGPGART" "no"
|
Because setting it to "yes" caused me problems.
You can set it all up with /opt/ati/bin/fglrxconfig
After that, reboot and see if your modules load up. Don't be alarmed it agpart says that it failed to load during the boot process, because there's a chance it already loaded prior or whatever. Either way, my stuff works even with that error message. Anyhoo, then do this fancy jazz:
Then start up X, and run this command:
Code: |
/opt/ati/bin/fglrxinfo
|
If you don't see your Radeon card listed, then there are two possible problems:
1) You didn't get everything setup right (just try going back and tweaking configs/reboot/check to see if you copied bzImage to /boot (the #1 mistake I make )
2) Your username doesn't have access to the video card. In which case make sure that you have the Mode 0666 enabled in your xorg.conf
You can also do:
Code: |
su
<enter password>
/opt/ati/bin/fglrxinfo
|
And see if your Radeon card appears while you're root. If it does, then your user doesn't have access to the video card. I think you can remedy this by adding your user to the group video, but I think it has to be explained in xorg.conf as well:
Code: |
Section "dri"
# Access to OpenGL ICD is allowed for all users:
Mode 0666
# Access to OpenGL ICD is restricted to a specific user group:
#Group 27 # video
#Mode 0660
EndSection
|
...where you'd uncomment out that #Group line. And make sure that "video" corresponds to group number 27, or else replace the number with whatever GID video is.
Hope this all helps. _________________ Siggy siggy
Last edited by kanis on Tue May 03, 2005 7:56 pm; edited 1 time in total |
|
Back to top |
|
|
shazow Apprentice
Joined: 11 Dec 2003 Posts: 176 Location: Canada, Ontario
|
Posted: Tue May 03, 2005 7:54 pm Post subject: |
|
|
irasnyd wrote: | I was getting a mtrr error, but my 3d acceleration still worked. I've solved the mtrr error on my system, so maybe the solution is the same on yours. |
I'm compiling the old kernel again now, so I'll let you know for sure in a bit, but as far as I remember, it was something like this: Code: | *ERROR* mtrr allocation failed (-22) |
(Very similar to the post on the Rage3D boards, but I didn't want to add "nomtrr" because that would gimp my console scrolling and the elaborate mtrr appendage hack seemed to be a shoddy work-around, so I figured a kernel update would fix it.. and here I am.)
And actually, I didn't have 3d acceleration, but I had no complaints when i modprobed fglrx, and lsmod listed it just fine, but no direct rendering.
- shazow
P.S.
Thank you, kanis, for the long writeup.
I've tried everything you mentioned (I normally don't have CONFIG_FB_RADEON at all, I use vesafb as Wedge_ suggested in another thread, a while ago. I just enabled it in the latest version of my .config for testing.)
Update: I've finished recompiling my old kernel, and I got this when emerging ati-drivers: Code: | * DRM module not built
| The rest went OK.
Update #2: Alright, rebooted, here's what dmesg has to say:
Code: | ...
[fglrx] module loaded - fglrx 8.12.10 [Apr 4 2005] on minor 0
mtrr: 0xc0000000,0x8000000 overlaps existing 0xc0000000,0x1000000
[fglrx:firegl_addmap] *ERROR* mtrr allocation failed (-22)
[fglrx] Maximum main memory to use for locked dma buffers: 430 MBytes.
[fglrx] AGP detected, AgpState = 0x00000000 (hardware caps of chipset)
[fglrx:firegl_unlock] *ERROR* Process 11256 using kernel context 0
... |
And still no direct rendering.
And, as the 3D Rage thread examplifies, my mtrr is incorrect (it was correct with the mm-sources kernel):
Code: | # cat /proc/mtrr
reg00: base=0x00000000 ( 0MB), size= 512MB: write-back, count=1
reg01: base=0xe0000000 (3584MB), size= 128MB: write-combining, count=1
reg02: base=0xc0000000 (3072MB), size= 16MB: write-combining, count=1 |
Should I try adding nomtrr to my boot and doing his elaborate hack?
Update #3: Tried adding the nomtrr to grub.conf, no effect. |
|
Back to top |
|
|
kanis n00b
Joined: 04 Oct 2004 Posts: 24 Location: Spokane, Washington, USA
|
Posted: Tue May 03, 2005 8:27 pm Post subject: |
|
|
You can go ahead and try it with nomtrr. mtrr is supposed to be required for 3D acceleration, but I don't really know if that's true. All I know for sure is that it speeds up the framebuffer. Were you initially having this mtrr error from the beginning?
[edit] Apparently it is
You can always manually alter MTRR by changing the values in /proc/mtrr
I'm wondering if the problem with your MTRR has something to do with your AGP driver. Are you sure you have the correct chipset module loaded (agp-nvidia)? I think that's what handles that problem, but I'm not 100% sure. _________________ Siggy siggy |
|
Back to top |
|
|
irasnyd Apprentice
Joined: 16 Feb 2003 Posts: 286 Location: Placentia, CA
|
Posted: Tue May 03, 2005 8:39 pm Post subject: |
|
|
shazow wrote: | irasnyd wrote: | I was getting a mtrr error, but my 3d acceleration still worked. I've solved the mtrr error on my system, so maybe the solution is the same on yours. |
I'm compiling the old kernel again now, so I'll let you know for sure in a bit, but as far as I remember, it was something like this: Code: | *ERROR* mtrr allocation failed (-22) |
(Very similar to the post on the Rage3D boards, but I didn't want to add "nomtrr" because that would gimp my console scrolling, and I figured a kernel update would fix it.. so here I am.)
And actually, I didn't have 3d acceleration, but I had no complaints when i modprobed fglrx, and lsmod listed it just fine, but no direct rendering.
- shazow |
That's exactly the one I fixed on my system. I'm pretty sure it's the framebuffer allocating the mtrr for it's usage. The problem is that the kernel limits the memory that is put into the framebuffer's mtrr to 16MB. When ati's driver tries to allocate the rest of the videocard's memory, the error happens.
Here is what I have added to my /etc/conf.d/local.start file:
Code: | #for ati-drivers
echo 'disable=2' >| /proc/mtrr
echo "base=0xc8000000 size=0x8000000 type=write-combining" >| /proc/mtrr
|
You will probably need to change number in the disable line, and the hex numbers in the base and size lines.
Update: According to the post above, try running (as root) the following commands:
Code: | echo 'disable=2' >| /proc/mtrr
echo "base=0xc0000000 size=0x8000000 type=write-combining" >| /proc/mtrr
rmmod fglrx
modprobe fglrx
|
If all goes well, you should be able to restart X and not have that error show up. (Check dmesg for the error again) If it worked, you can add the two "echo" lines to your /etc/conf.d/local.start file to have it happen automatically at boot.
Your mtrr's are wrong according to the dmesg and /proc/mtrr you posted above.
Last edited by irasnyd on Wed May 04, 2005 9:40 pm; edited 1 time in total |
|
Back to top |
|
|
shazow Apprentice
Joined: 11 Dec 2003 Posts: 176 Location: Canada, Ontario
|
Posted: Tue May 03, 2005 10:44 pm Post subject: |
|
|
irasnyd wrote: | According to the post above, try running (as root) the following commands:
Code: | echo 'disable=2' >| /proc/mtrr
echo "base=0xc0000000 size=0x0x8000000 type=write-combining" >| /proc/mtrr
rmmod fglrx
modprobe fglrx
|
If all goes well, you should be able to restart X and not have that error show up. (Check dmesg for the error again) If it worked, you can add the two "echo" lines to your /etc/conf.d/local.start file to have it happen automatically at boot. |
Tried it, seemed to work...
Code: | $ cat /proc/mtrr
reg00: base=0x00000000 ( 0MB), size= 512MB: write-back, count=1
reg01: base=0xe0000000 (3584MB), size= 128MB: write-combining, count=1
reg02: base=0xc8000000 (3200MB), size= 128MB: write-combining, count=1
|
Then I restarted X as you instructed, here's what dmesg had to say:
Code: | ...
[fglrx] module unloaded - fglrx 8.12.10 [Apr 4 2005] on minor 0
[fglrx] Maximum main memory to use for locked dma buffers: 430 MBytes.
ACPI: PCI interrupt 0000:03:00.0[A] -> GSI 19 (level, high) -> IRQ 19
[fglrx] module loaded - fglrx 8.12.10 [Apr 4 2005] on minor 0
[fglrx] Maximum main memory to use for locked dma buffers: 430 MBytes.
[fglrx] AGP detected, AgpState = 0x00000000 (hardware caps of chipset)
[fglrx:firegl_unlock] *ERROR* Process 15300 using kernel context 0
|
And, glxinfo still says "no" to direct rendering...
Any other ideas?
*looks at Wedge_'s general direction* :P
- shazow |
|
Back to top |
|
|
irasnyd Apprentice
Joined: 16 Feb 2003 Posts: 286 Location: Placentia, CA
|
Posted: Tue May 03, 2005 10:53 pm Post subject: |
|
|
shazow wrote: | Tried it, seemed to work...
Code: | $ cat /proc/mtrr
reg00: base=0x00000000 ( 0MB), size= 512MB: write-back, count=1
reg01: base=0xe0000000 (3584MB), size= 128MB: write-combining, count=1
reg02: base=0xc8000000 (3200MB), size= 128MB: write-combining, count=1
|
Then I restarted X as you instructed, here's what dmesg had to say:
Code: | ...
[fglrx] module unloaded - fglrx 8.12.10 [Apr 4 2005] on minor 0
[fglrx] Maximum main memory to use for locked dma buffers: 430 MBytes.
ACPI: PCI interrupt 0000:03:00.0[A] -> GSI 19 (level, high) -> IRQ 19
[fglrx] module loaded - fglrx 8.12.10 [Apr 4 2005] on minor 0
[fglrx] Maximum main memory to use for locked dma buffers: 430 MBytes.
[fglrx] AGP detected, AgpState = 0x00000000 (hardware caps of chipset)
[fglrx:firegl_unlock] *ERROR* Process 15300 using kernel context 0
|
And, glxinfo still says "no" to direct rendering...
Any other ideas?
*looks at Wedge_'s general direction*
- shazow |
Yep, mtrr is working now. I have no idea about the new error though. Hopefully Wedge_ can help you out. |
|
Back to top |
|
|
kanis n00b
Joined: 04 Oct 2004 Posts: 24 Location: Spokane, Washington, USA
|
Posted: Wed May 04, 2005 4:28 am Post subject: |
|
|
shazow wrote: |
Then I restarted X as you instructed, here's what dmesg had to say:
Code: | ...
[fglrx] module unloaded - fglrx 8.12.10 [Apr 4 2005] on minor 0
[fglrx] Maximum main memory to use for locked dma buffers: 430 MBytes.
ACPI: PCI interrupt 0000:03:00.0[A] -> GSI 19 (level, high) -> IRQ 19
[fglrx] module loaded - fglrx 8.12.10 [Apr 4 2005] on minor 0
[fglrx] Maximum main memory to use for locked dma buffers: 430 MBytes.
[fglrx] AGP detected, AgpState = 0x00000000 (hardware caps of chipset)
[fglrx:firegl_unlock] *ERROR* Process 15300 using kernel context 0
|
|
That error generally means that you have the wrong AGP driver module, or it's not loading. _________________ Siggy siggy |
|
Back to top |
|
|
shazow Apprentice
Joined: 11 Dec 2003 Posts: 176 Location: Canada, Ontario
|
Posted: Wed May 04, 2005 4:30 am Post subject: |
|
|
Well, agpgart is loading... No doubt SOMETHING is wrong.
Code: | $ lsmod
Module Size Used by
fglrx 240188 0
wacom 11904 0
agpgart 29424 1 fglrx
w83l785ts 6228 0
asb100 22420 0
i2c_sensor 3392 2 w83l785ts,asb100
i2c_nforce2 6016 0
... |
- shazow |
|
Back to top |
|
|
kanis n00b
Joined: 04 Oct 2004 Posts: 24 Location: Spokane, Washington, USA
|
Posted: Wed May 04, 2005 4:45 am Post subject: |
|
|
Try checking various AGP drivers... if agp-nvidia isn't loading, maybe it's something else. For me I had a hell of a time getting crap to work because I was confusing my AGP driver with my Video Card driver... so I was like "wtf why isn't agp-ati loading?!" _________________ Siggy siggy |
|
Back to top |
|
|
Wedge_ Advocate
Joined: 08 Aug 2002 Posts: 3614 Location: Scotland
|
Posted: Wed May 04, 2005 8:39 am Post subject: |
|
|
It looks like the problem is that you're only loading one of the two kernel AGP modules. Your lspci output indicates an nForce2 board, so you'd need to load nvidia-agp in addition to agpgart. As kanis said earlier, you need to load the kernel AGP modules before the fglrx module (ie agpgart then nvidia-agp then fglrx). If you don't do this, the fglrx module can assume that you want it to use its own AGP support, which probably isn't what you want. _________________ Per Ardua Ad Astra
The Earth is the cradle of the mind, but we cannot live forever in a cradle - Konstantin E. Tsiolkovsky
Gentoo Radeon FAQ |
|
Back to top |
|
|
shazow Apprentice
Joined: 11 Dec 2003 Posts: 176 Location: Canada, Ontario
|
Posted: Wed May 04, 2005 3:59 pm Post subject: |
|
|
Ah, success!!
As per Wedge_'s advice, I modprobed nvidia_agp, which loaded fine, then I followed the Rage3D thread hack (which irasnyd paraphrased with a small typo, size=0x0x8000000 should be size=0x8000000). Then I restarted x and... Tada, direct rendering: Yes.
I noticed that when I have my list of modules in /etc/modules.autoload, it DOES load, but when I moved them to /etc/modules.autoload.d/kernel-2.6, it didn't load (which is why I suspect nvidia_agp didn't load).
Code: | # cat /etc/modules.autoload.d/kernel-2.6
agpgart
nvidia-agp
fglrx |
Thank you very much!
I'll add that hack to my init script... I hope it gets fixed eventually though?
We need to get Wedge_ a theme song or something!
Weeeeeeeeee,
- shazow |
|
Back to top |
|
|
Luud Apprentice
Joined: 05 Jun 2003 Posts: 246 Location: Netherlands
|
Posted: Mon May 09, 2005 7:14 pm Post subject: |
|
|
Hi guys,
This thread saved me this time.
I always used to use the internal AGP gart module (thus the one bundled with the ati-drivers) on my dual athlon. All of a sudden X didn't work anymore, It completely crashed my system. The only solution was the reset button. Well, I updated the kernel, switched to a simpler xorg.conf setup (I had a dual head setup) and finally I managed to get X working again. But no DRI. I was stuck with the ENOMEM problem as mentionned in Wedge_'s FAQ.
As it turns out, none of the suggestions in Question 4.3: When I try to start X, it fails with a message saying it was 'unable to acquire AGP, error "xf86_ENOMEM"' worked for me. The solution was using the external agpgart module with the correct agp driver module. In my case it is amd_k7_agp.
So, if I'm allowed a small suggestion for Wedge_ in order to help others, please add a line to the above FAQ item stating something like:
"If you use an external agpgart module, make sure you have the correct agp driver module (e.g. nvidia-agp, intel-agp, amd_k7_agp, ...) loaded after agpgart and before fglrx".
This would likely have saved me some time, so it might help others as well.
Anyway, thanks for the FAQ and the good postings! _________________ "Great minds don't think alike. If they did, the patent office would only have about fifty inventions." - Wally |
|
Back to top |
|
|
Wedge_ Advocate
Joined: 08 Aug 2002 Posts: 3614 Location: Scotland
|
Posted: Mon May 09, 2005 10:12 pm Post subject: |
|
|
Luud wrote: | So, if I'm allowed a small suggestion for Wedge_ in order to help others, please add a line to the above FAQ item stating something like:
"If you use an external agpgart module, make sure you have the correct agp driver module (e.g. nvidia-agp, intel-agp, amd_k7_agp, ...) loaded after agpgart and before fglrx".
This would likely have saved me some time, so it might help others as well. |
Not a problem, I'll add that in. Thanks for the suggestion _________________ Per Ardua Ad Astra
The Earth is the cradle of the mind, but we cannot live forever in a cradle - Konstantin E. Tsiolkovsky
Gentoo Radeon FAQ |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|