Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOW-TO] Get ATI support in X with 2.6.x kernel
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5, 6, 7  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Thu Nov 13, 2003 2:09 pm    Post subject: [HOW-TO] Get ATI support in X with 2.6.x kernel Reply with quote

[HOW-TO] Get ATI support in X with 2.6.x kernel
I've just reinstalled gentoo on my laptop, and went with the latest 2.6 test kernel. I'm basing this HOW-TO on the following hardware, so be prepared to change some of the settings to fit your hardware/needs.

    Laptop - hp nx7000 DG706A
  • Intel Pentium-M 1.6GHz
  • 15,4" WSXGA LCD - 1680x1050 Widescreen
  • ATI Radeon Mobility 9200 64MB RAM
  • 1024MB DDR RAM
  • 60GB ATA-100 5400rpm harddisk
  • Realtek 8139c
  • Intel WLAN (not supported)
  • DVD+RW
Enough with the background hardware and info..

    Table of contents
  1. Kernel setup
  2. ATI drivers
  3. XFree86 configuration
    1. fglrxconfig
    2. My XFree86 configuration

1. Kernel setup
You have probably already a kernel configured, compiled and up and running. The question is if you have configured it right in regards to X, AGP, DRM/DRI and ATI.

Lets configure the kernel with the related settings:
Code:
cd /usr/src/linux
make menuconfig
Navigate into the following location:
Code:
Device Drivers  --->
  Character devices  --->
Make sure these settings are selected:
Code:
<M> Enhanced Real Time Clock Support
...
<M> /dev/agpgart (AGP Support)
     < >   ALI chipset support
     < >   ATI chipset support
     < >   AMD Irongate, 761, and 762 chipset support
     < >   AMD Opteron/Athlon64 on-CPU GART support
     <M>   Intel 440LX/BX/GX, I8xx and E7x05 chipset support
     < >   NVIDIA nForce/nForce2 chipset support
     < >   SiS chipset support
     < >   Serverworks LE/HE chipset support
     < >   VIA chipset support
[*] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
     < >   3dfx Banshee/Voodoo3+
     < >   3dlabs GMX 2000
     < >   ATI Rage 128
     < >   ATI Radeon
     < >   Intel I810
     < >   Intel 830M, 845G, 852GM, 855GM, 865G
     < >   Matrox g200/g400
     < >   SiS video cards
NB! You should ofcoure choose agp port (in my case 'Intel 440LX/BX/GX, I8xx and E7x05 chipset support') driver that suits your chipset (northbridge)
NB!! I've chosen to compile with modules. You can of course also compile them into the kernel. Then you should skip next step (adding the modules to the autoload config file
NB!!! Wedge_ said in this forumpost that you do not need Radeon DRI support in the kernel. At this point I got it as you can see, and I have no problem with it, but I'm experimenting with it now, removing kernel DRM support that is, and will get back on this issue later on.


If you did as me and compiled your support as modules, add the following to '/etc/modules.autoload.d/kernel-2.6':
Code:
rtc
agpgart
intel_agp
fglrx
NB! Put agpgart, intel_agp and fglrx at the bottom of your file.

Install your new kernel. Everyone has it's own ways of doing so, I do this:
Code:
cp /usr/src/linux/arch/i386/boot/bzImage /boot/mm-sources-beta9-mm2-Xct
where -Xct is my own revision of the kernel and ct is my initials

Update your grub or lilo config and reboot.

The rest should be like normal setup...
2. ATI drivers
Now that the kernel is right we emerge the ati-drivers:
Code:
emerge ati-drivers
opengl-update ati

3. XFree86 configuration
The last thing to do is to configure XFree86 to use your new ati driver (fglrx). You can use a number of ways lik 'XFree86 --configure', 'xf86config', fglrxconfig or do it by hand, either by examples (XF86config.example) or copy one a working one from the net (gentoo forums) and change/tweak it to fit your need. I'll focus on fglrx and my own XFree86 config file.

3a. fglrxconfig
ati-drivers comes with its own configuration script, called 'fglrxconfig'. With some simple yes and no questions you get a fully, but in need of some tweaks, working 'XFree86-4' config file.

Run fglrxconfig to configure XFree86:
Code:
/opt/ati/bin/fglrxconfig
NB!You should say NO when asked to UseInternalAGPGART, since we are using the kernel agpgart, which some say is less hassle.

3b. My XFree86 configuration
My XFree86 config file is almost identical to the one created with 'fglrxconfig', at least when it comes to vga driver settings. This config file should also work just fine with a 2.4.xx kernel.

Most of the changes are that I have a widescreen LCD display, so you probably want to change the "Monitor section" and also remove the 'TouchPad' section in "Core Pointer's InputDevice section". This also means fixing the "ServerLayout sections" to get mouse support in X.

Alright, here is my XFree86 config file (have removed most of the comments for spacesaving):
Code:
laptop root # cat /etc/X11/XF86Config

# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of
# this file.
# **********************************************************************

# **********************************************************************
# DRI Section
# **********************************************************************
Section "dri"
        Mode 0666
EndSection

# **********************************************************************
# Module section -- this  section  is used to specify
# which dynamically loadable modules to load.
# **********************************************************************
Section "Module"
# This loads the DBE extension module.
        Load            "dbe"   # Double buffer extension

        SubSection      "extmod"
#               Option  "omit xfree86-dga"
        EndSubSection

# This loads the Type1 and FreeType font modules
        Load            "type1"
        Load            "freetype"

# This loads the GLX module
        Load            "glx"   # libglx.a
        Load            "dri"   # libdri.a
EndSection

# **********************************************************************
# Files section.  This allows default font and rgb paths to be set
# **********************************************************************
Section "Files"
        RgbPath         "/usr/X11R6/lib/X11/rgb"
        FontPath        "unix/:-1"
EndSection

# **********************************************************************
# Server flags section.
# **********************************************************************
Section "ServerFlags"
        # This option allows the X server to start up even if the
        # mouse device can't be opened/initialized.
        AllowMouseOpenFail
EndSection

# **********************************************************************
# Input devices
# **********************************************************************

# **********************************************************************
# Core keyboard's InputDevice section
# **********************************************************************
Section "InputDevice"
        Identifier      "Keyboard1"
        Driver          "Keyboard"

        Option          "AutoRepeat"    "500 30"

        Option          "XkbRules"      "xfree86"
        Option          "XkbModel"      "pc105"
        Option          "XkbLayout"     "no"
        Option          "XkbOptions"    ""
        Option          "XkbCompat"     ""

EndSection


# **********************************************************************
# Core Pointer's InputDevice section
# **********************************************************************

Section "InputDevice"
# Identifier and driver
        Identifier      "TouchPad"
        Driver          "mouse"
        Option          "Protocol"      "PS/2"
        Option          "Device"        "/dev/misc/psaux"
        Option          "ZAxisMapping"  "6 7"
EndSection

Section "InputDevice"
        Identifier      "USBmouse"
        Driver          "mouse"
        Option          "Protocol"      "IMPS/2"
        Option          "Device"        "/dev/input/mice"
        Option          "ZAxisMapping"  "4 5"
EndSection

# **********************************************************************
# Monitor section
# **********************************************************************
# Any number of monitor sections may be present

Section "Monitor"
        Identifier  "Monitor0"
        HorizSync   31.5 - 48.5
        VertRefresh 40 - 70
        Option "DPMS"
EndSection

Section "Monitor"
        Identifier      "LCD-WXSGA"
        ModelName       "Flat Panel"
        VendorName      "hp"
#       Option          "DPMS"
        HorizSync       31.5 - 48.5
        VertRefresh     40-70
EndSection

Section "Monitor"
        Identifier      "CRT-21@Work"
        ModelName       "G550"
        VendorName      "Sony"
        Option          "DPMS"
        #       HorizSync       ""
        #       VertRefresh     ""
EndSection

Section "Monitor"
        Identifier      "CRT-19@Home"
        ModelName       "96P"
        VendorName      "Samtron"
        HorizSync       30-96
        VertRefresh     50-160
        Option          "DPMS"
EndSection


# **********************************************************************
# Graphics device section
# **********************************************************************
# Any number of graphics device sections may be present
# Standard VGA Device:
Section "Device"
        Identifier      "Standard VGA"
        VendorName      "Unknown"
        BoardName       "Unknown"
        Driver          "vga"
EndSection


# === ATI device section ===

Section "Device"
        Identifier      "vga0"
        VendorName      "ATI"
        BoardName       "ATI Mobility Radeon 9200"
        Driver          "fglrx"
# === Own Settings (CTh) ===
#       VideoRam        65536
        Option          "AGPMode"               "4"
        Option          "AGPFastWrite"          "True"
        Option          "EnablePageFlip"        "True"
# === disable PnP Monitor  ===
#       Option          "NoDDC"
# === disable/enable XAA/DRI ===
        Option          "no_accel"      "no"
        Option          "no_dri"        "no"
# === FireGL DDX driver module specific settings ===
# === Screen Management ===
        Option          "DesktopSetup"          "0x00000100"
        Option          "MonitorLayout"         "AUTO, NONE"
        Option          "IgnoreEDID"            "off"
        Option          "HSync2"                "unspecified"
        Option          "VRefresh2"             "unspecified"
        Option          "ScreenOverlap"         "0"
# === TV-out Management ===
        Option          "NoTV"                  "yes"   # "no" to turn on TV out
        Option          "TVStandard"            "PAL-B"
        Option          "TVHSizeAdj"            "0"
        Option          "TVVSizeAdj"            "0"
        Option          "TVHPosAdj"             "0"
        Option          "TVVPosAdj"             "0"
        Option          "TVHStartAdj"           "0"
        Option          "TVColorAdj"            "0"
        Option          "GammaCorrectionI"      "0x00000000"
        Option          "GammaCorrectionII"     "0x00000000"

# === OpenGL specific profiles/settings ===
        Option          "Capabilities"          "0x00000000"
# === Video Overlay for the Xv extension ===
        Option          "VideoOverlay"          "on"
# === OpenGL Overlay ===
# Note: When OpenGL Overlay is enabled, Video Overlay
#       will be disabled automatically
        Option          "OpenGLOverlay"         "off"
# === Center Mode (Laptops only) ===
        Option          "CenterMode"            "off"
# === Pseudo Color Visuals (8-bit visuals) ===
        Option          "PseudoColorVisuals"    "off"
# === QBS Support ===
        Option          "Stereo"                "off"
        Option          "StereoSyncEnable"      "1"
# === FSAA Management ===
        Option          "FSAAScale"             "1"
        Option          "FSAADisableGamma"      "no"
        Option          "FSAACustomizeMSPos"    "no"
        Option          "FSAAMSPosX0"           "0.000000"
        Option          "FSAAMSPosY0"           "0.000000"
        Option          "FSAAMSPosX1"           "0.000000"
        Option          "FSAAMSPosY1"           "0.000000"
        Option          "FSAAMSPosX2"           "0.000000"
        Option          "FSAAMSPosY2"           "0.000000"
        Option          "FSAAMSPosX3"           "0.000000"
        Option          "FSAAMSPosY3"           "0.000000"
        Option          "FSAAMSPosX4"           "0.000000"
        Option          "FSAAMSPosY4"           "0.000000"
        Option          "FSAAMSPosX5"           "0.000000"
        Option          "FSAAMSPosY5"           "0.000000"
# === Misc Options ===
        Option          "UseFastTLS"            "1"
        Option          "BlockSignalsOnLock"    "on"
        Option          "UseInternalAGPGART"    "no"
        Option          "ForceGenericCPU"       "no"
        BusID           "PCI:1:0:0"             # vendor=1002, device=4c66
        Screen 0
EndSection

# **********************************************************************
# Screen sections
# **********************************************************************
Section "Screen"
        Identifier      "Screen0"
        Device          "vga0"          # ATI Radeon Mobility 9200
        Monitor         "LCD-WXSGA"
        DefaultDepth    24
#       Option          "backingstore"
        Subsection      "Display"
                Depth           24
                Modes           "1680x1050" "1280x1024" "1024x768" "800x600" "640x480"
                ViewPort        0 0     # initial origin if mode is smaller than desktop
#               Virtual         1280 1024
        EndSubsection
EndSection

# **********************************************************************
# ServerLayout sections.
# **********************************************************************
Section "ServerLayout"
# The Identifier line must be present
        Identifier      "Server Layout"

        Screen          "Screen0"

        InputDevice     "TouchPad"      "CorePointer"
        InputDevice     "Keyboard1"     "CoreKeyboard"

EndSection

### EOF ###
NB! Please note that I make use of the X Font Server, so you should start xfs if you use <FontPath "unix/:-1">


With this settings I had X up and running with 1680x1050 resolution, giving me a score of just over 1800 in glxgears :)


Please comment or point out errors or give suggestions.

Changelog:
20031113 - Initial version
20031113#2 - Removed Radeon module in kernel setup - no need since I wasn't using it.


Last edited by Joffer on Sun Nov 16, 2003 4:45 pm; edited 3 times in total
Back to top
View user's profile Send private message
pascall
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2002
Posts: 101
Location: Montreal, Qc

PostPosted: Thu Nov 13, 2003 2:25 pm    Post subject: Reply with quote

Hey Joffer,

Very nice documentation indeed. Only point is I think you don t need to compile DRI support for Radeon. You got to enable the DRI support in kernel (* on the item Direct Rendering Manager...), but you don t need the ATI radeon module as fglrx is mostly the DRI<->kernel manager.

Otherwise, I was wondering if u did some benchmarks with the 2.4 kernel before upgrading to the 2.6-test, just to have some comparison.

Other than that, thanks for your work. Thanks to documentation well written on a lot of subject, gentoo is getting more and more popular.
Back to top
View user's profile Send private message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Thu Nov 13, 2003 2:32 pm    Post subject: Reply with quote

pascall wrote:
Very nice documentation indeed.
Thanks

pascall wrote:
Only point is I think you don t need to compile DRI support for Radeon. You got to enable the DRI support in kernel (* on the item Direct Rendering Manager...), but you don t need the ATI radeon module as fglrx is mostly the DRI<->kernel manager.
Yeah I know.. I did however make a note of what you said, the third 'NB' said, in small text font though:
joffer wrote:
NB!!! Wedge_ said in this forumpost that you do not need Radeon DRI support in the kernel. At this point I got it as you can see, and I have no problem with it, but I'm experimenting with it now, removing kernel DRM support that is, and will get back on this issue later on.
And as you probably saw, I didn't add it to the modules.autoload.d file either.. I should edit and remove the <M> :)

pascall wrote:
Otherwise, I was wondering if u did some benchmarks with the 2.4 kernel before upgrading to the 2.6-test, just to have some comparison.
I did run glxgears some weeks ago with a 2.4.22 kernel, and got more or less the same result, around 1850 i think.

Update: I think I misread you a bit.. since I had [*] on DRM, and you talked about DRI for Radeon..
Back to top
View user's profile Send private message
khel
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2003
Posts: 80

PostPosted: Wed Nov 19, 2003 5:01 pm    Post subject: Reply with quote

Thanks for a how-to, but it doesn't work for me (followed it word by word at first, then tried some different things and :-(

Anyway, I'm trying to setup ATI Mobility 7500 on Dell inspiron 8100

Heres a snip from dmesg
Quote:
fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.
[fglrx] Maximum main memory to use for locked dma buffers: 430 MBytes.
[fglrx:firegl_init] *ERROR* Device not found!


Any thoughts??

khel
_________________
If it's stupid but works, it isn't stupid.
Using Gentoo? Help the others!
Back to top
View user's profile Send private message
pascall
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2002
Posts: 101
Location: Montreal, Qc

PostPosted: Wed Nov 19, 2003 8:33 pm    Post subject: Reply with quote

Khel,

I think that the proprietary driver from ATI supports only Radeon 8500 and higher... If as the name seems to impley mobility 7500 is based on th radeon 7500, u won t be able to use the fglrx driver.

Sorry about this bad news.
Back to top
View user's profile Send private message
nosferat
n00b
n00b


Joined: 17 Oct 2003
Posts: 21
Location: Colden, NY USA

PostPosted: Fri Nov 21, 2003 8:14 pm    Post subject: slowdown Reply with quote

Well, I performed the installation exactly as you said, and the results were great in glxgears (~270-280 fps) but when i use any other GL program (ut, crystal space...) i get about 2 frames a second... Is there any way to tell what GL libraries they're using and why they're not getting the framerates that glxgears is getting?
_________________
stick a fork in it...
Back to top
View user's profile Send private message
nosferat
n00b
n00b


Joined: 17 Oct 2003
Posts: 21
Location: Colden, NY USA

PostPosted: Sun Nov 23, 2003 1:55 am    Post subject: Reply with quote

OK, i figured out why GL rendering is so damn slow... my agpgart module apparently can't be initialized. I am running the 2.6.0-test9-mm2 kernel with an SiS 746/963 chipset on an Athlon XP 2000+, using a Radeon 9600 Pro. I'm running XFree86 version 4.3.0, using a config file generated by fglrxconfig, and the kernel's agpgart module. (not the one from ATI) Here is the snip from dmesg pertaining to loading the fglrx module:


fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY' taints kernel.
[fglrx] Maximum main memory to use for locked dma buffers: 430 MBytes.
[fglrx] module loaded - fglrx 3.2.8 [Sep 21 2003] on minor 0
Debug: sleeping function called from invalid context at mm/slab.c:1868
in_atomic():1, irqs_disabled():0
Call Trace:
[<c012069b>] __might_sleep+0xab/0xd0
[<c0147315>] kmem_cache_alloc+0x65/0x70
[<e1b5b8db>] __ke_alloc_wait_queue_head_struct+0x1b/0x30 [fglrx]
[<e1b5e7c1>] firegl_setup_dev+0x91/0x1b0 [fglrx]
[<e1b5e83c>] firegl_setup_dev+0x10c/0x1b0 [fglrx]
[<e1b5dd54>] firegl_open+0x174/0x230 [fglrx]
[<e1b5dc92>] firegl_open+0xb2/0x230 [fglrx]
[<e1b5b6ce>] firegl_stub_open+0x9e/0xd0 [fglrx]
[<c0166484>] chrdev_open+0xf4/0x220
[<c01c3621>] devfs_open+0xe1/0xf0
[<c015b90a>] dentry_open+0x15a/0x280
[<c015b4be>] sys_chmod+0x5e/0xe0
[<c015b7a6>] filp_open+0x66/0x70
[<c015bca3>] sys_open+0x53/0x90
[<c03fffaf>] syscall_call+0x7/0xb

mtrr: 0xb0000000,0x8000000 overlaps existing 0xb0000000,0x1000000
[fglrx:firegl_addmap] *ERROR* mtrr allocation failed (-22)
[fglrx:firegl_unlock] *ERROR* Process 3536 using kernel context 0
mtrr: 0xb0000000,0x8000000 overlaps existing 0xb0000000,0x1000000
arq->state 4
Badness in as_put_request at drivers/block/as-iosched.c:1783
Call Trace:
[<c02b8130>] as_put_request+0x60/0xc0
[<c02aeebe>] elv_put_request+0x1e/0x20
[<c02b1495>] __blk_put_request+0x65/0xb0
[<c02b150f>] blk_put_request+0x2f/0x50
[<c02b55ef>] scsi_cmd_ioctl+0x1ef/0x540
[<c02dbb82>] ide_cdrom_check_media_change_real+0x32/0x50
[<c02f56ae>] media_changed+0x5e/0x90
[<c02f5715>] cdrom_media_changed+0x35/0x40
[<c016527e>] check_disk_change+0x2e/0x80
[<c02f4c32>] cdrom_open+0x72/0xd0
[<c02d4901>] generic_ide_ioctl+0x801/0x8c0
[<c0165776>] do_open+0x3f6/0x460
[<c0177519>] igrab+0x49/0x50
[<c0165882>] blkdev_open+0x32/0x80
[<c015b90a>] dentry_open+0x15a/0x280
[<c02dcb7e>] idecd_ioctl+0x2e/0x70
[<c02b3502>] blkdev_ioctl+0xa2/0x437
[<c016fb64>] sys_ioctl+0xf4/0x290
[<c03fffaf>] syscall_call+0x7/0xb


And here is a snip from my XFree86.0.log:


(WW) fglrx(0): Cannot read colourmap from VGA. Will restore with default
(II) fglrx(0): UMM area: 0xb0953000 (size=0x076ad000)
(II) fglrx(0): driver needs XFree86 version: 4.3.x
(II) fglrx(0): detected XFree86 version: 4.3.0
(II) Loading extension ATIFGLRXDRI
(II) fglrx(0): doing DRIScreenInit
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: Open failed
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: Open failed
[drm] failed to load kernel module "agpgart"
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 6, (OK)
drmGetBusid returned ''
(II) fglrx(0): [drm] loaded kernel module for "fglrx" driver
(II) fglrx(0): [drm] created "fglrx" driver at busid "PCI:1:0:0"
(II) fglrx(0): [drm] added 8192 byte SAREA at 0xe1b12000
(II) fglrx(0): [drm] mapped SAREA 0xe1b12000 to 0x401f8000
(II) fglrx(0): [drm] framebuffer handle = 0xb0000000
(II) fglrx(0): [drm] added 1 reserved context for kernel
(II) fglrx(0): DRIScreenInit done
(II) fglrx(0): Kernel Module Version Information:
(II) fglrx(0): Name: fglrx
(II) fglrx(0): Version: 3.2.8
(II) fglrx(0): Date: Sep 21 2003
(II) fglrx(0): Desc: ATI Fire GL DRM kernel module
(II) fglrx(0): Kernel Module version matches driver.
(II) fglrx(0): Kernel Module Build Time Information:
(II) fglrx(0): Build-Kernel UTS_RELEASE: 2.6.0-test9-mm2
(II) fglrx(0): Build-Kernel MODVERSIONS: no
(II) fglrx(0): Build-Kernel __SMP__: no
(II) fglrx(0): Build-Kernel PAGE_SIZE: 0x1000
(II) fglrx(0): [drm] register handle = 0xcfef0000
(EE) fglrx(0): [agp] unable to acquire AGP, error "xf86_ENODEV"
(EE) fglrx(0): cannot init AGP
(II) fglrx(0): [drm] removed 1 reserved context for kernel
(II) fglrx(0): [drm] unmapping 8192 bytes of SAREA 0xe1b12000 at 0x401f8000
(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): ********************************************* *
(II) fglrx(0): FBADPhys: 0xb0000000 FBMappedSize: 0x08000000
(WW) fglrx(0): Failed to set up write-combining range (0xb0000000,0x8000000)
(II) fglrx(0): FBMM initialized for area (0,0)-(1600,8191)
(II) fglrx(0): FBMM auto alloc for area (0,0)-(1600,1200) (front color buffer - assumption)
(==) fglrx(0): Backing store disabled
(==) fglrx(0): Silken mouse enabled
(II) fglrx(0): Using hardware cursor (scanline 1200)
(II) fglrx(0): Largest offscreen area available: 1600 x 6988
(**) Option "dpms"
(**) fglrx(0): DPMS enabled
(II) fglrx(0): Using XFree86 Acceleration Architecture (XAA)
Screen to screen bit blits
Solid filled rectangles
Solid Horizontal and Vertical Lines
Offscreen Pixmaps
Setting up tile and stipple cache:
32 128x128 slots
32 256x256 slots
16 512x512 slots
(II) fglrx(0): Acceleration enabled
(II) fglrx(0): Direct rendering disabled


I have also tried this with the agpgart driver in the fglrx module, but then starting XFree just gives me a blank screen and renders my computer unusable... Even the Three-Finger Salute won't make it do anything.

If it would help, I could attempt to get snippets from dmesg and XFree86.0.log when trying to use the ATI agpgart...

Any ideas/help would be greatly appreciated...
_________________
stick a fork in it...
Back to top
View user's profile Send private message
compuboy86
Tux's lil' helper
Tux's lil' helper


Joined: 03 Apr 2003
Posts: 79

PostPosted: Sun Nov 23, 2003 4:25 am    Post subject: Reply with quote

Ok, I have it working in 2.6 with an sis chipset as well.

Nosfeat- make sure that you compile support for the sis-agp chipset in the kernel. I have only been able to get the configuartion to work with both agpgart and sis-agp (the module name for an sis chipset) compiled as modules. As a result, you have to add both of those to modules.autoload. Hope this helps.

-Compuboy86
Back to top
View user's profile Send private message
Wedge_
Advocate
Advocate


Joined: 08 Aug 2002
Posts: 3614
Location: Scotland

PostPosted: Sun Nov 23, 2003 6:58 pm    Post subject: Reply with quote

The messages which appear in dmesg beginning with "might_sleep" are harmless AFAIK, so don't worry about them.
_________________
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
View user's profile Send private message
s3ntient
Guru
Guru


Joined: 13 Apr 2003
Posts: 304
Location: Lyon, France

PostPosted: Sun Nov 23, 2003 8:28 pm    Post subject: Reply with quote

Have you got :
- processor type and features - MTRR Support enabled in your kernel?

I think I read somwhere that it needed to be enabled for Radeons and it seems your trouble is with MTRR:

Quote:
mtrr: 0xb0000000,0x8000000 overlaps existing 0xb0000000,0x1000000
[fglrx:firegl_addmap] *ERROR* mtrr allocation failed (-22)
[fglrx:firegl_unlock] *ERROR* Process 3536 using kernel context 0
mtrr: 0xb0000000,0x8000000 overlaps existing 0xb0000000,0x1000000

_________________
http://blog.chaostrophy.org
Back to top
View user's profile Send private message
nosferat
n00b
n00b


Joined: 17 Oct 2003
Posts: 21
Location: Colden, NY USA

PostPosted: Mon Nov 24, 2003 6:16 am    Post subject: Reply with quote

I have both agpgart and sis-agp compiled as modules and in my modules.autoload.d, and MTRR is enabled in the kernel...
_________________
stick a fork in it...
Back to top
View user's profile Send private message
nosferat
n00b
n00b


Joined: 17 Oct 2003
Posts: 21
Location: Colden, NY USA

PostPosted: Tue Nov 25, 2003 3:42 am    Post subject: Reply with quote

Would the Preemptible Kernel, APIC/IO-APIC, or BSD Process Accounting options at all effect this? I'm really just taking a stab in the dark here... I have all 3 of the above enabled, so just seeing if they are known to cause any problems like this...
_________________
stick a fork in it...
Back to top
View user's profile Send private message
nosferat
n00b
n00b


Joined: 17 Oct 2003
Posts: 21
Location: Colden, NY USA

PostPosted: Tue Nov 25, 2003 4:25 am    Post subject: Reply with quote

OK, I disabled Preemptible Kernel and APIC, but it didn't seem to help any... still the same problems as before. I managed to get the XFree86.0.log when using the fglrx driver's builtin agpgart module:


<snip>
(WW) fglrx(0): Cannot read colourmap from VGA. Will restore with default
(II) fglrx(0): UMM area: 0xb0953000 (size=0x076ad000)
(II) fglrx(0): driver needs XFree86 version: 4.3.x
(II) fglrx(0): detected XFree86 version: 4.3.0
(II) Loading extension ATIFGLRXDRI
(II) fglrx(0): doing DRIScreenInit
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: Open failed
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: Open failed
[drm] failed to load kernel module "agpgart"
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmGetBusid returned ''
(II) fglrx(0): [drm] loaded kernel module for "fglrx" driver
(II) fglrx(0): [drm] created "fglrx" driver at busid "PCI:1:0:0"
(II) fglrx(0): [drm] added 8192 byte SAREA at 0xe1ac0000
(II) fglrx(0): [drm] mapped SAREA 0xe1ac0000 to 0x401f8000
(II) fglrx(0): [drm] framebuffer handle = 0xb0000000
(II) fglrx(0): [drm] added 1 reserved context for kernel
(II) fglrx(0): DRIScreenInit done
(II) fglrx(0): Kernel Module Version Information:
(II) fglrx(0): Name: fglrx
(II) fglrx(0): Version: 3.2.8
(II) fglrx(0): Date: Sep 21 2003
(II) fglrx(0): Desc: ATI Fire GL DRM kernel module
(II) fglrx(0): Kernel Module version matches driver.
(II) fglrx(0): Kernel Module Build Time Information:
(II) fglrx(0): Build-Kernel UTS_RELEASE: 2.6.0-test9-mm2
(II) fglrx(0): Build-Kernel MODVERSIONS: no
(II) fglrx(0): Build-Kernel __SMP__: no
(II) fglrx(0): Build-Kernel PAGE_SIZE: 0x1000
(II) fglrx(0): [drm] register handle = 0xcfef0000
(II) fglrx(0): [agp] Mode=0x1f004e1b bridge: 0x1039/0x0746
(II) fglrx(0): [agp] AGP disable mask 0x00000000
(II) fglrx(0): [agp] enabling AGP with mode=0x1f004f1a
(EE) fglrx(0): [agp] Failed to set AGP mode!
(EE) fglrx(0): cannot init AGP
(II) fglrx(0): [drm] removed 1 reserved context for kernel
(II) fglrx(0): [drm] unmapping 8192 bytes of SAREA 0xe1ac0000 at 0x401f8000
(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): ********************************************* *
(II) fglrx(0): FBADPhys: 0xb0000000 FBMappedSize: 0x08000000


The problem is, after this the system freezes completely and not even the 3-finger salute works... I think it may be generating a kernel panic, but it's hard to tell since just before this it tries switching to graphics mode, so you can't see the system console output...

Any ideas?
_________________
stick a fork in it...
Back to top
View user's profile Send private message
Lews_Therin
l33t
l33t


Joined: 03 Oct 2003
Posts: 657
Location: Banned

PostPosted: Wed Nov 26, 2003 10:55 pm    Post subject: Reply with quote

I just got it working (2000 fps!), so I'll see if I can help you...use the options I have, and try to see if they work:

I have Preemptible Kernel and BSD process acounting built into my kernel, so they should be OK. Leave APIC, it doesn't seem to be causing errors.

In your /usr/src/linux-beta dir, type "make clean". This should clear out the modules, and I had to do it before my card would work. It won't remove your config file, though.

Device Drivers--->Character Devices--->
(*) /dev/agpgart (AGP Support) (I have everything built in, since I'm not sure of my chipset. Try it)
[*] Direct Rendering Manager
<M> ATI Radeon

Make sure you have the /dev filesystem enabled, in:
File Systems--->Pseudo filesystems--->/dev file system support

In /etc/modules.autoload.d/kernel-2.6, add "fglrx". That's the only one I have, and the only one needed if you've built in support for your chipset.

Emerge -u ati-drivers, to make sure nothing is wrong.

Move your new kernel to /boot/whatever, and restart...tell me if the above works.
Back to top
View user's profile Send private message
s3ntient
Guru
Guru


Joined: 13 Apr 2003
Posts: 304
Location: Lyon, France

PostPosted: Wed Nov 26, 2003 11:18 pm    Post subject: Reply with quote

Lews_Therin wrote:

Device Drivers--->Character Devices--->
(*) /dev/agpgart (AGP Support) (I have everything built in, since I'm not sure of my chipset. Try it)
[*] Direct Rendering Manager
<M> ATI Radeon


I may be wrong but if you enable the ATI RADEON DRM Built-in driver doesn't XFree use it automatically? I think you may be actually using the DRM driver and not the ATI Binary driver.

Quote:
Emerge -u ati-drivers, to make sure nothing is wrong.


You must alway emerge ati-drivers after compiling a kernel but you haven't recompiled the driver with that command, it will only update the package if an update is available. You must run:

Code:

# emerge ati-drivers
# opengl-update ati


You also seem to have forgotten the last command which leads me to believe you're not using the ATI driver seen as you did a make clean beforehand.

As root, type:
Code:
# lsmod

what is the output?
_________________
http://blog.chaostrophy.org
Back to top
View user's profile Send private message
d3c3it
l33t
l33t


Joined: 01 Mar 2003
Posts: 765
Location: Manchester, UK

PostPosted: Thu Nov 27, 2003 3:25 pm    Post subject: Reply with quote

Thanks for the guide but it still took me ages to get it to work after loads of unmerge/merge ati-drivers but i found in the end what i had to do was change the semilink of /usr/src/linux to my 2.6 kernel *which happens to be test5-mm* and then it compiled and i could insmod it fine. and then play ut2003 :)
_________________
Some people go to counselling,
others use linux
Back to top
View user's profile Send private message
s3ntient
Guru
Guru


Joined: 13 Apr 2003
Posts: 304
Location: Lyon, France

PostPosted: Thu Nov 27, 2003 8:52 pm    Post subject: Reply with quote

/usr/src/linux should always point to the kernel you are running especially when compiling kernel modules otherwise you'd just be compiling for a different kernel....
_________________
http://blog.chaostrophy.org
Back to top
View user's profile Send private message
d3c3it
l33t
l33t


Joined: 01 Mar 2003
Posts: 765
Location: Manchester, UK

PostPosted: Thu Nov 27, 2003 10:33 pm    Post subject: Reply with quote

doh ive always had beta kernels going to linux-beta

ill note that for the future thanks
_________________
Some people go to counselling,
others use linux
Back to top
View user's profile Send private message
nosferat
n00b
n00b


Joined: 17 Oct 2003
Posts: 21
Location: Colden, NY USA

PostPosted: Fri Nov 28, 2003 12:55 am    Post subject: Reply with quote

OK, i tried it with builtin agpgart and drm, and radeon compiled as a module... did make clean and then remade the kernel... Here's the tail end of dmesg:


<snip>
fglrx: version magic '2.6.0-test9-mm2 preempt K7 gcc-3.2' should be '2.6.0-test9-mm2 K7 gcc-3.2'
found reiserfs format "3.6" with standard journal
Reiserfs journal params: device hda6, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
reiserfs: checking transaction log (hda6) for (hda6)
Using r5 hash to sort names
NTFS volume version 3.1.
eth0: Media Link On 100mbps full-duplex
blk: queue dfc13e00, I/O limit 4095Mb (mask 0xffffffff)
hdd: CHECK for good STATUS
hdd: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
hdd: drive_cmd: error=0x04Aborted Command
fglrx: version magic '2.6.0-test9-mm2 preempt K7 gcc-3.2' should be '2.6.0-test9-mm2 K7 gcc-3.2'
mtrr: 0xb0000000,0x8000000 overlaps existing 0xb0000000,0x1000000


The first occurrence of fglrx above is when modules.autoload.d attempts to load it, the second is when XFree attempts to load it. Here is a snip from XFree86.0.log, when _not_ using the internal agpgart in the fglrx driver:


<snip about 4 pages of previous output from "fglrx">
(WW) fglrx(0): Cannot read colourmap from VGA. Will restore with default
(II) fglrx(0): UMM area: 0xb0953000 (size=0x076ad000)
(II) fglrx(0): driver needs XFree86 version: 4.3.x
(II) fglrx(0): detected XFree86 version: 4.3.0
(II) Loading extension ATIFGLRXDRI
(II) fglrx(0): doing DRIScreenInit
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: Open failed
drmOpenDevice: minor is 0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: open result is -1, (No such device)
drmOpenDevice: Open failed
[drm] failed to load kernel module "agpgart"
[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): ********************************************* *
(II) fglrx(0): FBADPhys: 0xb0000000 FBMappedSize: 0x08000000
(WW) fglrx(0): Failed to set up write-combining range (0xb0000000,0x8000000)
(II) fglrx(0): FBMM initialized for area (0,0)-(1600,8191)
(II) fglrx(0): FBMM auto alloc for area (0,0)-(1600,1200) (front color buffer - assumption)
(==) fglrx(0): Backing store disabled
(==) fglrx(0): Silken mouse enabled
(II) fglrx(0): Using hardware cursor (scanline 1200)
(II) fglrx(0): Largest offscreen area available: 1600 x 6988
(**) Option "dpms"
(**) fglrx(0): DPMS enabled
(II) fglrx(0): Using XFree86 Acceleration Architecture (XAA)
Screen to screen bit blits
Solid filled rectangles
Solid Horizontal and Vertical Lines
Offscreen Pixmaps
Setting up tile and stipple cache:
32 128x128 slots
32 256x256 slots
16 512x512 slots
(II) fglrx(0): Acceleration enabled
(II) fglrx(0): Direct rendering disabled
<snip>


Among the lines snipped off before this was the following segment, referring to me having a Sapphire ATI card:


<snip>
(II) Loading sub module "int10"
(II) LoadModule: "int10"
(II) Loading /usr/X11R6/lib/modules/linux/libint10.a
(II) Module int10: vendor="The XFree86 Project"
compiled for 4.3.0, module version = 1.0.0
ABI class: XFree86 Video Driver, version 0.6
(II) fglrx(0): initializing int10
(II) fglrx(0): Primary V_BIOS segment is: 0xc000
(--) fglrx(0): Chipset: "ATI RV350 AP (R9600)" (Chipset = 0x4150)
(--) fglrx(0): (PciSubVendor = 0x174b, PciSubDevice = 0x7c20)
(--) fglrx(0): board vendor info: third party grafics adapter - NOT original ATI
(--) fglrx(0): Linear framebuffer (phys) at 0xb0000000
(--) fglrx(0): MMIO registers at 0xcfef0000
(--) fglrx(0): ROM-BIOS at 0xcfec0000
(--) fglrx(0): ChipExtRevID = 0x00
(--) fglrx(0): ChipIntRevID = 0x04
(--) fglrx(0): VideoRAM: 131072 kByte (64-bit SDR SDRAM)
(WW) fglrx(0): board is an unknown third party board, chipset is supported
(II) Loading sub module "ddc"
(II) LoadModule: "ddc"
(II) Loading /usr/X11R6/lib/modules/libddc.a
(II) Module ddc: vendor="The XFree86 Project"
compiled for 4.3.0, module version = 1.0.0
ABI class: XFree86 Video Driver, version 0.6
<snip>


This was the only other warning for fglrx that was shown.

DRI is still not loading, and OpenGL still is running in software-emulated mode.

Any other ideas, or other things to look at?
_________________
stick a fork in it...
Back to top
View user's profile Send private message
Lews_Therin
l33t
l33t


Joined: 03 Oct 2003
Posts: 657
Location: Banned

PostPosted: Fri Nov 28, 2003 4:34 am    Post subject: Reply with quote

Well, asuming you have support for /dev/agpgart built into your kernel, it looks like it's having problems loading it for your chipset. Are you sure it's listed there?

Zyklon, the DRM and the Radeon DRI are seprate modules. I had the Radeon enabled as a module, just in case I needed it...it's called "radeon", not "fglrx"

The emerge -u ati-drivers was to ensure he had emerged them for the right symlink at /usr/src/linux

I didn't have to do an opengl-update. I don't know why. Lsmod shows fglx, and the fglxinfo in /opt/ati/bin shows I am using the ATI drivers. If it works, I'm not going to try to fix it.
Back to top
View user's profile Send private message
nosferat
n00b
n00b


Joined: 17 Oct 2003
Posts: 21
Location: Colden, NY USA

PostPosted: Fri Nov 28, 2003 5:11 am    Post subject: Reply with quote

The sis-agp module has the following in help:


This option gives you AGP support for the GLX component of XFree86 4.x on Silicon Integrated Systems [SiS] chipsets.

Note that 5591/5592 AGP chipsets are NOT supported.


My chipset is an SiS 746/963... it doesn't specifically state that mine is supported by this module, but it claims it's for all but the 5591/5592... Strange thing is, though, no AGP bridge shows up in lspci. Here is the _entire_ output of lspci:


00:00.0 Host bridge: Silicon Integrated Systems [SiS] 746 Host (rev 02)
00:01.0 PCI bridge: Silicon Integrated Systems [SiS] SG86C202
00:02.0 ISA bridge: Silicon Integrated Systems [SiS]: Unknown device 0963 (rev 25)
00:02.1 SMBus: Silicon Integrated Systems [SiS]: Unknown device 0016
00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE]
00:03.0 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f)
00:03.1 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f)
00:03.2 USB Controller: Silicon Integrated Systems [SiS] USB 2.0 Controller
00:04.0 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 10/100 Ethernet (rev 91)
00:0b.0 Communication controller: Lucent Microelectronics: Unknown device 048c (rev 02)
00:0c.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 08)
00:0c.1 Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 08)
01:00.0 VGA compatible controller: ATI Technologies Inc: Unknown device 4150
01:00.1 Display controller: ATI Technologies Inc: Unknown device 4170
_________________
stick a fork in it...
Back to top
View user's profile Send private message
s3ntient
Guru
Guru


Joined: 13 Apr 2003
Posts: 304
Location: Lyon, France

PostPosted: Fri Nov 28, 2003 8:02 am    Post subject: Reply with quote

Lews_Therin wrote:
Well, asuming you have support for /dev/agpgart built into your kernel, it looks like it's having problems loading it for your chipset. Are you sure it's listed there?

Zyklon, the DRM and the Radeon DRI are seprate modules. I had the Radeon enabled as a module, just in case I needed it...it's called "radeon", not "fglrx"

The emerge -u ati-drivers was to ensure he had emerged them for the right symlink at /usr/src/linux

I didn't have to do an opengl-update. I don't know why. Lsmod shows fglx, and the fglxinfo in /opt/ati/bin shows I am using the ATI drivers. If it works, I'm not going to try to fix it.


My mistake then :D
_________________
http://blog.chaostrophy.org
Back to top
View user's profile Send private message
Lews_Therin
l33t
l33t


Joined: 03 Oct 2003
Posts: 657
Location: Banned

PostPosted: Sun Nov 30, 2003 6:28 am    Post subject: Reply with quote

nosferat wrote:
Strange thing is, though, no AGP bridge shows up in lspci.

I don't have one either, just the "VGA compatible controller" listing. Silly question, after this troubleshooting, but /usr/src/linux IS pointing to the same place as /usr/src/linux-beta, right?
Back to top
View user's profile Send private message
nosferat
n00b
n00b


Joined: 17 Oct 2003
Posts: 21
Location: Colden, NY USA

PostPosted: Sun Nov 30, 2003 7:44 am    Post subject: Reply with quote

yes, my /usr/src/linux symlink is pointing to the right place... linux-2.6.0-test9-mm2
_________________
stick a fork in it...
Back to top
View user's profile Send private message
Dillinger
Apprentice
Apprentice


Joined: 27 Jul 2003
Posts: 226
Location: Huntington Beach, Ca

PostPosted: Sun Nov 30, 2003 9:10 am    Post subject: Reply with quote

Dear author,

I love you

Love, D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7  Next
Page 1 of 7

 
Jump to:  
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