Tearing in video on Intel GM965?
Quick workaround if you're using mplayer:
- Use
xvinfoto find the port number of the overlay Xv port. mplayer -vo xv:port=<port>
This will enable proper sync for video playback, but will of course disable any fancy compiz effects on videos. Hope it helps!
In my case the port was 84, so I added vo=xv:port=84 to ~/.mplayer/config
ALSA -> JACK and Flash
I've got an Edirol FA-66 firewire sound card. The only system on linux with support for this is JACK (with the FreeBoB driver). I use the FA-66 mainly for high quality audio playback. I start jackd with:
$ jackd -R --verbose -d freebob -r 44100
The command depends of course on your sound card. Test your setup with:
$ mplayer -ao jack some-file.mp3
Got sound? Excellent! Now, many audio players come with built-in jack playback support (gstreamer, pulseaudio, mplayer, xine, ...) But some don't, and the biggest issue for me here is Flash. Flash uses ALSA for playback, so it would be nifty if we could configure ALSA to redirect all it's sound to JACK. I have been able to redirect flash audio to PulseAudio and from there to JACK, but that requires yet another sound server. No thanks! So, if we can redirect audio from ALSA to JACK, most apps should be able to send their sound through my FA-66. For apps that aren't ALSA aware, there's always aoss.
Googling got me to the following solution in my ~/.asoundrc file:
# convert alsa API over jack API
# use it with
# % aplay foo.wav
# use this as default
pcm.!default {
type plug
slave { pcm "jack" }
}
ctl.mixer0 {
type hw
card 1
}
# pcm type jack
pcm.jack {
type jack
playback_ports {
0 system:playback_1
1 system:playback_2
}
capture_ports {
0 system:capture_1
1 system:capture_2
}
}
Test it with aplay file.avi. Nifty, now ALSA pushes all audio to JACK which in turn pushes it through the firewire port to my sound card! If you're unsure on what to put under playback_ports, just have a look at jack's verbose output (--verbose flag).
Rightie, now let's try with Flash. Pop up Firefox, youtube ahoy, nice video, play! ... Nada, no sound.
Look at the debug output from jackd and you'll discover that the Flash player continously connects and disconnects. This results in a flood of debug messages in the console. According to this post, it seems to be a bug with Flash 9. I got to be honest with you, I couldn't get this to work properly with flash 9. The solution? Install Flash 10 Release Candidate! I'm on Ubuntu (8.04 "Hardy") so I downloaded the flash 10 RPM and ran the following commands:
$ sudo apt-get remove flashplugin-nonfree
$ fakeroot alien flashplayer10_install_linux_081108.i386.rpm
$ sudo dpkg -i flash-plugin_10.0.0.569-1_i386.deb
$ cd ~/.mozilla/plugins
$ ln -s /usr/lib/flash-plugin/libflashplayer.so
Restart firefox, check that youtube movie again and VOILA! There's SOUND! Hope it helps, and I hope you don't have to spend 2hrs on this as I did... :-/
Alarm Clock packages available!
I've just added Alarm Clock ubuntu packages to my PPA at Launchpad! The package name is alarm-clock-applet (alarm-clock was already taken by a debian package).
![]()
Add the following to /etc/apt/sources.list:
deb http://ppa.launchpad.net/joh/ubuntu hardy main
deb-src http://ppa.launchpad.net/joh/ubuntu hardy main
Followed by a sudo apt-get update and finally sudo apt-get install alarm-clock-applet.
For more information, see https://launchpad.net/~joh/+archive.
I couldn’t resist…
Found this in the convenience store at campus and just had to have it. Doesn't taste bad either.
Apparently one third of the profits are returned to the sugar cane farmers in Malawi and Zambia. See www.ubuntu-trading.com for more information on Ubuntu Cola and the Ubuntu Trading Company.
Mayday mayday!
So, in order to see if I could get 3D hardware acceleration working on my PowerBook, I installed Ubuntu Feisty. And, guess what? It worked! I had excellent 3D hardware acceleration on my PowerBook! For 10 minutes... Until I ran apt-get upgrade and all hell broke loose. So what happened? Well, Gnome broke. It was partly broken before I upgraded but there were only some issues with the applets, nothing big. After the upgrade gnome-control-center had dependency issues which prevented all the essential gnome packages from installing - gnome-session, gnome-panel, gnome-*
I took a visit to #ubuntu+1 - the Ubuntu devel IRC channel - of which the topic sounded something like this:
Feisty is NOT stable and no close to usable! Do not use if you want a working system!
So I guess I had it coming... So it's back to ye old OS X again
as 3D acceleration is somewhat essential for our game project, I don't have much choice. Well, I could try another distro ofcourse, but with my new electric piano incoming soon I don't think I'll bother until Fiesty is stable (yes, I'm buying an el-piano and hooking it up to Ivory in a few days, so dual-booting my lappy just to play some would be a pain. More on this later.)
So there you have it, mayday mayday, Feisty is sinking. I want a new laptop
Ubuntu @ my PowerBook!
Right, so let's face it. I suck at blogging regularly. Sorry. Here comes an update.
Last night I installed Ubuntu on my PowerBook again after months of frustration over the slowness of OS X. And to my delight most of the hardware (which previously wasn't supported or required a lot of work to get going) now works out of the box!
Well, everything except 3D acceleration (R300) and wireless (bcm43xx) which is a bit unstable.
Right, according to Johannes Berg he has 3D acceleration working on his identical post-February 2005 PowerBook. On Ubuntu Edgy, this is not the case. glxinfo reports that direct rendering is working, but glxgears only gives ~35fps and any GL application outputs the following:
libGL warning: 3D driver claims to not support visual 0x4b *********************************WARN_ONCE********************************* File r300_maos.c function r300EmitArrays line 546 Cannot handle offset bc302000 with stride 3, comp 3 *************************************************************************** Try R300_SPAN_DISABLE_LOCKING env var if this hangs.
A long chat in #xorg didn't solve this either, so I finally sent an email to Johannes Berg and asked him how he got it working. Hoping for a reply soon.
My Apple Airport Extreme (BCM4306) is now included in Edgy, though it required some firmware cutting to work. I do have some problems with it still though. The interface dies after a while and seems a bit unstable. I don't know what's causing this, but my kernel logs are flooded with the following:
TKIP: received packet without ExtIV flag from <some mac address>
TKIP: replay detected: STA=<AP> previous TSC 000000000b51 received TSC 000000000b51
Which leads me to believe this is a TKIP issue with wpa_supplicant. I'll have to investigate further...
Getting the touchpad to work as I wanted also required some tweaking with Synaptics, but it works fairly well now. Only problem is that it's not as sensitive as in OS X (i.e. I have to press harder on the pad) even though I've set the sensitivity from synaptics to max.
The keyboard now works surprisingly well - the fn-key works out of the box, aswell as num lock. Only thing is that there is no Alt Gr key on this keyboard which is required on Norwegian layouts. Also, the | and < keys were swapped. This could easily be fixed with a neat tool called xkeycaps.
Only thing I miss on my PowerBook now is Flash, which isn't available for Linux PowerPC (curses!) but I think I might get gnash working once I get 3D acceleration. Also, thanks to the folks at IBM, I have Java 1.5 working which wasn't previously available
In other news, we're doing a project for our Object Oriented Programming class which involves creating a game in Java. Geeks that we are we're starting out earlier than anyone else and aim at creating a game in 3D. The library we'll use is called JMonkeyEngine which is a game engine written in and for Java. We'll see how this turns out...
Ubuntu on a PowerBook G4
My old writeup on Ubuntu on a PowerBook G4 has been offline for some time due to us moving to another web host. I've uploaded the old site now (same URL, though I have omitted all my custom kernels because of their size.)
Note though, that the pages are a bit outdated (applies to Ubuntu 5.10 Breezy) so I don't know how relevant the information is on running Ubuntu 6.10 Edgy. Note also that I'm not running Linux any more on my PowerBook (mainly because of hardware incompatibilities and some commercial software which is unavailable on the PPC platform.)





