Enter the HTC Desire

A little while back I finally caved in to all the peer pressure and got my second Android phone, the HTC Desire. It’s faster than the HTC Hero, which I’ve been using sofar. My girlfriend wanted that one, so it’ll have a good home :) and I can keep it updated to the latest firmwares.

One of the first things I did was root it with Unrevoked – a nice one-stop-shop rooting tool, which also installs the Clockworkmod recovery, through which you can then install other ROMs.
(Why did I root it? Because I want full access to the phone. I want to use it for whatever I want, not whatever HTC wants me to do with it.)

After that I stuck with the stock ROM for a (rather short) while, with the Sense shell. This did get on my nerves after a while, since I got used to Launcher Pro and a bunch of other programs on my HTC Hero, and I did want the get some APP2SD aswell, so I could install more applications. Since I had good experience with VillainRom‘s FroydVillain (for the Hero), I looked there and found SuperVillain, which is a Sense rom, but without Rosie (the Sense launcher) and with some extra things thrown in.

Unfortunately, there wasn’t much development on this ROM, and I went looking for another after a while, and stumbled over Richard Trip’s DeFrost ROM, which is based on CyanogenMod with some extra goodies in it.

What can I say about DeFrost? It’s very good, comes with a built in OTA updater, and there’s a big bunch of users of the rom – so most problems you will encounter are already tackled in the (huge!) XDA thread linked above. thread.

One of the last modifications I did to my Desire was to remove the security lock that HTC put in it (also known as making the phone S-OFF). In short, this security lock makes it so that you cannot write to the flash memory (NAND) of the phone.. The initial rooting through Unrevoked already makes it so that you can install ROMs through the recovery (since it doesn’t check the signature at that point), but not that you can make runtime modifications to the system:/ partition. For that, you have AlphaRev, which consists of a bootable CD image. It’s basically download the image, burn it, boot it, plug in your phone and follow the on-screen menus. Easy and straightforward, and it worked like a charm here.

Ever since, I’ve been a happy camper with the Desire ;)

In Memoriam

Macchiatto - In Memoriam

Today we had to put Nero to sleep. Unfortunately he caught an infection, for which we treated him, but it was too late. He never really got better, and we couldn’t see him suffer any more. We’re gonna miss him very much, our little pooter.

May you rest in peace, Nero. ° August 2006 – † 5th Nov 2010

Hello there, Froyo (Android 2.2)

Google released Android 2.2 – codename Froyo (for Frozen Yoghurt), giving Android users a nice speedboost.

Unfortunately, HTC decided they’re not going to release Froyo for the trusty old HTC Hero. And since I have one of those, I’m basically screwed.

Luckely, Google also releases the source code of Android, known as the Android Open Source Project (AOSP in short). And the fine folk at CyanogenMod and VillainROM took that source and baked it into something that works on our Hero’s: FroydVillain (1.5). A damn fast, optimized for the Hero ROM.

The downside? This is a naked Android ROM, so no HTC Sense goodies. There are plenty of replacements in the Android Market though, like LauncherPro (Plus) with it’s new widgets, Dolphin HD browser, and many more.

Android statues at Googleplex

I’ve been running it since and I’m very happy with it!

phptelemeter 1.36 beta 1 released

I’ve released phptelemeter 1.36, beta 1. Beta because it doesn’t have everything yet that I want, but it needed to get out there due to lots of changes by Telenet.

  • Bumped required php version to 5.0.0
  • Replaced nusoap library with SoapClient class that comes with php5 (feature request: 2948630)
  • Dropped the xmlparser library, it’s no longer needed for telemeter4tools
  • Updated gpl2 license link
  • Fixed telemeter_web parser after Telenet updates.
  • Fixed telemeter4tools parser after API updates.

As per usual, you can download it from SourceForge.

Android 2.1 (Eclair) on the HTC Hero…

I’ve bought an HTC Hero a while back. Rooted it too, so I could edit the sms database. Loving the phone.

Then HTC promised us (owners) an upgrade from Cupcake (Android 1.5) to Eclair (Android 2.1), scheduled for March 2010. Since Eclair has a ton of additional features and bugfixes, this was a biggy.

Then HTC postponed it to beginning of April. End of April. May. June.
On the 4th HTC started rolling out the update for Asia, and we still had to wait in Europe. That’s when I got fedup with waiting.

Thanks to the wonderful guys over at XDA-Developers and this Complete Newbie Guide to Install a Custom Rom, I now have VillainRom10 installed, which is basically a repackaged official 2.1 rom from HTC.

I had to use the GoldCard method to downgrade my Hero (specified in the Guide – worked perfectly with a Sandisk 2gb SD card), and install the drivers from this thread for the RUU (Rom Update Utility) to find the Hero in bootloader mode. Other than that, it’s a smooth sailing.

After using the phone now for two days, it feels mightily fast, snappy… it’s a total new phone.

Gigantic Android, Donut, Cupcake and Eclair at the GooglePlex

Goodie!

Running Linux on an Apple Macbook 2,1

This page documents my attempts (and successes!) to get Linux fully working on an Intel-based Apple MacBook, 2007 model.

Note: I no longer have this device.

DISCLAIMER: This information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. If you fry your system by using this information that’s _your_ problem. Not mine. I accept no responsability for what happens with this information whatsoever.

PCI Specs

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:07.0 Performance counters: Intel Corporation Device 27a3 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
01:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 22)
02:00.0 Network controller: Atheros Communications Inc. AR5418 802.11abgn Wireless PCI Express Adapter (rev 01)
03:03.0 FireWire (IEEE 1394): Agere Systems FW323 (rev 61)

Here’s a detailed pci listing.

Linux 2.6.x kernel

The latest 2.6 kernel is: 2.6.39.4.
Here’s my 2.6.26 kernel configuration. This is actually the stock debian kernel.

USB

Hardware: this is the Intel Corporation 82801G (ICH7 Family) USB chip.

USB worked out of the box by loading the following modules:

  • usb-uhci (USB 1.x support)
  • ehci-hcd (USB 2 support)

It is required to install the udev package.

10/100/1000 MBit ethernet LAN

Hardware: this is a Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller chip.

Works out of the box, using the sky2 module.

Soundchip

Hardware: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller

Works out of the box with the ALSA module called snd_hda_intel module.

VGA Framebuffer console

Hardware: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller

Since the inception of kernel-mode-setting (KMS), no additional work is needed to get
a decent framebuffer console. Load the i915 module, and you’re set.

VGA X.Org

Hardware: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller

To make it working just set your video driver to intel:

		Section "Device"
			Identifier	"Generic Video Card"
			Driver		"intel"
		EndSection

With modern Xorg versions, you don’t even need to specify this anymore.

CDRW/DVDRW

Hardware: HL-DT-ST DVDRW GWA4080MA.

Works out of the box, using libata.

Bluetooth

Hardeware: Apple, Inc. Bluetooth HCI MacBookPro.

Works perfectly with the bluetooth and btusb modules.

Debian users might want to install the bluetooth package.

Harddisk

SATA drive. Works out of the box, if you enable the ata_piix module.

DMA is automagically enabled. I use hdparm to set an extra parameter: hdparm -F /dev/sda

Explanation:

  • -F: set security-freeze (so that nothing can accidentily lock your disk with a password)

For Debian; check the hdparm package.

Speedstep

You need this if you don’t want your CPU to eat your batteries empty. It’s included in the kernel config.

It works perfectly after loading the acpi_cpufreq and any of the cpufreq- modules.

You can either install the cpufreqd daemon, or use the cpufreq_ondemand module (which modulates the speed by requirement).

For Debian, check the cpufreqd or powernowd packages.

Wireless Lan

Hardware: Atheros Communications Inc. AR5418 802.11abgn Wireless PCI Express Adapter

Works out of the box with the ath9k kernel module.

Firewire

Hardware: Atheros Communications Inc. AR5418 802.11abgn Wireless PCI Express Adapter

This also works pretty much out of the box. The kernel module to use is ochi_1394.

Infrared

Currently not supported by the linux kernel. Possible patch: is here. Untested

Multimedia Keys

This laptop has several function keys which allow for the changing of the volume, brightness, …

After installation of pommed, these keys work perfectly.

Debian users can install the pommed and gpomme packages.

(Userspace) Software Suspend

Works: suspend to ram (s2ram). I’m using the following parameters: -f (force) -p (do VBE post) -m (save/restore VBE mode)

Doesn’t work: suspend to disk (s2disk,s2both): causes a full system freeze, need to dig into this further.

iSight webcam

Works with kernel supplied driver.

You need to extract the firmware first from the Mac OS X driver, use isight-firmware-tools. Debian users can use the isight-firmware-tools package.

Touchpad in console

You can use the touchpad with gpm, using the exps2 driver.

Touchpad in X.Org

This is an AppleTouch touchpad. You can use it with this driver.

Add the following to the /etc/X11/xorg.conf file:

Section "InputDevice"
        Identifier      "AppleTouch"
        Driver          "synaptics"
        Option          "AccelFactor"           "0.015"
        Option          "BottomEdge"            "310"
        Option          "Device"                "/dev/psaux"
        Option          "FingerHigh"            "30"
        Option          "FingerLow"             "20"
        Option          "HorizScrollDelta"      "0"
        Option          "LeftEdge"              "100"
        Option          "MaxDoubleTapTime"      "180"
        Option          "MaxSpeed"              "0.88"
        Option          "MaxTapMove"            "220"
        Option          "MaxTapTime"            "150"
        Option          "MinSpeed"              "0.79"
        Option          "Protocol"              "auto-dev"
        Option          "RightEdge"             "1120"
        Option          "SendCoreEvents"        "true"
        Option          "SHMConfig"             "on"
        Option          "TapButton2"            "3"
        Option          "TapButton3"            "2"
        Option          "TopEdge"               "50"
        Option          "VertScrollDelta"       "25"
        Option          "VertTwoFingerScroll"   "true"
EndSection

Here’s my complete xorg.conf file

It’s advisable to run syndaemon after starting X, to prevent accidental taps while you’re typing.
example: syndaemon -i 2 -t -d

Debian users can install the xserver-xorg-input-synaptics package.

Links

Multiseat on Debian

Since I have a rather well-scaled desktop PC (nothing really fancy by today’s specs, but it’s underused as it is), and my gf sometimes wants to use it, and sometimes we both want to use it at the same time, I decided to turn it into a multiseat configuration.

What’s a multiseat? Basically you connect a second set of input peripherals (keyboard, mouse) and a second screen (and if necessary a second video card) and reconfigure it to act as a separate pc.
And with Linux, you just can, without a lot of trouble.

There are some different multiseat setups: those that run separate X servers (one per display), and those that run one X server for all displays and then run a nested server on top of that to split out the actual displays. The ‘problem’ wit the latter is that you usually don’t have any 3D acceleration left, though if you use Xephyr these days that seems to work aswell.

I opted for the first option.

My hardware (that matters for this setup):

  • Mice: 2 simple Logitech usb mice
  • Keyboards: 2 usb keyboards (one Cherry Cymotion Linux Master & one labtec Ultraflat)
  • Graphics: an onboard ATI Radeon HD 3200 (this is part of the AMD 780 chipset) video chip on my Asrock motherboard (was originally disabled and enabled for this multiseat setup) and an addon ATI Radeon HD 4850 card (with an RV700 chip).
  • Screens: two screens – in this case, one 20.1″ Viewsonic VX2025wm and one 22″ (newly purchased) LG w2253TW

Notes:

  1. It is advised to use chips that can be driven with the same driver for a multiseat setup!
  2. If you use an onboard chipset (like I do), you’ll need to change the boot order so that this chip is actually used as the primary device, otherwise it won’t be initialised correctly.

Originally I had the ATI binary driver fglrx installed, but this does _not_ play well with a multiseat setup. The initialisation of the second card causes the system to hardlock.
Since this driver doesn’t work, I went for the xf86-video-ati driver, which is completely opensource, and in combination with a recent kernel allows for kernel mode setting. You do need the firmware for the card, usually found in the firmware-linux packages of your favourite distribution.

So, the works:

Requirements

  1. Get a spankingly fresh kernel. 2.6.33 at least, preferably newer. Compile it with KMS support enabled. Note that when you enable KMS support, you’ll lose your console unless you compile in fbcon, but I advise against this, as this doesn’t seem to play well with a multiseat setup.
  2. Install the linux-firmware package or get the necessary firmwares for your cards (to get 3D acceleration)
  3. Get a decently fresh Mesa (7.7 branch)
  4. Lastly, get a mjummy fresh xf86-video-ati driver.

Originally, I compiled all these and installed them over the existing binaries in /usr, but fortunately my favourite distribution Debian has the necessary components in Sid and Experimental. these days.

Xorg.conf changes

After everything is installed, you need to modify your xorg.conf file.

ServerFlags

Section "ServerFlags"
        Option      "DefaultServerLayout" "seat0"
        Option      "AllowMouseOpenFail"  "true"
        Option      "AutoAddDevices" "false"
EndSection

The AutoAddDevices line is important, otherwise we can’t map the devices to the right seat.

The actual graphic chips/cards:

Section "Device"
        Identifier  "ATI RadeonHD 4850"
        Driver      "ati"
        BusID       "PCI:2:0:0"
        Option      "Int10" "off"
EndSection

Section "Device"
        Identifier   "ATI RadeonHD 3200"
        driver       "ati"
        BusID        "PCI:1:5:0"
        Option       "Int10" "off"
EndSection

Int10 off is important here, otherwise the second card will fail to initialise.
Do not forget to change the PCI identifiers! They probably won’t match my setup. You can find them by using lspci, for instance on my setup:

lspci | grep  "Radeon HD"
01:05.0 VGA compatible controller: ATI Technologies Inc Radeon HD 3200 Graphics
02:00.0 VGA compatible controller: ATI Technologies Inc RV770 [Radeon HD 4850]

So you can see that the HD3200 is on address 1:5 and the HD4580 is on address 2:0.

The monitors (nothing fancy)

Section "Monitor"
        Identifier   "Viewsonic Vx2025wm"
        Option      "DPMS"
EndSection

Section "Monitor"
        Identifier    "LG W2253TW"
        Option       "DPMS"
EndSection

Screen section (mapping monitors and cards)

 
Section "Screen"
        Identifier        "Screen0"
        Device           "ATI RadeonHD 4850"
        DefaultDepth   24
EndSection

Section "Screen"
        Identifier        "Screen1"
        Device           "ATI RadeonHD 3200"
        DefaultDepth   24
EndSection

Next, the ServerLayout sections, one per seat:

Section "ServerLayout"
        Identifier     "seat0"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerLayout"
        Identifier     "seat1"
        Screen      1  "Screen1" 0 0
        InputDevice    "Mouse1" "CorePointer"
        InputDevice    "Keyboard1" "CoreKeyboard"
EndSection

Next, the input devices:

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "evdev"
    Option         "Device" "/dev/input/by-path/pci-0000:00:12.1-usb-0:3:1.0-event-kbd"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "us"
    Option         "XkbRules"   "xorg"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "evdev"
    Option         "Protocol" "ExplorerPS/2"
    Option         "Device" "/dev/input/by-path/pci-0000:00:13.0-usb-0:3:1.0-event-mouse"
EndSection

Section "InputDevice"
    Identifier     "Keyboard1"
    Driver         "evdev"
    Option         "Device" "/dev/input/by-path/pci-0000:00:12.2-usb-0:3.1:1.0-event-kbd"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "us"
    Option         "XkbRules"   "xorg"
EndSection

Section "InputDevice"
    Identifier     "Mouse1"
    Driver         "evdev"
    Option         "Protocol" "ExplorerPS/2"
    Option         "Device" "/dev/input/by-path/pci-0000:00:12.2-usb-0:3.2:1.0-event-mouse"
EndSection

You need to change the device paths to match the devices you want, either by checking /dev/input/by-path/ or by /dev/input/by-id/. The benefit of using by-id is that if you replug your devices, they’ll still be mapped correctly. Since I have devices with the same ID, this didn’t work for me.

All these changes sofar should allow you to manually start up the X servers with the respective keyboard/mouse/screen settings. You should be able to test it with these commands:

/usr/bin/X -br -nolisten tcp -layout seat0 -sharevts \ 
      -novtswitch -isolateDevice PCI:2:0:0

or

/usr/bin/X -br -nolisten tcp -layout seat1 -sharevts \ 
      -novtswitch -isolateDevice PCI:1:5:0

KDM changes

Now, since I want both the X servers to be available at boot time, and I’m using KDE anyway, I went with KDM.

In the [General] section, look for a line reading:

StaticServers=:0

change it to:

StaticServers=:0,:1

Also, change:

ReserveServers=:1,:2,:3

to:

ReserveServers=:2,:3

Next, look for the [X-:0-Core] section, and copy the entire block, creating a second block with the section name [X-:1-Core].

In the [X-:0-Core] section, look for the line

ServerArgsLocal=-br -nolisten tcp

and change it to

ServerArgsLocal=-br -nolisten tcp -layout seat0 -sharevts -novtswitch -isolateDevice PCI:2:0:0

In the [X-:1-Core] section, look for the line

ServerArgsLocal=-br -nolisten tcp

and change it to

ServerArgsLocal=-br -nolisten tcp -layout seat1 -sharevts -novtswitch -isolateDevice PCI:1:5:0

One KDM restart later (/etc/init.d/kdm restart) you should have two X servers running, both on their respective screens!

Last but not least, kudos to WKPG wiki for the helpful article ;)