You are viewing bgoglin

Brice Goglin's Blog - Debian/X.org notes - Radeon KMS and DRI2 in experimental

Feb. 2nd, 2010

00:13 - Debian/X.org notes - Radeon KMS and DRI2 in experimental

Previous Entry Share Next Entry

Now that libdrm-radeon1 is in unstable, I just uploaded a snapshot of the radeon driver to experimental (xserver-xorg-video-radeon package version 1:6.12.99+git20100201.a887818f-1). So you may now get KMS and DRI2 working, assuming you have a recent kernel (I am running 2.6.32-trunk-686 here). This driver even contains some early support for r8xx boards.

To check whether KMS is working, look for radeon kernel modesetting in dmesg. To check whether DRI2 is working, look for DRI2 in /var/log/Xorg.0.log.

Make sure the radeon kernel module is loaded early (which means: don't let X load it late in the boot, otherwise you may experience this bug). I had to add radeon to /etc/modules and put options radeon modeset=1 in /etc/modprobe.d/. In the past, I also needed agpmode=-1 there but it didn't seem to make any difference with latest packages.

Then, actual DRI2 support requires Mesa packages rebuilt against libdrm-radeon1. This is in experimental as well now. Look for libgl1-mesa-dri and other Mesa packages version 7.7-3.

Don't forget that these packages are in experimental for a good reason, they may not work. But at least basic things seem to work fine on my Radeon X300 (rv370). And don't forget that the X team needs help, otherwise these packages may never make it to unstable...

(Permanent link

Comments:

From:(Anonymous)
Date:February 2nd, 2010 01:00 (UTC)

small correction

(Link)
Hi Brice,

thanks for your work on the X packages.

Regarding mesa, I guess you meant 7.7-3 (not rc3).

(Reply) (Thread)
From:bgoglin
Date:February 2nd, 2010 06:20 (UTC)

Re: small correction

(Link)
Yes 7.7-3, thanks, I fixed the text.
(Reply) (Parent) (Thread)
[User Picture]
From:womble2
Date:February 2nd, 2010 01:04 (UTC)
(Link)

I had to put the following in /etc/modprobe.d/:

 options radeon modeset=1

If you think KMS should now be enabled by default for radeon, you should include such a config file in the package.

(Reply) (Thread)
From:bgoglin
Date:February 2nd, 2010 06:20 (UTC)
(Link)
Sure, we'll do what we do for intel, but a couple things need to stabilize first.
(Reply) (Parent) (Thread)
From:(Anonymous)
Date:February 3rd, 2010 08:29 (UTC)

Stabilization?

(Link)
On the road...

[1] Linux-2.6.33-rc6-git1 (drm-radeon-kms left staging-area)

"drm/radeon/kms: move radeon KMS on/off switch out of staging."
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f71d0187987e691516cd10c2702f002c0e2f0edc

[2] libdrm-from-git (post-2.4.17)

"radeon: enable by default now that kms is out of staging"
http://cgit.freedesktop.org/mesa/drm/commit/?id=520c658706aa896d64f374cc74065394111f6122

[3] mesa-7.7 (mesa-7.8)

3D for R500 is very well supported - here I use a Mobility X1300 (rv515, PCI-E). R600/R700 is better to wait for mesa-7.8? (IIRC release planned for March).

[4] ddx (xf86-video-ati from upstream)

Indeed, for Distro-maintainer this needs a clear version bump, otherwise build-from-git as you did Brice.

I am not sure if the debian-kernel team is willing to backport upstream stuff to 2.6.32 to have full drm-radeon-kms incl. 3D-support in Debian/squezze.
What is debian-x thinking?

Kind Regards,
- Sedat (aka dileX) -

P.S.:
Currently, I use radeon-gallium (as dri-statetracker) for months, regularly testing with Anholt's OpenArena benchmark.

$ LIBGL_DEBUG=verbose glxinfo 2>/dev/null | grep -i opengl
OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.3 on RV515
OpenGL version string: 2.1 Mesa 7.8-devel
OpenGL shading language version string: 1.20
OpenGL extensions:
(Reply) (Parent) (Thread)
From:(Anonymous)
Date:February 2nd, 2010 11:17 (UTC)

Thank you

(Link)
This is awesome, KMS and DRI2 is working fine. Even compiz is working, for
the first time ever on this hardware. I'm using a HD 3200 (r600) onboard card.

Thanks a lot!
- David
(Reply) (Thread)
From:(Anonymous)
Date:February 2nd, 2010 18:16 (UTC)

How about initrd ?

(Link)
When do you load the radeon module ? I'm loading it in the initrd, but the modesetting fails because of bug #561476 (initramfs-tools: radeon module can't load firmware.)
(Reply) (Thread)
From:bgoglin
Date:February 2nd, 2010 18:59 (UTC)

Re: How about initrd ?

(Link)
Put it in /etc/modules ?
(Reply) (Parent) (Thread)
From:(Anonymous)
Date:February 2nd, 2010 21:35 (UTC)

Suggestions, clarifications and some additional informations

(Link)
Hi Brice,

"finally"... was my first thoughts reading your blog-article.
I have some suggestions, clarifications and some additional informations.

Maybe, you could clarify on the ddx to use: xserver-xorg-video-radeon (*-ati is only a wrapper, see also filesize 5k vs. 1M).

Furthermore, you can check if KMS enabled by checking dmesg:

$ dmesg | grep modesetting
[ 10.010054] [drm] VGACON disable radeon kernel modesetting.
[ 3671.532578] [drm] radeon kernel modesetting enabled.
[ 3671.534509] [drm] radeon: Initializing kernel modesetting.

There are several other possibilities to enable drm-radeon-kms on startup.

1. Give "modeset=1" as a paramter for grub (Kernel command line).
2. Grub2: Put it into /etc/default/grub (GRUB_CMDLINE_LINUX="modeset=1")
3. Boot with "nomodeset" into "init-3" (or deactivate starting of graphical login-manager, I know Debian does not distinguish between init-3/init-5). Unload radeon kernel-module, reload again with enabling KMS and finally start Xorg via "startx". For debugging this option should be preferred.

Booted into "init-3" (grub-line: nomodeset):
$ modprobe -r -v radeon drm (unload)
$ modprobe -v drm debug=1 (additional for DRM-debugging)
$ modprobe -v radeon modeset=1 (load)

To see the correlation between ddx and libdrm_radeon, try:

$ sudo lsof | grep ^Xorg | grep radeon
Xorg 31765 root mem REG 8,2 998620 538772 /usr/lib/xorg/modules/drivers/radeon_drv.so
Xorg 31765 root mem REG 8,2 14592 287621 /usr/lib/libdrm_radeon.so.1.0.0

$ ldd /usr/lib/xorg/modules/drivers/radeon_drv.so | grep radeon
libdrm_radeon.so.1 => /usr/lib/libdrm_radeon.so.1 (0xb774f000)

Hint: Try initial radeon power-management from [1].

Which help do you need?

Kind Regards,
- Sedat (aka dileX) -

[1] http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=shortlog;h=refs/heads/drm-radeon-testing
(Reply) (Thread)
From:(Anonymous)
Date:February 2nd, 2010 23:36 (UTC)

thanks

(Link)
Brice,

I got it to work here, on an amd64 with an hd3650 (rv635). Had to rebuild the packages for amd64 and to build linux 2.6.32-6 (to get a fix for #561552) but it all works now, and without changing a thing in your packages.

Thx a lot for your work!

Thomas
(Reply) (Thread)
From:(Anonymous)
Date:February 5th, 2010 07:24 (UTC)

Datapoint

(Link)
KMS and DRI2 seems to be working fine.

ASUS P5B
RV770 (ASUS EAH4850)
kernel 64bit 2.6.33-rc6
userspace 32bit

Hannu
(Reply) (Thread)
From:(Anonymous)
Date:February 9th, 2010 11:04 (UTC)

it works fine here too

(Link)
Chispet AMD 780G - Radeon HD3200
Kernel 2.6.33-rc7

the only "problem" is that /var/log/messages says:
kernel: radeon: You have old & broken userspace please consider updating mesa & xf86-video-ati

but everything is working fine!

andrea
(Reply) (Thread)
From:(Anonymous)
Date:February 25th, 2010 01:18 (UTC)

Re: it works fine here too

(Link)
Kudos,

Have it working with debian/squeeze x86_64, mesa 7.7-3 back-ported and on HD2400XT with stable 2.6.33 but DRI2 not working. No screen artifacts anymore with opengl, but You have old & broken userspace please consider updating mesa & xf86-video-ati

dutchfish
(Reply) (Parent) (Thread)
From:(Anonymous)
Date:March 8th, 2010 13:15 (UTC)

failure....

(Link)
I waited for mesa 7.7 to be in testing and then decided to get xserver-xorg-video-radeon from experimental en get KMS + DRI2 going. Everything was going well till I tested suspend (which I thought only worked with KMS with my hardware)...

My laptop, an HP Pavilion dv5035nr with an ATI Radeon Xpress 200M IGP (5955) PCIE (RC410), failed miserably when suspending. It didn't even go into suspension! the screen went blank and the wireless led shut off but the fan was running and all the keyboard lights were on.

What really bothers me is that upon restarting my computer, wireless is shut off...it won't come on. Browsing through the multiple logs I found a line like this: wifi enabled by radio killswitch; disabled by state file
I know that this is the problem, but I just don't know where to go to fix it...a little help would be much appreciated!

Oh and I would also like to point out that with KMS + DRI2 enabled (using EXA) I get 2 disquieting messages in the logs:

[drm:rs400_gart_adjust_size] *ERROR* Forcing to 32M GART size (because of ASIC bug ?)

radeon 0000:01:05.0: Wait MC idle timeout before updating MC
Failed to wait MC idle while programming pipes. Bad things might happen.

I would file a proper bug report with debian if I actually had wireless working with my laptop!
(Reply) (Thread)
From:(Anonymous)
Date:March 9th, 2010 03:02 (UTC)

Re: failure....

(Link)
I managed to fix wireless: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571331
(Reply) (Parent) (Thread)
From:(Anonymous)
Date:March 22nd, 2010 16:26 (UTC)

Color tiling is not yet supported on R600/R700

(Link)
I think I have almost everything working running Debian,
except the shading setup with HD3870 X2

Built KMS/drm support using a pristine 2.6.31.1 kernel, Mesa-7.8-rc1

$ glxinfo | grep render
direct rendering: Yes
OpenGL renderer string: Mesa DRI R600 (RV670 9509) 20090101 TCL DRI2

used latest firmware from linux-firmware.git:
http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=shortlog

Thanks so much for great info from Blog from Brice Goglin
http://bgoglin.livejournal.com/19346.html

$ LIBGL_DEBUG=verbose glxinfo 2>/dev/null | grep -i opengl
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: Mesa DRI R600 (RV670 9509) 20090101 TCL DRI2
OpenGL version string: 1.5 Mesa 7.7.1-DEVEL
OpenGL extensions:
------> OpenGL shading language version string: xxx missing ???
1) should I downgrade to R500?

2) is performace what is expected:
$ glxgears -info
11337 frames in 5.0 seconds = 2267.288 FPS

Thanks in advance. -- Pat
(Reply) (Thread)
From:(Anonymous)
Date:March 22nd, 2010 16:28 (UTC)

Re: Color tiling is not yet supported on R600/R700

(Link)
sorry I meant pristine 2.6.33.1
(Reply) (Parent) (Thread)
From:gsbfin
Date:February 17th, 2013 14:53 (UTC)
(Link)
locals online now Go Here dld.bz/chwZQ
(Reply) (Thread)