Announcement

Collapse
No announcement yet.

Recommended xorg.conf setup for radeonhd on Mobility Radeon X1400

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    initrd probably doesn't know about custom .conf file in /etc/modprobe.d. Updating initrd (with command I provided) should solve this problem.
    In front of every dmesg line is the time when it was generated (in seconds since kernel boot-up). IMO more than 30 seconds means, that KMS wasn't enabled till X (radeon module is loaded on my system in 4 seconds).
    This kernel cmdline doesn't work for me now (it worked before), and it may be the case for you too. However, I appended "video=radeon:modeset=1" to my cmdline, which initrd interprets and modprobe's radeon module with correct arguments (modeset=1) before root is mounted, and that's ok for X.
    I think you should run update-initramfs first and see if it solves the problem. If not, try this cmdline argument.
    There is unfortunately another issue. Newest initramfs-tools doesn't enable FRAMEBUFFER (including drm modules, like radeon) by default. You must enable it explicitly, by pasting `FRAMEBUFFER=y' to /etc/initramfs-tools/initramfs.conf. It is the case for ubuntu for sure, I don't know if debian is also affected (try grepping /usr/share/initramfs-tools/hooks/framebuffer for "OPTION=FRAMEBUFFER").
    And don't forget about update-initramfs (as root) after every initrd-related change (like initramfs.conf change or new file in /etc/modprobe.d).

    Comment


    • #32
      Originally posted by Wielkie G View Post
      initrd probably doesn't know about custom .conf file in /etc/modprobe.d. Updating initrd (with command I provided) should solve this problem.
      In front of every dmesg line is the time when it was generated (in seconds since kernel boot-up). IMO more than 30 seconds means, that KMS wasn't enabled till X (radeon module is loaded on my system in 4 seconds).
      This kernel cmdline doesn't work for me now (it worked before), and it may be the case for you too. However, I appended "video=radeon:modeset=1" to my cmdline, which initrd interprets and modprobe's radeon module with correct arguments (modeset=1) before root is mounted, and that's ok for X.
      I think you should run update-initramfs first and see if it solves the problem. If not, try this cmdline argument.
      There is unfortunately another issue. Newest initramfs-tools doesn't enable FRAMEBUFFER (including drm modules, like radeon) by default. You must enable it explicitly, by pasting `FRAMEBUFFER=y' to /etc/initramfs-tools/initramfs.conf. It is the case for ubuntu for sure, I don't know if debian is also affected (try grepping /usr/share/initramfs-tools/hooks/framebuffer for "OPTION=FRAMEBUFFER").
      And don't forget about update-initramfs (as root) after every initrd-related change (like initramfs.conf change or new file in /etc/modprobe.d).
      Thanks for your explanation. You are right. I didn't notice the KMS starting time. And I tried your solutions:
      1. update-initramfs
      or
      2. add video=radeon:modeset=1 or radeon.modeset=1 to the boot cmdargs.

      The result is that KMS is not loaded when the kernel boots. I thought I did make it loaded with a 2.6.32-trunk kernel. Maybe I was wrong.

      I tried to find /usr/share/initramfs-tools/hooks/framebuffer, but it is not on my debian. So I grepped /usr/share/initramfs-tools/hooks/* without any findings. So now I append `FRAMEBUFFER=y' to initramfs.conf and update the initramfs with update-initramfs -k all -u. Unfortunately KMS still remains unloaded until startx is executed.

      Any clue for the KMS thing? It is really wierd...

      I posted an entry yesterday saying that I am using the radeon with the support of KMS. But it is not there... is there kind of moderation here?

      Comment


      • #33
        This entry is on previous page now - maybe a bug in forum?
        Make sure that you updated initramfs for kernel that you're now using. 'update-initramfs -u -k all' is the best if you're not sure.
        I downloaded newest sid initramfs-tools package. The OPTION=FRAMEBUFFER thing is not there. I found another issue - no drm kernel module is placed in initrd except from intel i915. You must add this module explicitly. To do that AFAIK (I didn't tested that) you have to create a file in /etc/initramfs-tools/modules directory (it doesn't exists by default) and place there:
        Code:
        radeon modeset=1
        . I'm not totally sure about that; if it fails, try creating this file in /usr/share/initramfs-tools/modules.d. And don't forget about update-initramfs
        I hope this will help you.

        Comment


        • #34
          I found a mistake in my previous message. /etc/initramfs-tools/modules must be a *file* not directory.

          Maybe, some day, 1-minute edit restriction will disappear? Maybe...

          Comment


          • #35
            Originally posted by Wielkie G View Post
            I found a mistake in my previous message. /etc/initramfs-tools/modules must be a *file* not directory.

            Maybe, some day, 1-minute edit restriction will disappear? Maybe...
            Aha, I also dislike this restriction... The time should be at least 10min. Otherwise it is almost impossible to correct some typos.

            I updated some xserver stuffs yesterday, and now the 3D acceleration works and I can shut down the X server without a black screen. The DRI error in the Xorg.0.log is gone...

            Working on KMS still...

            I tried adding ``radeon modeset=1'' to /etc/initramfs-tools/modules, but the kernel won't even boot (nothing more than the first line of booting is shown on the screen). I guess the problem comes from the initrd file. Is there any way to check what I should have in the initrd? I tried to gzip -d and cpio -i. I tried some commands in the generated initrd:
            Code:
            $ find -name "radeon*"
            ./lib/modules/2.6.32-2-686/kernel/drivers/gpu/drm/radeon
            ./lib/modules/2.6.32-2-686/kernel/drivers/gpu/drm/radeon/radeon.ko
            ./lib/modules/2.6.32-2-686/kernel/drivers/video/aty/radeonfb.ko
            ./lib/firmware/radeon
            $ find -name "i915*"
            ./lib/modules/2.6.32-2-686/kernel/drivers/gpu/drm/i915
            ./lib/modules/2.6.32-2-686/kernel/drivers/gpu/drm/i915/i915.ko
            Without the modification to /etc/initramfs-tools/modules the radeon.ko won't be there but now it boots without the support of KMS.

            Comment


            • #36
              When I disable the KMS, everything goes fine, including the EXA acceleration (glxgears in 1400x1050 can have a 178fps, is it the common speed for a ATI mobility X1400 card?):
              Code:
              $ glxinfo | grep Open
              OpenGL vendor string: DRI R300 Project
              OpenGL renderer string: Mesa DRI R300 (RV515 7145) 20090101 x86/MMX/SSE2 TCL
              OpenGL version string: 1.5 Mesa 7.7.1-DEVEL
              OpenGL extensions:
              $ dmesg | grep drm
              [   32.896626] [drm] Initialized drm 1.1.0 20060810
              [   32.988092] [drm] radeon defaulting to userspace modesetting.
              [   32.988683] [drm] Initialized radeon 1.31.0 20080528 for 0000:01:00.0 on minor 0
              [   33.654826] [drm] Setting GART location based on new memory map
              [   33.655698] [drm] Loading R500 Microcode
              [   33.718312] [drm] Num pipes: 1
              [   33.718331] [drm] writeback test succeeded in 2 usecs
              [   51.581255] [drm] Num pipes: 1
              [   53.940437] [drm] Num pipes: 1
              One question for this: why one says R300 while the other says R500. I just don't understand what these numbers are.

              However, still no luck with KMS. I checked the initrd, with ``radoen modeset=1'' added to /etc/initramfs-tools/modules or ``options radeon modeset=1'' to /etc/modprobe.d/radeonkms.conf. Both modification would come into the initrd but neither would boot.

              Comment


              • #37
                There is one driver for R300-R500 cards - it's called r300. This is why DRI calls itself "R300", but microcode, etc is R500 specific.

                Has initrd required firmware? Check directory ./lib/firmware/radeon from unpacked initrd for at least R520_cp.bin (I think this is the only one you require).

                There are also some more modules that radeon.ko require - drm, drm_kms_helper, ttm and i2c_algo_bit. If they aren't in initrd KMS won't work for sure.

                You can also do this - boot system but without starting X (single user more should suffice). Then type `modprobe radeon modeset=1' and see what happens. If it works - something is wrong with initrd. If not, KMS doesn't work properly on your system (which shouldn't happen now).

                Comment


                • #38
                  Originally posted by Wielkie G View Post
                  There is one driver for R300-R500 cards - it's called r300. This is why DRI calls itself "R300", but microcode, etc is R500 specific.

                  Has initrd required firmware? Check directory ./lib/firmware/radeon from unpacked initrd for at least R520_cp.bin (I think this is the only one you require).

                  There are also some more modules that radeon.ko require - drm, drm_kms_helper, ttm and i2c_algo_bit. If they aren't in initrd KMS won't work for sure.

                  You can also do this - boot system but without starting X (single user more should suffice). Then type `modprobe radeon modeset=1' and see what happens. If it works - something is wrong with initrd. If not, KMS doesn't work properly on your system (which shouldn't happen now).
                  Well, I am not using gdm. As you suggested, I launch the system without load KMS stuffs during booting and run modprobe radeon modeset=1 manually on the command line. The screen goes black and I can see nothing. Last time I succeeded with another kernel (if I remember well), it turned into a nice screen of native resolution. But now...

                  I checked the initrd file:
                  * if nothing changed, there is no firmware (R520_cp.bin) or radoen drm stuffs (I only get a radeonfb.ko) or ttm.ko.
                  * if I set the /etc/initramfs-tools/modules, then the firmware and radeon drm stuffs (which you pointed out) are inside the initrd...

                  So now it seems that the initrd is good but the KMS is bad. I will try to get some log information when the screen goes black.

                  Comment


                  • #39
                    radeonfb? You should disable all framebuffer drivers (including Radeon and VESA fb), they will conflict with KMS.

                    Comment


                    • #40
                      this is what happened after executing ``modprobe radeon modeset=1''
                      Code:
                      [   90.116334] [drm] Initialized drm 1.1.0 20060810
                      [   90.218710] [drm] radeon kernel modesetting enabled.
                      [   90.218901] radeon 0000:01:00.0: power state changed by ACPI to D0
                      [   90.218933] radeon 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
                      [   90.218953] radeon 0000:01:00.0: setting latency timer to 64
                      [   90.221064] [drm] radeon: Initializing kernel modesetting.
                      [   90.221131] [drm] register mmio base: 0xEE100000
                      [   90.221134] [drm] register mmio size: 65536
                      [   90.221931] ATOM BIOS: M64CSP/M62CSP/M54CSP/M52CSP
                      [   90.222153] [drm] GPU reset succeed (RBBM_STATUS=0x10000140)
                      [   90.222182] [drm] Generation 2 PCI interface, using max accessible memory
                      [   90.222187] [drm] radeon: VRAM 128M
                      [   90.222189] [drm] radeon: VRAM from 0x00000000 to 0x07FFFFFF
                      [   90.222191] [drm] radeon: GTT 512M
                      [   90.222194] [drm] radeon: GTT from 0x20000000 to 0x3FFFFFFF
                      [   90.222297] radeon 0000:01:00.0: irq 32 for MSI/MSI-X
                      [   90.222353] [drm] radeon: irq initialized.
                      [   90.223010] [drm] Detected VRAM RAM=128M, BAR=128M
                      [   90.223015] [drm] RAM width 128bits DDR
                      [   90.223106] [TTM] Zone  kernel: Available graphics memory: 441510 kiB.
                      [   90.223109] [TTM] Zone highmem: Available graphics memory: 1036874 kiB.
                      [   90.223130] [drm] radeon: 128M of VRAM memory ready
                      [   90.223132] [drm] radeon: 512M of GTT memory ready.
                      [   90.223153] [drm] GART: num cpu pages 131072, num gpu pages 131072
                      [   90.225944] [drm] RB2D reset succeed (RBBM_STATUS=0x10000140)
                      [   90.225981] [drm] radeon: 1 quad pipes, 1 z pipes initialized.
                      [   90.226080] [drm] PCIE GART of 512M enabled (table at 0x00040000).
                      [   90.226098] [drm] radeon: cp idle (0x10000C03)
                      [   90.226607] [drm] Loading R500 Microcode
                      [   90.226611] platform radeon_cp.0: firmware: requesting radeon/R520_cp.bin
                      [   90.282604] [drm] radeon: ring at 0x0000000020000000
                      [   90.282660] [drm] ring test succeeded in 4 usecs
                      [   90.282956] [drm] radeon: ib pool ready.
                      [   90.283102] [drm] ib test succeeded in 0 usecs
                      [   90.283734] [drm] Radeon Display Connectors
                      [   90.283739] [drm] Connector 0:
                      [   90.283742] [drm]   VGA
                      [   90.283748] [drm]   DDC: 0x7e40 0x7e40 0x7e44 0x7e44 0x7e48 0x7e48 0x7e4c 0x7e4c
                      [   90.283752] [drm]   Encoders:
                      [   90.283756] [drm]     CRT1: INTERNAL_KLDSCP_DAC1
                      [   90.283760] [drm] Connector 1:
                      [   90.283763] [drm]   LVDS
                      [   90.283768] [drm]   DDC: 0x7e60 0x7e60 0x7e64 0x7e64 0x7e68 0x7e68 0x7e6c 0x7e6c
                      [   90.283772] [drm]   Encoders:
                      [   90.283776] [drm]     LCD1: INTERNAL_LVTM1
                      [   90.283779] [drm] Connector 2:
                      [   90.283782] [drm]   DVI-I
                      [   90.283788] [drm]   DDC: 0x7e50 0x7e50 0x7e54 0x7e54 0x7e58 0x7e58 0x7e5c 0x7e5c
                      [   90.283792] [drm]   Encoders:
                      [   90.283795] [drm]     DFP1: INTERNAL_KLDSCP_TMDS1
                      [   90.751222] [drm] fb mappable at 0xD80C0000
                      [   90.751225] [drm] vram apper at 0xD8000000
                      [   90.751227] [drm] size 5913600
                      [   90.751229] [drm] fb depth is 24
                      [   90.751231] [drm]    pitch is 5632
                      [   90.751235] fb: conflicting fb hw usage radeondrmfb vs EFI VGA - removing generic driver
                      [   90.753720] fb1: radeondrmfb frame buffer device
                      [   90.753722] registered panic notifier
                      [   90.753728] [drm] Initialized radeon 2.0.0 20080528 for 0000:01:00.0 on minor 0
                      does that conflicting stuff matter? or does something else go wrong?

                      Thanks a lot for your patience.

                      Comment


                      • #41
                        Why not just try it? If you build the kernel yourself, simply disable all framebuffer drivers. If not, blacklist all framebuffer modules (vesafb, uvesafb and radeonfb.)

                        Comment


                        • #42
                          Originally posted by RealNC View Post
                          radeonfb? You should disable all framebuffer drivers (including Radeon and VESA fb), they will conflict with KMS.
                          sorry, I don't quite understand how to disable them.

                          I added ``FRAMEBUFFER=y'' to /etc/initramfs-tools/initramfs.conf (and updated the initrd) as Wielkie suggested. But now I removed this line and updated the initrd, the KMS won't start either.

                          Comment


                          • #43
                            Originally posted by RealNC View Post
                            Why not just try it? If you build the kernel yourself, simply disable all framebuffer drivers. If not, blacklist all framebuffer modules (vesafb, uvesafb and radeonfb.)
                            I add a radeonkms.conf to /etc/modprobe.d with the following content:
                            Code:
                            blacklist radeonfb
                            blacklist vesafb
                            blacklist uvesafb
                            options radeon modeset=1
                            I am not sure whether this makes the same sense to your advice. But this doesn't help. I updated the initrd and rebooted. The radeon module remained unloaded till X started.

                            I tried to compiled a customized kernel several weeks ago... It took a long time and the result was a boot failure (surely I must have done something wrong). So I'd prefer not compiling the kernel again if there exists some way to achieve it.

                            Could you plz tell me whether there is any step causing the panic?
                            1. get the linux-source package from debian
                            2. unpack the tarball in /usr/src (since I am in the group src)
                            3. copy the configure file from /boot to the root of src tree as a .config file
                            4. modify the .config file, by commenting out all frame buffer drivers and enabling the KMS stuff
                            5. make the kernel
                            6. install the deb package

                            I have no idea about the KMS stuff now...

                            Comment


                            • #44
                              Originally posted by demonstrate View Post
                              The screen goes black and I can see nothing. Last time I succeeded with another kernel (if I remember well), it turned into a nice screen of native resolution. But now...

                              ....

                              So now it seems that the initrd is good but the KMS is bad. I will try to get some log information when the screen goes black.
                              I have the same problem:
                              http://www.phoronix.com/forums/showthread.php?t=21957

                              Still trying to figure it out.

                              Comment


                              • #45
                                Originally posted by robin1979 View Post
                                I have the same problem:
                                http://www.phoronix.com/forums/showthread.php?t=21957

                                Still trying to figure it out.
                                I am using debian's 2.6.32-3 kernel now. The KMS can be triggered after booting up with a command ``modprobe radeon modeset=1'' now.

                                I am still unable to trigger it at startup time, either by adding a conf file to /etc/modprobe.d/ or by adding a line to /etc/initramfs-tools/modules (I updated the initrd).

                                The former method results in a initrd file without the firmware I guess.

                                The latter method somewhat yields a correct initrd file. But when booting, the kernel says it can't load the firmware while the firmware is indeed inside the initrd file. The kernel waits for 1 minute and continues without KMS.

                                Is there some way to enable KMS at the boot time? I think adding a modprobe command to /etc/rc.local should work. But it looks kind of indecent.

                                BTW I tested glxgears, before KMS enabled it could run 170fps at 1400x1050x32 but now only 60fps. Why?

                                Code:
                                glxinfo | grep Open
                                OpenGL vendor string: DRI R300 Project
                                OpenGL renderer string: Mesa DRI R300 (RV515 7145) 20090101 x86/MMX/SSE2 TCL DRI2
                                OpenGL version string: 1.5 Mesa 7.7.1-DEVEL
                                OpenGL extensions:

                                Comment

                                Working...
                                X