Debian
2012 DAViCal User Survey
Back in 2005 I saw that a new open standard was being developed for calendaring, and I thought it would be a great idea to implement it. Nothing too complicated - just a really simple implementation...
And thus was born the "Really Simple CalDAV Store".
A few years later, when I got about 90% of the way through implementing the base CalDAV specification, I realised that "Really Simple" and "Calendar" don't actually happen in the universe we inhabit, so after much deliberation the project got renamed to "DAViCal".
Now, in 2012, DAViCal is one of the leading CalDAV servers available, and I spend quite a lot of my time helping people who want to use it. Earlier in the year I was looking at the web server logs and noticed that in a four week period (i.e. as far as my logs go back) there had been several thousand unique sources of hits on the URL that DAViCal uses internally to find out what the latest version is when you browse to the '/setup.php' page.
This got me wondering how many DAViCal installations there are out there, and how big they might be, and so forth but since DAViCal is free open source software, there isn't a simple way to answer those questions.
I thought that it must be time to run a survey of DAViCal users everywhere to try and find out what the scale of the penetration is. How big (and how small) are the installations running DAViCal? What... Well: lets save the questions for the actual place where you can put answers :-)
So click here and take the survey right now... you know you want to :-)
CeBIT 2011 in (overdue) review
The German Linux Magazine runs a sponsored an "Open Source Lounge" at CeBIT each year. Last year I put in a proposal for DAViCal and it got accepted! With some airfare support from InternetNZ I got to showcase my Free Software project at the largest IT trade fair in the world.
If you have an open source project to promote I can't recommend this highly enough. Below is a review of my experience at CeBIT early this year. This is long overdue for posting, and I'm prompted now because submissions are now open for the Open Source Project Lounge at CeBIT in 2012. Apply now.
The Obligation to Vote

Could you not trust this man?
I've been what is commonly termed a 'floating' voter for most of my voting life. I imagine the politicians themselves might term people like me 'floaters', with an eye to the scatalogical implications. After all, their livelihoods are on the line!
So, after reading this blog post I thought I might as well also share my personal voting plans with the world.
Teaching our children to lie
My son is being encouraged to lie.
It's a fairly regular occurrence around here, and I'm sure you've seen it yourself. It's that checkbox on the website you're visiting where you say "Yes, I am over X years of age".
Switching desktop backgrounds in XFCE4
One of the things I liked about Gnome 2 was the ability to run a background 'slideshow' defined in an XML file with a list of background files to give me a change of scenery from time to time.
Switching to XFCE4 I can't seem to find a simple way to do that, but the ingredients are all there:
- I can set the background image to a list
- There's a handy-dandy xfdesktop command-line utility I can call to switch desktops
What's missing from the Desktop Settings is a setting for "switching background ever N minutes", which is kind of odd to not have, given the list thing being there - without my script it's only going to change every couple of weeks when I log in, or something. Not nearly often enough for me!
There's lots of stuff on the internet saying "Just run xfdesktop --reload in a cron job", but this does not work for me, since cron is running with a different environment, and so xfdesktop doesn't know where the X server is and doesn't have the necessary XAUTHORITY and DISPLAY settings.
If it was just DISPLAY that was needed it would be easy enough to set that in the crontab and be done with it - after all it doesn't change very often. XAUTHORITY is harder, since on Debian systems (and presumably others too) it has a random component in the name of a directory which lives in a directory without read permissions.
I solved it with this script, which steals those values from the environmnt of xfce4-panel, which will be running already:
#!/bin/sh
#
PANELPID="`/usr/bin/pgrep -U ${LOGNAME} xfce4-panel`"
stealEnvironment() {
tr '\000' '\012' < /proc/$PANELPID/environ | grep -a "^$1=" | cut -f2- -d=
}
export DISPLAY="`stealEnvironment DISPLAY`"
export XAUTHORITY="`stealEnvironment XAUTHORITY`"
/usr/bin/xfdesktop --reload
So now I have my background image switching among my favourite photos again, and my Desktop is effectively back as it was a week ago.
In which an obscure conundrum is exposed
Some time ago someone reported issues accessing cpan.catalyst.net.nz a little peculiar and puzzling at the time, but we put it down to some weird DNS cache issues and moved on.
Turns out the problem is a DNS one, though not what we were thinking at the time:
$ host -t aaaa mail.catalyst.net.nz mail.catalyst.net.nz has IPv6 address 2404:130:0:10::40:0 2404:130:0:10::40:0 == 2404:0130:0000:0010:0000:0000:0040:0000 $ echo $((0x24)).$((0x04)).$((0x01)).$((0x30)) 36.4.1.48
So somewhere, some crappy device is getting a bunch of bytes back when it asks DNS for the address of something, and then it's taking the first four of them and calling that the IP address.
Kudos to David Clarke for spotting the actual problem.
Status: Busy
I've been very quiet on here for a few months, and the reason is (of course) because I've been doing other things. No surprise there, I guess!
What I've been doing, first of all, is writing aCal, an Android CalDAV client with a lot of help from Chris Noldus. It's probably fair to say that Chris did most of the heavy lifting while I learned Java, did most of the UI & graphic design, and the low-level CalDAV synchronisation and geeky calendaring code. This is now available in the Android market for NZD$2.00 to help us fund further development and in a few days (or a couple of weeks) I'll get the source code up somewhere public (probably Gitorious) and it will be licensed GPLv3... When I get a moment - although refer to title :-)
DAViCal 0.9.9.4 released
DAViCal 0.9.9.4 is now available, along with AWL 0.46.
This is a recommended upgrade with a focus on stability and reliability.
Release notes are on the wiki at http://wiki.davical.org/w/Release_Notes/0.9.9.4.
Most of the changes are subtle: fixes to small bugs or adjustments to correctness in respect to standards. In particular there were some errors in handling of various requests for addressbook data, and the support for WebDAV synchronisation is updated to draft -04 of the specification.
One notable addition is the new '/feed.php/username/calendar/' URL which will provide an Atom feed of the events added to a calendar. This is pretty experimental at present, but any problems with it won't affect the rest of DAViCal so I felt it safe to include in a stable release series.
I've also created a DAViCal Announce mailing list which in the future will be the primary place that notifications like this are sent to, so those of you who are subscribed here but really only want to see announcements should subscribe to that list.
In a few weeks time (well, when I remember, I guess :-) I want to move the DAViCal General mailing list to a lists.davical.org mailing list. As of today I've moved the DAViCal developers mailing list there already (pretty easy since it did not involve moving servers) but the old address for that one will continue to work indefinitely.
Also, as of yesterday, the sourceforge.net project name for DAViCal finally got changed, so DAViCal is now at http://sourceforge.net/projects/davical - yay!
At the end of January I will be presenting about Calendaring and Free Software at Linux.Conf.AU 2011 in Brisbane - I hope you've all got your tickets already, because there isn't much time left now :-)
Something a little different
During my recent trip to Massachusetts for CalConnect XIX I passed back via New York, surfing a few nights on the couch at the Washington Cube Garden1. This was just enough time for my new Davis VantagePro2 to arrive by UPS ground (phew!) causing me much consternation, as the box was about twice as wide as I expected it to be.
On opening it I discovered that the reason for the size was the physical dimensions of the rain gauge, leading me to realise that I had actually bought exactly what I wanted: a high quality weather station. Also leading me to wonder how the hell I was going to get it halfway around the world with me the next day.
Unfortunately that extra wide carrying case was in no way going to fit inside my suitcase. Fortunately it came with a handle. And those wonderful people at Air New Zealand gave me a Koru Gold upgrade for a 50th birthday present, so it was time to put it to the test...
Finally: DAViCal 0.9.9.2 is released
Finally, six months after releasing 0.9.9, and about three months after when I would have preferred to have released it, I've released version 0.9.9.2 of DAViCal. In fact most of the changes were included in 0.9.9.1 which was more quietly released last week to a select audience of keen testers. They found a few bugs, and these are resolved and so 0.9.9.2 is the release I hope people will be able to find useful for some time into the future.
In a couple of weeks, once it's been in Debian Sid for a respectable time, I hope to ask for a freeze exception so that we can include this version into Debian Squeeze when it is released. Given that I missed the cut by a hair or two for Lenny so there is no DAViCal currently in a Debian release I think I can be hopeful on this count. Certainly this fixes a few issues with 0.9.9 which will cause annoyance if they haunt me for the next few years :-)
As well as the rafts of bug fixes and such, the exciting new feature added in 0.9.9.2 is the first support for CardDAV. At this point you need to create the addressbook collection yourself, and there is no import facility, but at least you might be able to use DAViCal to store your contacts.
Enjoy!
Changing an old habit
I'm a keen amateur photographer and have been since I was at school. Of course back then it involved smelly chemicals, strange lights and dark rooms. The expense and hassle of film eventually did it in for me and in 2000 I bought my first digital camera. After a series of increasingly sophisticated devices, back in 2007 I bought a Nikon D80 and soon thereafter I discovered that you can do things with raw camera files that have some analogies to the darkroom processing of my youth.
Making my laptop quiet
A few days ago I talked about how noisy my new Dell Studio 15 was but I can now report back with the beginnings of a solution to that problem, and it doesn't appear to be ACPI related.
The first clue I needed was that if I switch to the proprietary fglrx drivers for the Radeon the fan quite quickly drops off to a much more reasonable level. It seems the fglrx drivers have issues, however, in particular I get big black patches on my screen. This video corruption happens especially in Firefox, but sometimes in other applications as well. They also appear to screw up my suspend/resume, which is probably even more annoying to me.
The second clue that I needed was that Radeon power management support has only just made it into recent kernels. Thanks to Michael Kirkland for providing me with both of those clues :-)
Looking under /sys/class/drm/ I find a whole bunch of stuff, but in particular there are /sys/class/drm/card0/device/power_method and /sys/class/drm/card0/device/power_profile.
Looking through the kernel source code I can see that power_profile can be set to low, mid, high, auto and default, while power_method can be set to either dynpm or profile.
Trying out all of these values, it seems I get the quietest result with the profile method and either the low or mid profile. The dynpm method is nearly as good, and I would think it should really be the default for a 'Mobility' chipset. From the detailed benchmarking that Phoronix did I wonder if it shouldn't be the default for everyone.
For myself, I see some small 'tearing' artifacts occasionally when running with the low profile. These disappear when I run with the mid profile, and since that seems to have pretty much the same temperature (and noise) results I'll go with that one. Though the laptop often does still make more noise than I would prefer it to, it is no longer annoying everyone in the room.
Not unexpectedly this seems to have a huge impact on power use, too. It appears that the laptop should now give me around 4.5 hours when I do everything I can think of to lower the power use, whereas before it was more like 2.5 hours.
Now I guess I can get back to hacking on DAViCal...
I guess I should have known better
Really, I should have known better than to buy myself a rather 'bleeding-edge' laptop. I suppose I've been lucky with my last couple of laptops and was thinking that pretty much everything works on Linux. Or maybe I'm being picky, because in fact pretty much everything does work on my new Dell Studio.
I bought this laptop mainly because it has a 1920x1080 screen, without being a 17" monster. I had such a monster about four laptops ago (an enormous Sony Vaio weighing in at around 5kg and with a 1hr battery life) and it was an disaster: lots of weird proprietary stuff that never worked, like the external speakers in the docking station. But I loved that screen right up until the day Fraser threw a pair of scissors into it.
With the advent of mass-market 1920x1080 screens I've been waiting for them to arrive in laptops at a reasonable price, and the availability of this screen in a few possible laptops seemed to me to be that point.
It's a Dell Studio 15, and as well as the nice screen, it comes with a new Intel i7 Quad Core CPU, 6G RAM, 640G hard drive and a Blu-ray drive. While there are a few similar models around this one seemed to have the best mix of features-for-weight-and-price, so I bought my first Dell.
I built a USB key with the latest Debian Installer from Squeeze and installed that and everything came up pretty well. I had to use the broadcom-sta driver for the wireless, since the BCM 43224 is not (yet) supported by the free b43 driver (though from looking the mailing list people seem to be working on it, and it looks like it might not be too far away).
Everything seemed good. X came up on the (georgeous) screen. I don't care too much about 3D performance, but it was nice to note that the ATI 5000 series is expected to have full support as soon as it's integrated into the right places - it seems the code is written, and public, it just isn't incorporated into the 'radeon' driver quite yet. The fact that ATI is nowadays a free-software friendly company was one of the reasons for choosing this, in preference to an NVidia-based laptop.
But it seems that it isn't all roses. The fan in the laptop seems permanently on, and not on, in a quiet-just-barely-audible way, but ON, in an 'IN UR LAPTOPZ KOOLIN UR P0RCESSAZ' kind of a way. Too damn noisy for me to concentrate in a quiet room.
I've investigated what's going on, and it seems likely there are some ACPI misunderstandings happening. Some googling and some pecking around in /sys makes me wonder if the laptop expects some kind of configuration choice between favouring Active cooling and Passive cooling, and it's defaulted to the first one. Perhaps you get better benchmarks that way.
Linux ACPI also seems to only half understand it, it has two thermal zones, and one of them always appears with 0 temperature. I can see set points for the fans, but have no control over them. In particular this got me out reading the ACPI 4.0 specification, and it explicitly mentions this choice of favouring 'Active' vs 'Passive' as being done by configuring the passive trip point setting to a higher value than the low & high active trip points.
In the ACPI 4 spec (page 409) it says:
To implement a preference towards performance or energy conservation, OSPM can request that the platform change the priority of active cooling (performance) versus passive cooling (energy conservation/silence) by evaluating the _SCP (Set Cooling Policy) object for the thermal zone or a corresponding OS-specific interface to individual devices within a thermal zone.
This laptop is showing 'passive' at 95000 millidegrees celsius, and 'active' at 55000 / 75000 so right in line with the suggestion.
However I don't see any way in Linux to change these trip point values, and in any case I'm not convinced the laptop is actually obeying them at all. It should be that if I do nothing on the laptop for a while the temperature would surely drop below 55 degrees celsius. Surely a modern laptop will sit at under 40 degrees when it's quiescent, and the temperature sensor that does show me something sits at around 30 degrees in this too, 26.8, to be overprecise. That one doesn't budge either.
Looking in /sys/ I can't for the life of me find a way to set that cooling policy, and when I disassemble the DSDT it looks like a noop...
Thinking that perhaps there was a newer BIOS, I looked at the Dell site and found there was one. Great! Investigating even further, it seems Dell hardware has some interesting capability via libsmbios and some utilities which will let me install my BIOS from a Linux system... even better!
Linux is a second-class citizen though, and when I look for the Dell BIOS Hdr file I need there is no version of the file for this laptop - let alone the current BIOS version. And when I download the BIOS from Dell's website and unzip the first layer of packaging I find that both of the files inside will only run on Windows.
I added a FreeDOS boot stanza to Grub 2 in order to discover this, also discovering in the process that this is not well explained, and I could not find how to do it on the FreeDOS or Grub2 websites, so in passing, here is what I added into /etc/grub/40_custom :
menuentry 'BIOS Flash 1558 A09' --class os {
set root='(hd0,msdos1)'
linux16 /boot/memdisk
initrd16 /boot/1558_A09.img
}
Which certainly does boot FreeDOS from Grub2, into the image built from the 8M FreeDOS base image, and which I called '1558_A09.img' because that seems to be one of Dell's reference numbers for this model / BIOS version.
So still no BIOS update for Andrew, it seems, and the laptop is probably going to continue to be noisy for some time. Possibly forever.
Suspend/Resume works though. Kernel mode-setting for the ATI Radeon Mobility HD 5450 (or whatever it is) seems to work. Building kernels seems to work. The Blu-ray drive seems to work, at least as far as reading CDs - just because I got a laptop with a "Full HD" screen doesn't mean I watch movies on it: those pixels are for programming on! In any case, after reading the literature of pain about playing Blu-ray disks on Linux I'm convinced that we won't be shelling out to buy one any any time soon.
After a bit more frustration I did manage to get the BIOS installed, using the hack I found here of running the Windows BIOS update under Wine and copying the BIOS file out of the temp directory while the error message is displayed. I could then download a random DOS-installable Phoenix BIOS to get copy of phlash16.exe and put those two files on the FreeDOS image I created earlier. Finally I was able to put that learning about how to boot FreeDOS from Grub2 to good use!
Unfortunately, having jumped through all of those hoops (including the frustration of trying to build and use Dell's firmware-extract tools on a Debian system), the fan continues to grind away at annoying volume, with no way that I have been able to find to control it, and the temperature sensors also seem wrong, since one doesn't budge from 0 and the other doesn't budge from 26800.
During boot I get a bunch of error messages, like:
[ 1.049936] \_SB_.PCI0:_OSC invalid UUID
[ 1.052202] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[ 1.052210] pci 0000:00:1c.0: PME# disabled
[ 1.065228] pci 0000:07:00.2: PME# supported from D0 D1 D2 D3hot D3cold
[ 1.065237] pci 0000:07:00.2: PME# disabled
[ 1.079086] Unable to assume PCIe control: Disabling ASPM
[ 1.086412] HEST: Table is not found!
[ 1.249906] ACPI: Fan [FAN0] (off)
[ 1.249959] ACPI: Fan [FAN1] (off)
[ 1.250093] [Firmware Bug]: ACPI: ACPI brightness control misses _BQC function
[ 1.259118] acpi device:02: registered as cooling_device2
[ 1.262132] thermal LNXTHERM:01: registered as thermal_zone0
[ 1.262139] ACPI: Thermal Zone [TZ00] (27 C)
[ 1.262561] thermal LNXTHERM:02: registered as thermal_zone1
[ 1.262571] ACPI: Thermal Zone [TZ01] (0 C)
[ 1.262598] ERST: Table is not found!
[ 2.769664] i801_smbus 0000:00:1f.3: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[ 2.769670] ACPI: resource 0000:00:1f.3 [io 0x1840-0x185f] conflicts with ACPI
region SMBI [bus 1840-184f pref window disabled]
[ 2.769672] ACPI: If an ACPI driver is available for this device, you should use it
instead of the native driver
I don't yet know what this all means, so I guess I'll be signing up for the linux-acpi mailing list to see if there's anything I can do to get things working better. Any pointers will be gratefully received :-)
Right about now I wonder if maybe I should have gone for the HP or the Asus, even if they were a little heavier and a bit more expensive and next time I get a new laptop I must remember not to spend more than $900 (USD$600) on it.
[Updated: 2010-09-08... Noise Problems Solved
Thank you Debian
I do like that some of my friends in Debian have conspired to set up the website http://thank.debian.net/, and I composed this little Haiku in their honour:
Debian is fun for seventeen years. Beautiful balloons.
I'd also like to thank everyone involved in Debian over the years for being such a lovable, friendly, enjoyable and welcoming bunch of people to work with.
It's tempting to single out people for special mention, because there are people who do exceptional work in the project, but the list would go on for so long, and I would be afraid of missing out someone who would be obvious five minutes later, and then I'd have to come back and edit this post repeatedly with the names of more and more people over the coming days. We all know exactly what a chore that kind of maintenance is.
So I'll just give up completely and thank everyone, and if you think you deserve a special thanks, you probably do, and I'm sure you're on that list in my head. When we meet, as I hope we shall, let me shake your hand, lend you my ear and buy you a $BEVERAGE of your choice.
Thank you,
Andrew McMillan.
Using dnsmasq to add SRV records for CardDAV and CalDAV
I've been working on implementing CardDAV support into DAViCal at the moment, and the first problem I encountered when I went to try and use it from iCal, was that the configuration on iCal didn't seem to want to let me enter a URL to my addressbook.
Recent comments
39 weeks 4 days ago
40 weeks 3 days ago
44 weeks 5 days ago
1 year 13 weeks ago
1 year 14 weeks ago
1 year 22 weeks ago
1 year 27 weeks ago
1 year 27 weeks ago
1 year 28 weeks ago
1 year 28 weeks ago