Hi!
Add a post

  New post  January 13th, 2012 - Android 4.0!

I am posting this from my Nexus S 4G on CyanogenMod 9 Build 20! Android 4.0 “Ice Cream Sandwich” is awesome!

image


Old news:

  Old post  January 8th, 2012 - New kitten!

image

  Old post  November 10th, 2011 - CF-M34: Audio

This was probably the most frustrating part to get working so far. According to lspci:
00:00.1 Multimedia audio controller: Intel Corporation 82440MX AC'97 Audio Controller
So it’s an Intel 8×0 card according to ALSA.
During bootup, the card is detected automatically and enabled with the snd-intel8x0 module. However, only the beep would work when I tried it. This led to an annoying and frustrating search for answers on Google, with no results pertaining to my issue. I did, however, find info about ac97_quirk modes used by the snd-intel8x0 driver. I eventually figured out the correct mode, and added it to /etc/modprobe.d/alsa-base.conf(you can place it in a new .conf file in /etc/modprobe.d if you like):
options snd-intel8x0 ac97_quirk=-1
After a reboot, I thought I had conquered this issue. I thought wrong.
Apparently, due to the strange nature of the sound chip’s design(and according to info found around Google), it tries to share memory with the video chip(Silicon Motion SM710 LynxEM). Every time X started up, the video driver was confusing the audio driver and all sound but system beep was being muted(alsamixer showed everything turned up and unmuted). Determined to fix this issue, I wrote the following hack, in the form of /usr/local/bin/alsa_hackaround):
#!/bin/bash
/sbin/modprobe -r snd-intel8x0
/sbin/modprobe snd-intel8x0
amixer -c0 sset 'Master' 100% unmute
amixer -c0 sset 'Headphone' 100% unmute
amixer -c0 sset 'PCM' 75% unmute

This file is executed by /etc/init.d/xdm’s start command:

...
start-stop-daemon --start --quiet $SSD_START_ARGS \
|| log_progress_msg "already running"
log_end_msg 0
...
exec /usr/local/bin/alsa_hackaround
...
fi
;;
...

This unloads, then loads the audio driver and sets mixer settings whenever xdm is started or restarted, making sure the audio driver starts AFTER the video driver. Note, that the ac97_quirk is still required after this. The ALSA mixer settings are reset to 0 every time the driver is reloaded, so the amixer commands need to be run in order to restore it.

I can now listen to audio out of the mono system speaker, and headphone jack from within X.

The amixer commands are completely up to you. I use the bare minimum to get PCM sound working correctly, however you can consult ‘amixer scontrols’ for additional controls:

Simple mixer control 'Master',0
Simple mixer control 'Master Mono',0
Simple mixer control 'Headphone',0
Simple mixer control '3D Control - Center',0
Simple mixer control '3D Control - Depth',0
Simple mixer control '3D Control - Switch',0
Simple mixer control 'PCM',0
Simple mixer control 'Line',0
Simple mixer control 'CD',0
Simple mixer control 'Mic',0
Simple mixer control 'Mic Boost (+20dB)',0
Simple mixer control 'Mic Select',0
Simple mixer control 'Video',0
Simple mixer control 'Phone',0
Simple mixer control 'IEC958',0
Simple mixer control 'Beep',0
Simple mixer control 'Aux',0
Simple mixer control 'Mono Output Select',0
Simple mixer control 'Capture',0
Simple mixer control 'Mix',0
Simple mixer control 'Mix Mono',0
Simple mixer control 'External Amplifier',0

  Old post  November 10th, 2011 - CF-M34: SD card as disk drive, and other adventures

I had already installed Debian Testing(as of this writing, ‘Wheezy’) on the 2.5″ 6GB hard drive I had installed via debootstrap. I noticed the swap speed was horrendous, so I began to think of other ways to get around this problem. First, I upgraded the RAM to a 256MB module(this machine will only recognize 256MB, max). To my dismay, the BIOS was only reading 192MB of the available system RAM. These units have 64MB of RAM soldered onto the motherboard, and originally this machine had a 128MB module installed as an add-on, making 192MB total. When this number didn’t improve after I upgraded it to a 256MB module, I looked online for the cause. I eventually found http://toughbook.wikispaces.com/cf-m34 and noticed other people having the same issues. I then ordered a 512MB module to max it out at 256MB. It’s a waste of half a 512MB module, but the price was cheap, about the same cost as the 256MB module on eBay.

After maxing out the system RAM, I hoped the web browser I was trying to get working would fit entirely in RAM and wouldn’t have to swap all the time. Unfortunately, it was still sluggish so I tried zram.

Linux-3.0 is installed on this machine, and lucky me, it includes the zram driver. This allows the creation of a compressed RAM disk for storing just about anything you want. One good way to make use of it is to create a swap partition on it. Yes, it’s confusing. This method creates a swap partition that resides within a compressed portion of memory, which is almost like adding more ram for free. Dump this script into /usr/local/bin/zram_swap_activate, and add it to be executed by /etc/rc.local(don’t forget to give it executable permissions!):
#!/bin/bash
# Improved compressed swap activation with new zram support.
# It also does not activate if something went wrong when trying to
# modprobe zram. It scales to however many disks(up to 9) zram
# is instructed to create at boot. It collects the value of the maximum
# system memory and divides it, and applies the number in bytes to the
# zram size.
for i in /sys/block/zram?/disksize; do
if [ -e $i ]; then
echo $[`free -b | grep Mem\: | tr -s " " | cut -f2 -d " "`/4] > $i
fi
done
for i in /dev/zram?; do
if [ -e $i ]; then
mkswap $i
swapon -p 10 $i
fi
done

Add ‘zram num_devices #’ to /etc/modules, where # is the amount of /dev/zram# devices you want. I chose to just create 1, and my script creates a 64MB zram device at /dev/zram0.
This added a bit more space to work with before Linux has to swap to a physical disk. It’s a tiny bit slower than actual RAM(compressing/uncompressing the data on the fly adds a bit of overhead), but it works great.

Things were still very sluggish, so I purchased an IDE -> SD converter and an 8GB Transcend SDHC card. I transferred the disk to the SD card by a IDE -> USB cable and card reader via DD, so it’s bit-exact. Then I installed the IDE -> SD converter and SDHC card and booted up. The performance difference is massive compared to the old spinning disk. Plus, the battery life is significantly improved. Swapping is also much faster. I am using a journal-less EXT4 fs on this SD card with noatime to keep it from writing too often to preserve the SD card’s life.

  Old post  November 10th, 2011 - CF-M34: Basics

The CF-M34 I’m restoring is a combination of the better parts of two(identical model number) units. They are both CF-M34 ‘J’ models with 400MHz Pentium III cpus. They contain the same integrated hardware, so replacing worn parts was easy. I started with the monitor, as the base unit I was intending on being the final product had a bad monitor, but a good palmrest, touchpad, etc. I then ripped out the original MiniPCI modem and the telephone connector and replaced it with a MiniPCI 802.11b,g wireless card. I ran an antenna(consisting of primary and secondary red and blue wires) through to the monitor and taped it to the inside, out of the way of the CFL and LCD.

  Old post  November 10th, 2011 - Toughbook Project

I am currently working on upgrading/restoring a Panasonic Toughbook CF-M34. I will be updating this page with my notes, and will eventually combine all of them into a single document.

  Old post  September 7th, 2011 - Light-up d20 by ThinkGeek

Bought a light-up d20 from ThinkGeek recently. It’s a jumbo die that lights up and flashes when you roll a 20. It works very well and flashes pretty brightly, boosting your ego when you roll a critical hit. The only con is that the edges are a bit sharp so if you play on a glass table, make sure you roll onto the mat.

  Old post  May 12th, 2011 - New Phone

Picked up a Samsung Nexus S.
It’s pretty cool.

  Old post  May 10th, 2011 - It’s my blog…

…and I tensed howevers I wanting.

  Old post  May 10th, 2011 - This is my blog…

…and I post whatever I want. Too bad I usually don’t have anything to post about. Hey! Since this is a blog, I’ll post that I had a cheeseburger today.

And fries.

  Old post  April 1st, 2011 - New Update

Most of my old projects have been obsoleted by various other things I’m involved with these days. I am moving the Osirion text to the official site now(http://osirion.org), and my Tremulous stuff can be found by entering the tremulous/ directory on this site. I might update this page again in the future, but it’s doubtful.

  Old post  July 6th, 2009 - Site Updated

I’ve changed quite a bit of the site, including adding this news update system. It is based on WordPress. I’ve also given all the pages some new CSS to make the text look nicer.