Sunday, December 31, 2006

iPod 2nd Gen with Ubuntu Dapper

There was an nice Christmas present this time, bug #66068 had a fix and nice clean instructions as well! After a bit of recompiling (the debs in the bug report are for edgy!), meanlix now works perfectly with the second generation iPod Nano. That means none of the instructions here are required any more! [Except the part about using the latest version of libgtkpod]

D-Bus and HAL rock!

Wednesday, December 27, 2006

Meanlix gets some new hardware

I put in a much overdue USB 2.0 4+1 PCI extension card into meanlix today. That means the USB proliferation (and slowness!) has been limited. Going from a single USB1.1 slot to 4 USB2.0 slots should bring a sigh of relief to my gadget-happy siblings whose appetite for cameras, mobile phones and music players rather strained that single slot. And there's still an extra slot for that another USB gadget.

Another change I made was to put in another network card into meanlix, making it so much more easier to setup bonszai to access the Internet. No more swapping cables, now the net is shared between both the PCs. Maybe I should've gone further and put in a Wifi-adapter instead. Then I'd be able to roam the house with wi-fi in every corner. Maybe ...

Meanlix now has used up nearly all of its PCI slots, just one left, which is a first for my computers (and I think for most computers).

P.S.: Anybody got good PC100 256MB/512MB SD-RAM? I'd like to buy (after testing) please.

Saturday, December 16, 2006

Technology Funland

bonszai brought some unexpected benefits into my computing life. When you know meanlix is 5 years old, you realise that I'm really at the bottom of the hardware technology curve.

Not so with bonszai. It has technologies that I've never played with: Wi-fi (802.11g), bluetooth, and Firewire (IEEE1394).

With campus Wi-fi access, I'm really not tied down anymore, and can roam with ease, atleast within most departments. Furthermore, in Ad-Hoc mode, my friends and I can form a private Wi-Fi network (MANET) that leads to interesting possibilities.

Bluetooth (and especially it's Linux implementation) also has opened up some fun possibilities. I'm looking forward to receiving a pair of bluetooth headphones (courtesy HP, hopefully they'll be sent) and am trying to increase the number of bluetooth devices I'll use, especially a planner. BTW, the Linux implementation rocks and I've never seen it so user-friendly. Want to send a file to somebody in the neighbourhood? Just right-click the file, click Send-To, and select Via Bluetooth. Voila, a list of devices in the neighbourhood is presented for your sending pleasure! I think only Mac OS X has a better implementation.

This is, of course, nothing to say of the ethernet-over-bluetooth implementation (modprobe bnep) which is ultimately cool. It means my teensy laptop can connect via four different mediums (eth, fw, bluetooth, wifi), which is the most I've seen a device ever do! It often suffices when wi-fi doesn't (due to buggy drivers). Not very great speeds though.

Firewire is another story, for "sustained" speeds and rated 400Mbps, it's an excellent industry standard for data transfer. It's only now begin showing up in desktops and laptops, and I must say it rocks too! Firewire is built for point-to-point communications and unlike USB2.0, has no problems connecting computers to each other. RFC 2734 details a IPv4-over-Firewire implementation, and the Linux module eth1394 implements it. Not very great speeds (I've got about 17MBps sustained), but again, fantastic to be trying out such technology. Windows too has this, but Microsoft has announced that "due to lack of demand", they'll be removing it in Vista.

All of this has meant that I now carry the following along with me wherever I take the laptop:
  1. One straight CAT-5 cable
  2. One cross CAT-5 cable
  3. One Firewire 4--6 pin cable
  4. One Firewire 4--4 pin cable
The shopkeeper was out of S-video to S-video cables.

Working on the Cell BE

For one of my courses (Computer Architecture), we (my partner and I), decided to port the popular ffmpeg library to the Cell Broadband engine. Yep, this is the same processor that was developed for the Playstation 3. It has got impressive computation capabilities that made us believe it would lead to significant speed-ups to video encoding. We already knew of real-time encoders written by Toshiba for H.264 (the industry's leading-edge codec), and so we decided to do the port for MPEG-4.

Our initial attempts to get hold of a Playstation 3 failed :D, and we had to settle for using the simulator to code our application.

Since we had no idea what approach would lead to a speed-up we tried many approaches, coding, benchmarking and then deciding what to do next. We got very close to both ffmpeg and Cell, but in the end, we had underestimated the task of porting a legacy application to the Cell. If you're wondering why most of your applications are not multi-core yet, you better realise it's hard. Even more, the Cell has 9 cores, 8 of which can only access their own memories (256K). Fun.

Our final results were not impressive. We could only port a single function off to the SPU (one of the 8 vector cores), and not take advantage at all of the 8 cores. Thankfully, despite the overhead, we had 0% speedup. That does mean there is scope here. Let's see, I'll be continuing on this project for some more time. Hopefully it'll lead me to some interesting research problems.

For now, I'll be content pushing the changes we made back to ffmpeg.

P.S.: Anybody tired of their PS3 and wishing to donate it, can please contact me.

Wednesday, December 13, 2006

Hardware Virtualization and KVM

One of the other reasons I went in for a AMD Turion 64 X2 was its support for "hardware virtualization". People familiar with QEMU know what virtualization is, and it is very big craze right now in the server market. While there are software based virtualizers (QEMU, MS Virtual Machine/PC, VMWare, etc.), Intel and AMD added virtualization capabilities to their recent processors. What this means is that I could run unmodified copies of that other OS under Linux, at "full" speed. Not that I want to, of course :D

Here's the relevant /proc/cpuinfo flag:
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow up pni cx16 lahf_lm cmp_legacy svm cr8_legacy

If present, it indicates that your AMD processor supports virtualization. For Intel processors, look for the vmx flag. Unfortunately, due to concerns that a "hypervisor" rootkit could gain control over your main OS, many computers that show this enabled on their processors could have it disabled in the BIOS---often with no option to restore it. Determining your BIOS's support requires some debug voodoo at the FreeDOS prompt.

Thankfully, that's not an issue on my laptop. I was planning to install Xen sometime and check out this capability, but a new entrant to the virtualization scene made me do it quicker. kvm is the Linux virtualization module to be included in 2.6.20, but you can compile it today! It's easy. Also, it will tell you if your BIOS has disabled virtualization.

I tried out release 7 (after Debian's 5-2 failed to work for me), but was disappointed. It is slower than qemu, and has frozen my machine once in two tries. Oh well. It's still being developed, let's see how this turns out.

Wednesday, December 06, 2006

Install Report for Compaq V3133AU (V3000 Series) AMD Laptop

[This is the final version of my document]

Mostly everything works out-of-the-box on the system. Some things (graphics, sound) require some love to get working properly. Some (wireless) fail to work at all until the proper drivers are installed. Nothing has completely failed to work so far.

Note: I chose a AMD Turion for the 64-bit capabilities, as Core 2 Duos weren't available. However, based on experience installing Kubuntu Edgy on a friends V3000 series laptop with the Intel Centrino chipsets, everything seem to work completely out-of-the-box in every respect. Unless you really need 64-bit computing, I'd recommend going for Intel-chipset based laptops to make things easier.

Operating System: Ubuntu Edgy 6.10 64-bit. The laptop comes installed
with FreeDOS. GNOME 2.16.1 used on the system. Linux Kernel 2.6.17-10-generic SMP.

Processor (AMD Turion 64 X2, TL-52, 1.6Ghz)
Works. Dynamic frequency control works too, however, powernow-k8 seems to switch to only two frequencies (800/1600Mhz) despite ACPI reporting that the processor supports 8 speed steps.

Dual-core = Smooth computing.

On Board Graphics (nVIDIA GeForce Go 6150)
nv driver was not detected for the card, started up in VESA. With nv, hsync/vsync frequencies need to be specified, after which the maximum resolution of 1280x800 works. Font corruption seems to occur randomly for the nv driver.

I currently use the nvidia driver, which seems to disable 1280x768 (which works with the nv driver). Switching to a VT causes problems with the display, with lots of flickering. I'm yet to resolve this problem.

BrightView totally sucks in my opinion. Oh the glare!

S-Video: Not tested

External VGA
Works in dual-head configuration with the nvidia drivers (1.0.8776), see Appendix P (Configuring Multiple X Screens on one card) in the nVIDIA documentation for details. Note that some false alarms seem to go off, with another card supposedly being detected by X, but both the Device instances must use the same BusID.

I've not tried to get "copy out" functionality working on the external display, for now, it is a separate display.

Hotkey functionality (Fn+F4) doesn't seem to work or most likely isn't configured.

Unable to get this working with nv driver.

Expansion Card Type 3: Not tested

Integrated 10/100 Ethernet: Works.

USB2.0: Works.

Firewire (IEEE1394)
Works. Linux supports IP over Firewire! (400Mbps!!!!) See the eth1394 module. Update: I tested this out, works like a charm, but I've achieved only a peak of 17MB, with the hard disk spinning like crazy :D

SD/MMC Card Slot
Detected by the sdhci driver in 2.6.17 and above kernels, but I've been unable to get it to work with the only MMC card that I've tried. 2.6.18 supposedly has much better support, and I've heard rumours that only SD cards work. Will try this out soon. Update: SD cards work fine. It's the MMC cards that do not work.

PCMCIA
Not tested

Bluetooth
Works. Use the bnep+PAN module to get ethernet over bluetooth! This is lovely! KDE seems to have excellent BlueTooth applications, GNOME is still lacking in this area.

The command hciconfig shows you your Bluetooth devices, for which the wireless switch must be on.

Wireless (Broadcom 4312)
Works with ndiswrapper 1.28, which I had to compile for my kernel. Seems that Edgy ships with a broken ndiswrapper (Invalid argument errors). The driver is from the the SP33008A driver package
from Compaq.

The bcm43xx driver fails to extract firmware from the driver package, and does not work with my card.

Note that ndiswrapper was originally in Dapper Drake (32-bit) picking up the 64-bit driver, and obviously failing to run it.

Trackpad
Works. Use the gsynaptics (note the 's' at the end) package to get a utility to manage it.

Keyboard
Works. Including all the multimedia keys and special keys! However, some keys (like Mute) don't seem to reflect the current status (or they don't turn orange).

Audio
You'll need ALSA 1.0.13, with the disable_msi=1 parameter, to get the headphone working on the nVidia chipsets. That also seem to have stabilized things. Embedded Microphone (LCD Panel), headphones and speakers all work. Front-panel microphone not yet tested, but shows up in ALSA mixer, so should work.

DVD-Writer+CD-ROM
Works.

Power/Battery (6-cell)
Works. Displays status (charging, etc.) with charge remaining as well as time remaining.

65W AC Adaptor works.

Internal Modem
Not tested, though Edgy does show a ppp0 connection.

Suspend
Works. Edgy refused to show the Suspend button, probably because Dapper settings were imported with my home directory. Wiping out ~/.gconf/ helped restore the button (though this was done for other reasons).

The only flaw is that the trackpad comes back disabled, but a single button press gets it working again.

Hibernate
Works. However, on restore, the muted Speakers are unmuted, and headphones stop working. I must do a /etc/init.d/alsa force-reload to get everything working again.

See also: http://hpwiki.cactii.net/hpwiki/Presario_V3%2A%2A%2A for more install reports on this series of laptops.