Monday, October 25, 2010

More testing on r600g

A few weeks ago I posted about some testing I did with the r600 Gallium (r600g) drivers in Mesa 7.9 on my Radeon HD3650 (rv635) card. Well, I've been keeping up with the testing and all I can say is that it keeps getting better. Today, upgraded some more components (xorg) and did some more testing, with the power settings on high. Lowering the cards power setting to 'med' can drop the FPS by 20-30%.

Current packages installed
kernel 2.6.36
libdrm 2.4.22
mesa git
xf86-video-ati git
xserver 1.9

With this setup my desktop (gnome 2.30 with compiz 0.8.6) things seem pretty smooth. Scrolling seems better in Firefox and other things seem correct. I still have some problems with fullscreen video tearing in flash (10.2.161) videos. But mplayer and totem seem to run fine. Clutter apps still don't work quite right on my machine even though I have upgraded clutter to 1.4. But I think I am down level on some of the requirements.

Testing results
nexuiz-glx, normal settings, 1024x768 windowed, 30fps (about the same)
vdrift, 1024x768 windowed, 30-60fps (this is a big improvement)
openarena, 1024x768, windowed, 50-60fps (no change)
etracer, 1024x768, 25-30fps

What is funny is just having the blogger editing screen open seems to drop the FPS of games by about 30%. So the editor code at blogger needs some help.

Wednesday, October 13, 2010

Nautilus script to create mp3s from video files

Do you ever download a video off youtube and think "gee I wish I had an mp3 of that". Well here is a script for nautilus (the gnome file manager in linux) to help you create that mp3.

Create the file in $HOME/.gnome2/nautilus-scripts

I named it "Convert to MP3" and set the execute flags on the script (chmod a+x $HOME/.gnome2/nautilus-scripts/Convert\ to\ MP3)


out_file=`echo "$in_file" | sed 's/\.\w*$/\.mp3/'`

ffmpeg -i "$in_file" -f mp3 -ab 128000 "$out_file"

This script requires ffmpeg to be installed for it to work. Once you install this script you should see a new menu item on the context menu of the files named Scripts if it was not already there, and then you should see your "Convert to MP3" option.

Select any video file, choose the "Convert to MP3" option and after a few seconds (depending on the size of the file) an mp3 file will be created with the same name as the original file. 
Hope you found this useful.

Tuesday, October 05, 2010

Radeon Power Management in Linux

In addition to my desktop computer that has a Radeon 3650 video card in it, I have an Lenovo T400 laptop that has and Intel and an ATI video card in it. I have been using the Intel card primarily as it gives good battery life and the fan in the machine does not run much. With the Linux 2.6.35 kernel being out that supports Radeon power management I thought I would give it a try.

Fedora 13, my OS of choice, currently only has kernel 2.6.34 available. So I went to koji and grabbed the latest kernel source package. I made sure I had the dependencies for building the kernel installed, by running yum-builddep kernel. I then took the kernel source package I had and rebuilt it using rpmbuild --rebuild [kernel src rpm]. This process took awhile, but eventually I got a set of kernel packages. I then changed to the ~/rpmbuild/RPMS/x86_64 directory and ran yum --nogpgcheck upgrade kernel*. Once that was installed I rebooted into the new kernel. I then followed the wiki to enable dynpm. I actually placed the options in my /etc/rc.local file so they were applied on every reboot. The system seemed to work ok, but had a little flashing every now and then do the video clocks changing, so I upgraded the xorg-x11-drv-ati rpm using the same process as I did for the kernel and rebooted again. So far the ATI card seems to be working fine, I still have a few flashes every now and then and the battery life is not as good as when using the Intel card. But the 3d performance is much better.

I have not upgraded Mesa on this machine yet, so it is still using Mesa 7.8.

Friday, October 01, 2010

Mesa's r600g Driver Test Drive

There has been alot of talk about the Mesa driver in Linux. One of the new things that has been talked about as the savior of 3d graphics on Linux is the Gallium technology. This technology is supposed to make writing drivers easier and to allow for much more functionality in the Linux 3d stack.

While I am not a gallium expert, I know enough to build the driver and test it out. So I started with my stock Fedora 13 setup (64bit, Q6600, 8GB RAM). I followed the wiki and installed the Kernel, libdrm, mesa and the ATI driver all from git. It took a little while, but it was reasonable to get going. It really helped that I had built many of these components before when the r600c driver originally came out, so I knew the process.

So after installing all the components I booted my machine and plymouth came up, but GDM was a black screen. So I disabled rhgb on the kernel boot line and rebooted. This time I got a working GDM. I fixed the plymouth problem by running /usr/libexec/plymouth/plymouth-update-initrd.

I logged into my normal desktop and compiz was running fine. I verified that I was indeed running gallium, by using glxinfo.

glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on RV635
OpenGL version string: 2.1 Mesa 7.10-devel
OpenGL shading language version string: 1.20

I then did a few tests with the r600g to see how things were working. glxgears seems to work as did many of the other demos (tunnel, tunnel2, geartrain, dinoshade, etc). All the demos were running right around 60fps, which is the refresh rate of my monitor, so far so good.

I ran IOQuake 3 in a window on my desktop (1024x768 I believe) and averaged around 30fps. With r600c I got around 90fps. So I'm not sure if that is due to the change in mesa to reduce tearing or not.  Vdrift and Extreme TuxRacer both ran at around 20fps both in a 800x600 window on my desktop. That is the fastest Vdrift has ran on my machine. Google Earth also ran quite well even in 32bit mode.

I ran Diablo II via wine in both directdraw and opengl mode and it ran at a solid 25fps for the few minutes I played it.

So far the r600g driver appears to be working decently, I'm sure there are things to fix as it is still in development. But, it appears to be working well.