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
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...
small correction
thanks for your work on the X packages.
Regarding mesa, I guess you meant 7.7-3 (not rc3).
Re: small correction
If you think KMS should now be enabled by default for radeon, you should include such a config file in the package.
Stabilization?
[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/gi
[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/com
[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:
the first time ever on this hardware. I'm using a HD 3200 (r600) onboard card.
Thanks a lot!
- David
How about initrd ?
Re: How about initrd ?
Suggestions, clarifications and some additional informations
"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.s
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.s
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/gi
thanks
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
Datapoint
ASUS P5B
RV770 (ASUS EAH4850)
kernel 64bit 2.6.33-rc6
userspace 32bit
Hannu
it works fine here too
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
Re: it works fine here too
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
failure....
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!
Re: failure....
Color tiling is not yet supported on R600/R700
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/gi
Thanks so much for great info from Blog from Brice Goglin
http://bgoglin.livejournal.com/19346.htm
$ 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
Re: Color tiling is not yet supported on R600/R700