View previous topic :: View next topic |
Author |
Message |
nihues n00b
Joined: 20 May 2003 Posts: 47 Location: Balneário Camboriú / SC
|
Posted: Tue Jul 31, 2007 6:10 pm Post subject: Solve your agp issues with a kernel patch |
|
|
Hello people, after almost 1 YEAR trying to figure out what the hell was going on with my agp and linux, I finally found a solution!
Well the problem is, nvidia or ati + agpgart + amd64-agp locks x11 or gives blank screen when entering or is slow fps compared to windows.
Problems related: Linux says agp size wrong, mtrr size is wrong, agp not working, status on agp on nvidia is disabled and related problems and others more...
It's not a nvidia or ati problem, it's a kernel bug not recognizing the agp right.
So, there are 2 choices:
Workaround 1: boot to windows and reboot to linux, then agp is working right... (worked here)
But this is not a good choice isn't? =)
Workaround 2: This is a bug on kernel-source still opened, below thers is the thread of the bug, it has many patches, I tried one for my motherboard and worked for me. Use the patch below to your current kernel source, I used lasted of gentoo-source ~x86 and worked perfect.
I tested only with Asus K8V-X SE, but it should work with all KT800* northbridge, asrock chipsets should work too, but there are more patches for others chipsets, see link in the end.
1. go to /usr/src/linux
2. create a empty file and paste the code below: nano agp_issue
Code: | Index: linux/drivers/pci/quirks.c
===================================================================
--- linux.orig/drivers/pci/quirks.c
+++ linux/drivers/pci/quirks.c
@@ -23,6 +23,20 @@
#include <linux/acpi.h>
#include "pci.h"
+static void quirk_asrock_agp_aperture(struct pci_dev *dev)
+{
+ u32 aper_base;
+
+ pci_read_config_dword(dev, 0x94, &aper_base);
+ printk("QUIRK aper_base = %x\n", aper_base);
+
+ aper_base &= 0x7f;
+
+ printk("QUIRK aper_base changed to %x\n", aper_base);
+ pci_write_config_dword(dev, 0x94, aper_base);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1103, quirk_asrock_agp_aperture);
+
/* The Mellanox Tavor device gives false positive parity errors
* Mark this device with a broken_parity_status, to allow
* PCI scanning code to "skip" this now blacklisted device. |
then patch the kernel: patch -p1 < agp_issue
then recompile and install your kernel, make sure agpgart and support for amd64 agp is module or enabled.
in xorg.conf my nvagp is set to 2 now, it was set to 1 (use nvagp) or 0 (disable agp) before, but with 2 (use kernel agp) always got locks or reboots.
What you gain with this? Well, you gain AGP working and performance gain, here is what I got now:
Before:
Quote: | mybox nihues # cat /proc/driver/nvidia/agp/status
Status: Disabled |
After:
Quote: | mybox nihues # cat /proc/driver/nvidia/agp/status
Status: Enabled
Driver: AGPGART
AGP Rate: 8x
Fast Writes: Enabled
SBA: Enabled |
Quake3 Before: ~82 fps
Quake3 After: ~112fps
It's a ~30% increase in 3d performance! It takes only 10min of your time too
There are more patches for other motherboars, but i can only test mine, if u have an agp graphic card and your agp is not working, you shoul look here http://bugzilla.kernel.org/show_bug.cgi?id=6350
Maybe this should be used in gentoo-sources patches? if people could test all the patches on that thread, at least some agp issues could be erased... |
|
Back to top |
|
|
nihues n00b
Joined: 20 May 2003 Posts: 47 Location: Balneário Camboriú / SC
|
Posted: Fri Aug 31, 2007 4:09 pm Post subject: |
|
|
well, almost 1000 views, anyone tried? |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Sun Sep 02, 2007 4:36 am Post subject: |
|
|
It looks really handy and I've bookmarked it nihues but I don't have an amd64 atm. Nice one though, I'll recommend it to people on IRC. |
|
Back to top |
|
|
coldfinger n00b
Joined: 15 Jan 2004 Posts: 44
|
Posted: Wed Sep 05, 2007 10:15 am Post subject: |
|
|
will test and report back... |
|
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
|
|