fglrx has some issues regarding video ram detection that seems to be triggered by half ass support in fglrx itself.
So after hours of googling and experimentation, I figured out how to control the amount of video ram fglrx can use.
Lets cut to the chase, here's my Radeon 9600 XT 256mb agp 8x card entries:
As you can see, I have 256mb of memory for both cards. However, fglrx decides to be a total bitch and gives me 128mb to play with:
Neat.
The first time I saw this output in xorg I practically bled anger into little cups of ice, especially after the anticipated performance boost from the releases after 8.41
So, fglrx uses a standard interface (wow!) for applications and drivers to get information of allocated memory. "Memory Type Range Registers (MTRRs) are control registers that are used as a control mechanism which provides system software with control of how accesses to memory ranges by the CPU are cached. It uses a set of programmable model-specific registers (MSRs) which are special registers provided by most modern CPUs." (http://en.wikipedia.org/wiki/Mtrr)
Linux stores this information in /proc/mtrr
Heres my output before messing with it:
Here my agp aperture has allocated 128mb (which is set in the bios) for something at 0xe0000000. Great, lets add our own entry for my radeon card
If you double check the lspci -vv output of my radeon card, the first card begins storing memory at 0xc0000000, so we'll use that information.
You can add new entries to /proc/mtrr using echo commands from bash. For instance, to add 256mb at 0xc0000000 I would use this:
Although I am not an expert, it's quite obvious that write-combining should be used as the type of entry in /proc/mtrr
So here's the new output:
If you did this right, applications that seemed to chug will gain a dramatic speed boost, especialy on videoram intensive games (enemy territory quake wars)
Note: I know this is an uncommon issue, but I thought I should shed some light on how to do this for some people lost in the dark and completely pissed off at ati/amd.
So after hours of googling and experimentation, I figured out how to control the amount of video ram fglrx can use.
Lets cut to the chase, here's my Radeon 9600 XT 256mb agp 8x card entries:
Code:
02:00.0 VGA compatible controller: ATI Technologies Inc RV350 AR [Radeon 9600] (prog-if 00 [VGA controller]) Subsystem: PC Partner Limited Unknown device 0020 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 255 (2000ns min), Cache Line Size: 32 bytes Interrupt: pin A routed to IRQ 19 Region 0: Memory at c0000000 (32-bit, prefetchable) [size=256M] Region 1: I/O ports at d000 [size=256] Region 2: Memory at e9000000 (32-bit, non-prefetchable) [size=64K] [virtual] Expansion ROM at e8000000 [disabled] [size=128K] Capabilities: [58] AGP version 3.0 Status: RQ=256 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW+ AGP3+ Rate=x4,x8 Command: RQ=32 ArqSz=2 Cal=0 SBA+ AGP+ GART64- 64bit- FW- Rate=x8 Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- 02:00.1 Display controller: ATI Technologies Inc RV350 AR [Radeon 9600] (Secondary) Subsystem: PC Partner Limited Unknown device 0021 Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Region 0: Memory at d0000000 (32-bit, prefetchable) [disabled] [size=256M] Region 1: Memory at e9010000 (32-bit, non-prefetchable) [disabled] [size=64K] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME-
As you can see, I have 256mb of memory for both cards. However, fglrx decides to be a total bitch and gives me 128mb to play with:
Code:
(II) Module fglrxdrm: vendor="FireGL - ATI Technologies Inc." compiled for 7.1.0, module version = 8.43.2 ABI class: X.Org Server Extension, version 0.3 (--) fglrx(0): VideoRAM: 131072 kByte, Type: DDR SGRAM / SDRAM (II) fglrx(0): AGP card detected (WW) fglrx(0): board is an unknown third party board, chipset is supported
Neat.
The first time I saw this output in xorg I practically bled anger into little cups of ice, especially after the anticipated performance boost from the releases after 8.41
So, fglrx uses a standard interface (wow!) for applications and drivers to get information of allocated memory. "Memory Type Range Registers (MTRRs) are control registers that are used as a control mechanism which provides system software with control of how accesses to memory ranges by the CPU are cached. It uses a set of programmable model-specific registers (MSRs) which are special registers provided by most modern CPUs." (http://en.wikipedia.org/wiki/Mtrr)
Linux stores this information in /proc/mtrr
Heres my output before messing with it:
Code:
root@damentz-box:/home/damentz# cat /proc/mtrr reg00: base=0x00000000 ( 0MB), size=1024MB: write-back, count=1 reg01: base=0xe0000000 (3584MB), size= 128MB: write-combining, count=1
Here my agp aperture has allocated 128mb (which is set in the bios) for something at 0xe0000000. Great, lets add our own entry for my radeon card
If you double check the lspci -vv output of my radeon card, the first card begins storing memory at 0xc0000000, so we'll use that information.
You can add new entries to /proc/mtrr using echo commands from bash. For instance, to add 256mb at 0xc0000000 I would use this:
Code:
echo "base=0xc0000000 size=0x10000000 type=write-combining" >| /proc/mtrr
Although I am not an expert, it's quite obvious that write-combining should be used as the type of entry in /proc/mtrr
So here's the new output:
Code:
root@damentz-box:/home/damentz# cat /proc/mtrr reg00: base=0x00000000 ( 0MB), size=1024MB: write-back, count=1 reg01: base=0xe0000000 (3584MB), size= 128MB: write-combining, count=1 reg02: base=0xc0000000 (3072MB), size= 256MB: write-combining, count=1
If you did this right, applications that seemed to chug will gain a dramatic speed boost, especialy on videoram intensive games (enemy territory quake wars)
Note: I know this is an uncommon issue, but I thought I should shed some light on how to do this for some people lost in the dark and completely pissed off at ati/amd.
Comment