Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to get DRM working with ATI Radeon Mobility on laptop
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
coderpourmanger
n00b
n00b


Joined: 13 May 2004
Posts: 39
Location: Washington, DC

PostPosted: Sun Oct 17, 2004 6:25 pm    Post subject: Unable to get DRM working with ATI Radeon Mobility on laptop Reply with quote

Wedge_'s posts had given me hope

My video card info is supposed to be an ATI IGP 340M Mobility Radeon, but I have only gotten X to work with vesa drivers
Code:

# lspci -vv
0000:01:05.0 VGA compatible controller: ATI Technologies Inc: Unknown device 4337 (prog-if 00 [VGA])
        Subsystem: Hewlett-Packard Company: Unknown device 0850
        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: 66 (2000ns min), cache line size 08
        Interrupt: pin A routed to IRQ 10
        Region 0: Memory at d8000000 (32-bit, prefetchable) [size=128M]
        Region 1: I/O ports at 9000 [size=256]
        Region 2: Memory at d0300000 (32-bit, non-prefetchable) [size=64K]
        Expansion ROM at <unassigned> [disabled] [size=128K]
        Capabilities: [58] AGP version 2.0
                Status: RQ=48 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW- AGP3- Rate=x1,x2,x4
                Command: RQ=1 ArqSz=0 Cal=0 SBA+ AGP- GART64- 64bit- FW- Rate=<none>
        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-

Here are selections from .config
Code:

CONFIG_AGP=y
# CONFIG_AGP_INTEL is not set
# CONFIG_AGP_I810 is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD_K8 is not set
CONFIG_AGP_SIS=y
CONFIG_AGP_ALI=y
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_NVIDIA is not set
CONFIG_AGP_ATI=y

#
# Frame-buffer support
#
CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
# CONFIG_FB_LOGO_TUX is not set
# CONFIG_FB_LOGO_LARRY is not set
# CONFIG_FB_LOGO_GENTOO is not set
# CONFIG_FB_LOGO_G is not set
CONFIG_FB_LOGO_PENGUIN=y
# CONFIG_FB_LOGO_POWEREDBY is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_CLGEN is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CYBER2000 is not set
CONFIG_FB_VESA=y
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_HGA is not set
CONFIG_VIDEO_SELECT=y
# CONFIG_FB_MATROX is not set
# CONFIG_FB_ATY is not set
CONFIG_FB_RADEON=m


I ran
Code:
opengl-update xfree
emerge ati-drivers
opengl-update ati
fglrxconfig

In fglrxconfig, I chose defaults except for some settings I knew worked from previous configs (vert sync, horz sync, mouse).
startx failed.
Code:

# dmesg
[fglrx] Maximum main memory to use for locked dma buffers: 372 MBytes.
[fglrx:firegl_init] *ERROR* Device not found!
#cat XFree86.0.log
(II) FireGL8700/8800: Driver for chipset: ATI RV250 Id (R9000),
   ATI RV250 Ie (R9000), ATI RV250 If (R9000), ATI RV250 Ig (R9000),
   ATI RV250 Ld (M9), ATI RV250 Le (M9), ATI RV250 Lf (M9),
   ATI RV250 Lg (M9), ATI RV280 5960 (R9200 PRO),
   ATI RV280 Ya (R9200LE), ATI RV250SE Yd (R9200SE),
   ATI RV250 5C61 (M9+), ATI RV250 5C63 (M9+), ATI R200 QH (R8500),
   ATI R200 QL (R8500), ATI R200 QM (R9100), ATI R200 QT (R8500),
   ATI R200 QU (R9100), ATI R200 BB (R8500), ATI RV350 AP (R9600),
   ATI RV350SE AQ (R9600SE), ATI RV350 AR (R9600 PRO),
   ATI RV350 NP (M10), ATI R300 AD (R9500), ATI R300 AE (R9500),
   ATI R300 AF (R9500), ATI R300 AG (Fire GL Z1/X1),
   ATI R300 ND (R9700 PRO), ATI R300 NE (R9700/R9500 PRO),
   ATI R300 NF (R9600 TX), ATI R300 NG (Fire GL X1),
   ATI R350SE AH (R9800SE), ATI R350 AK (Fire GL unknown),
   ATI RV350 AT (Fire GL T2), ATI RV350 AU (Fire GL T2),
   ATI RV350 AV (Fire GL T2), ATI RV350 AW (Fire GL T2),
   ATI R350 NH (R9800), ATI R350LE NI (R9800LE), ATI R350 NJ (R9800),
   ATI R350 NK (Fire GL X2), ATI RV350 NT (WS/M10)
(II) Primary Device is: PCI 01:05:0
(EE) No devices detected.

Fatal server error:
no screens found

# modprobe fglrx
Warning: loading /lib/modules/2.4.26-gentoo-r9/video/fglrx.o will taint the kernel: non-GPL license - Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY
  See http://www.tux.org/lkml/#export-tainted for information about tainted modules
/lib/modules/2.4.26-gentoo-r9/video/fglrx.o: init_module: No such device
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
      You may find more information in syslog or the output from dmesg
/lib/modules/2.4.26-gentoo-r9/video/fglrx.o: insmod /lib/modules/2.4.26-gentoo-r9/video/fglrx.o failed
/lib/modules/2.4.26-gentoo-r9/video/fglrx.o: insmod fglrx failed
Back to top
View user's profile Send private message
coderpourmanger
n00b
n00b


Joined: 13 May 2004
Posts: 39
Location: Washington, DC

PostPosted: Thu Oct 28, 2004 1:52 pm    Post subject: Help! Radeon driver does not work either Reply with quote

I am using Kernel 2.4.26-r9 with XFree86 4.3.0-r6.

What else should I look at? Following these instructions didn't work, from No 3D acceleration in Radeon IGP 330M/340M/350M

    1. VIDEO_CARDS="radeon" in /etc/make.conf
    2. AGP in kernel as module
    Code:
    Character Devices
             <M> /dev/agpgart (AGP Support)
             [ ]   Intel 440LX/BX/GX and I815/I820/I830M/I830MP/I840/I845/I850/I86
             [ ]   Intel I810/I815/I830M (on-board) support
             [*]   VIA chipset support
             [ ]   AMD Irongate, 761, and 762 support
             [ ]   AMD Opteron/Athlon64 on-CPU GART support
             [*]   Generic SiS support
             [*]   ALI chipset support
             [ ]   Serverworks LE/HE support
             [ ]   NVIDIA chipset support
             [*]   ATI IGP chipset support

    3. ATI Radeon DRI as module in kernel
    Code:
    Character Devices
             Direct Rendering Manager (XFree86 DRI Support)
                [*] Direct Rendering Manager (XFree86 DRI support)
                <M>   ATI Radeon (NEW)

    4. Updated XF86Config (extract)
    Code:
    Section "Module"
       Load  "extmod"
       Load  "dri"
       Load  "radeon"
       Load  "gl"
       Load  "dbe"
       Load  "record"
       Load  "xtrap"
       Load  "glx"
       Load  "speedo"
       Load  "type1"
        Load "freetype"
    EndSection
    ...
    #   Driver      "vesa"
       Driver      "radeon"

Results: Color depth dropped to 8 bits; glxgears still only about 300fps. I changed back to using the vesa driver. What else should I do? Do I need to rebuild XFree86 with the changed VIDEO_CARDS variable?

From direct rendering or fglrx with ATI radeon mobility?, here is my lspci output:
Code:
# lspci -n | grep 1002
0000:00:00.0 Class 0600: 1002:cbb2 (rev 02)
0000:00:01.0 Class 0604: 1002:7010
0000:01:05.0 Class 0300: 1002:4337
Back to top
View user's profile Send private message
cwt137
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jul 2003
Posts: 99
Location: Southern California

PostPosted: Thu Nov 04, 2004 11:44 pm    Post subject: Reply with quote

I have a compaq presario 2195us with the radeon mobility 320m (same thing, just for athlons). Emerging the opengl and the ati stuff could mess things up. You were right in enabling the 3d, dri,drm, ati stuff in the kernel. here are the next steps to get your card working properly:

1. make sure you get xfree86 or x.org working properly with the 2d drivers.

2. go to http://www.freedesktop.org/~dri/snapshots/ and downlod the radeon daily snapshot.

3. install the snapshot (should be an install script inside) and restart your computer.

I'm not sure if this will work on xfree 4.3. I just tested it on post 4.3 builds and x.org.

I hope this helps.
Back to top
View user's profile Send private message
coderpourmanger
n00b
n00b


Joined: 13 May 2004
Posts: 39
Location: Washington, DC

PostPosted: Sat Nov 06, 2004 1:18 pm    Post subject: AGP is hosing things up Reply with quote

I have switched from XFree86 to Xorg6.8.0-r1. The radeon driver works in 24-bit color mode, but still no hardware acceleration.

Here is my output. Let me know if you need to see anything else.
Code:
$ grep -e '(EE)' -e '(WW)' /var/log/Xorg.0.log
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(WW) Open APM failed (/dev/apm_bios) (No such file or directory)
(WW) RADEON(0): LCD DDC Info Table found!
(WW) RADEON(0): Failed to detect secondary monitor, MergedFB/Clone mode disabled
(WW) RADEON(0): [agp] AGP not available
(EE) RADEON(0): [agp] AGP failed to initialize. Disabling the DRI.
(WW) Warning, couldn't open module theatre
(EE) RADEON: Failed to load module "theatre" (module does not exist, 0)
(EE) RADEON(0): Unable to load Rage Theatre module
(WW) RADEON(0): Option "UseInternalAGPGART" is not used
(WW) RADEON(0): Option "KernelModuleParm" is not used

Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 380M
agpgart: Unsupported ATI chipset (device id: cbb2), you might want to try agp_try_unsupported=1.
agpgart: no supported devices found.

# modprobe agpgart
/lib/modules/2.4.26-gentoo-r9/kernel/drivers/char/agp/agpgart.o: init_module: No such device
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
      You may find more information in syslog or the output from dmesg
/lib/modules/2.4.26-gentoo-r9/kernel/drivers/char/agp/agpgart.o: insmod /lib/modules/2.4.26-gentoo-r9/kernel/drivers/char/agp/agpgart.o failed
/lib/modules/2.4.26-gentoo-r9/kernel/drivers/char/agp/agpgart.o: insmod agpgartfailed

# ls -l /dev/dri/card0
crw-rw-rw-  1 root root 226, 0 Nov  6 07:36 /dev/dri/card0
bash-2.05b# ls -ld /dev/dri
drwxr-xr-x  1 root root 0 Nov  6 07:36 /dev/dri


I added some lines to xorg.conf for agp_try_unsupported, but they don't seem to do anything. Maybe I should take AGP out of the kernel (it is currently a module)?
Code:
   Option "UseInternalAGPGART" "yes"
   Option "KernelModuleParm" "agp_try_unsupported=1"
Back to top
View user's profile Send private message
coderpourmanger
n00b
n00b


Joined: 13 May 2004
Posts: 39
Location: Washington, DC

PostPosted: Mon Nov 08, 2004 11:28 am    Post subject: AGP is working but still no rendering Reply with quote

Web search found some references about PCI Device CBB2 and AGPgart


It appears that PCI ID 0xCBB2 needs to be added to the agp driver. WARNING: N00b hacking his own kernel. Imitate at your own risk!!! Here's what I did (I am using kernel 2.4.26-gentoo-r9):
Code:

bash-2.05b# diff -u agp.h /usr/src/linux/drivers/char/agp/agp.h
--- agp.h       2004-11-07 11:12:42.000000000 -0500
+++ /usr/src/linux/drivers/char/agp/agp.h       2004-11-07 18:42:56.000000000 -0500
@@ -319,6 +319,9 @@
 #ifndef PCI_DEVICE_ID_ATI_RS250
 #define PCI_DEVICE_ID_ATI_RS250                0xcab3
 #endif
+#ifndef PCI_DEVICE_ID_ATI_RS200_MP
+#define PCI_DEVICE_ID_ATI_RS200_MP     0xcbb2
+#endif
 #ifndef PCI_DEVICE_ID_ATI_RS200_B
 #define PCI_DEVICE_ID_ATI_RS200_B      0xcbb3
 #endif
bash-2.05b# diff -u agpgart_be.c /usr/src/linux/drivers/char/agp/agpgart_be.c
--- agpgart_be.c        2004-11-07 11:13:01.000000000 -0500
+++ /usr/src/linux/drivers/char/agp/agpgart_be.c        2004-11-07 21:12:00.000000000 -0500
@@ -5739,6 +5739,7 @@
        if ((agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS100) ||
            (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS200) ||
            (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS200_B) ||
+           (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS200_MP) ||
            (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS250)) {
                pci_read_config_dword(agp_bridge.dev, ATI_RS100_APSIZE, &temp);
                temp = (((temp & ~(0x0000000e)) | current_size->size_value)
@@ -5793,6 +5794,7 @@
        if ((agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS100) ||
            (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS200) ||
            (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS200_B) ||
+           (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS200_MP) ||
            (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS250)) {
                pci_read_config_dword(agp_bridge.dev, ATI_RS100_APSIZE, &temp);
        } else {
@@ -5826,6 +5828,7 @@
        if ((agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS100) ||
            (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS200) ||
            (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS200_B) ||
+           (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS200_MP) ||
            (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS250)) {
                pci_write_config_dword(agp_bridge.dev, ATI_RS100_IG_AGPMODE, 0x20000);
        } else {
@@ -5864,6 +5867,7 @@
        if ((agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS100) ||
            (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS200) ||
            (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS200_B) ||
+           (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS200_MP) ||
            (agp_bridge.dev->device == PCI_DEVICE_ID_ATI_RS250)) {
                pci_read_config_dword(agp_bridge.dev, ATI_RS100_APSIZE, &temp);
                temp = ((temp & ~(0x0000000f)) | previous_size->size_value);
@@ -6426,6 +6430,12 @@
          "ATI",
          "IGP330/340/345/350/M",
          ati_generic_setup },
+       { PCI_DEVICE_ID_ATI_RS200_MP,
+         PCI_VENDOR_ID_ATI,
+         ATI_RS200,
+         "ATI",
+         "IGP330/340/345/350/M",
+         ati_generic_setup },
        { PCI_DEVICE_ID_ATI_RS200_B,
          PCI_VENDOR_ID_ATI,
          ATI_RS200,
bash-2.05b# diff -u pci_ids.h /usr/src/linux/include/linux/pci_ids.h
--- pci_ids.h   2004-11-07 11:14:27.000000000 -0500
+++ /usr/src/linux/include/linux/pci_ids.h      2004-11-07 18:43:58.000000000 -0500
@@ -317,6 +317,8 @@
 #define PCI_DEVICE_ID_ATI_RADEON_Lg    0x4c67
 /* RadeonIGP */
 #define PCI_DEVICE_ID_ATI_RADEON_IGP   0xCAB0
+#define PCI_DEVICE_ID_ATI_RS200_MP     0xCBB2
+#define PCI_DEVICE_ID_ATI_RADEON_IGP345M       0x4337
 /* ATI IXP Chipset */
 #define PCI_DEVICE_ID_ATI_IXP_IDE      0x4349


Here are the results:
Code:
bash-2.05b$ glxinfo | grep render
direct rendering: No
OpenGL renderer string: Mesa X11
bash-2.05b# dmesg | grep agp
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 380M
agpgart: Detected ATI IGP330/340/345/350/M chipset
agpgart: AGP aperture is 64M @ 0xd4000000
bash-2.05b# grep -e '(EE)' -e '(WW)' /var/log/Xorg.0.log
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(WW) Open APM failed (/dev/apm_bios) (No such file or directory)
(WW) RADEON(0): LCD DDC Info Table found!
(WW) RADEON(0): Failed to detect secondary monitor, MergedFB/Clone mode disabled
(WW) Warning, couldn't open module theatre
(EE) RADEON: Failed to load module "theatre" (module does not exist, 0)
(EE) RADEON(0): Unable to load Rage Theatre module
(WW) RADEON(0): Option "UseInternalAGPGART" is not used
(WW) RADEON(0): Option "KernelModuleParm" is not used
(WW) RADEON(0): Option "ForcePCIMode" is not used


What is up with the theatre module? I am using the radeon snapshot from freedesktop.org as cwt137 suggested. We are making progress here, can someone get me over the finish line????
Back to top
View user's profile Send private message
coderpourmanger
n00b
n00b


Joined: 13 May 2004
Posts: 39
Location: Washington, DC

PostPosted: Sat Nov 13, 2004 1:29 am    Post subject: So close and yet so far Reply with quote

I am getting no errors but I am also getting no DRI or 3D acceleration. This is a good time for those helpful voices of experience to step up and pitch in. Here is what I have done recently:
    1. From freedesktop.org, I have downloaded and installed these files. The last one did not have an install script, so I manually copied the files to appropriate directories under /usr/X11R6/lib/modules.
      common-20041105-linux.i386.tar.bz2
      radeon-20041105-linux.i386.tar.bz2
      Xorg-modules.tar.bz2 (contains theatre module mentioned above)

    2. In /etc/X11/xorg.conf, changed default color depth from 24 to 16 and restarted.

Here are the results
Code:
bash-2.05b$ glxinfo | grep render
direct rendering: No
OpenGL renderer string: Mesa GLX Indirect
bash-2.05b$ dmesg | grep agp
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 380M
agpgart: Detected ATI IGP330/340/345/350/M chipset
agpgart: AGP aperture is 64M @ 0xd4000000
bash-2.05b$ grep -e '(EE)' -e '(WW)' /var/log/Xorg.0.log
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(WW) Open APM failed (/dev/apm_bios) (No such file or directory)
(WW) RADEON(0): LCD DDC Info Table found!
(WW) RADEON(0): Failed to detect secondary monitor, MergedFB/Clone mode disabled
(WW) RADEON(0): Option "UseInternalAGPGART" is not used
(WW) RADEON(0): Option "KernelModuleParm" is not used
(WW) RADEON(0): Option "ForcePCIMode" is not used
bash-2.05b$ lsmod | grep agp
agpgart                24756   3 (autoclean)
Back to top
View user's profile Send private message
cwt137
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jul 2003
Posts: 99
Location: Southern California

PostPosted: Sat Nov 13, 2004 5:19 am    Post subject: Reply with quote

im going to re-install gentoo on my laptop sometime this next week and I'll document all my steps on how i got it to work and report back!

ok?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
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