May 9th, 2012
I FOLDED A thousand paper cranes. Japanese legend believes the cranes will grant you a wish. The daughter of a couple of friends of mine, were up for confirmation, and so a gift of long life and good health seemed like a good idea ;-)
A few of them was made of money and mixed into the lot ]:->
I gave the cranes as a gift in a big box

June 8th, 2011
THE SERIAL PORT on my Fedora 15 install, mysteriously refused to be accessed. I discovered that when inserting a USB-to-Serial device, GNU screen would refuse to access the created device /dev/ttyUSB0.
» screen /dev/ttyUSB0 115200
[screen is terminating]
Since I could use screen for serial access as root, and because the newly installed Fedora did have some hiccups in adding my user (the /home/monzool directory already existed from a previous Ubuntu install), I first checked group permissions, but they seemed fine for this situation.
» ll /dev/ttyUSB0
crw-rw----. 1 root dialout 188, 0 Jun 6 08:27 /dev/ttyUSB0
» groups
monzool tty wheel uucp dialout tcpdump screen vboxusers
Screen didn’t offer much indication of the problem, but using strace I could see that some of the last things checked for permissions where /var/run/screen. I then removed that directory and recreated the directory setup by starting screen with sudo.
» ll /var/run/screen
drwxrwxr-x. 4 root root 80 Jun 6 08:27 screen
» rm -rf /var/run/screen
» sudo screen /dev/ttyUSB0
» ll /var/run/screen
drwxrwxr-x. 4 root screen 80 Jun 6 08:47 screen
This helped nothing! :-(
I then tried minicom, which was more informative about the problem
» minicom
minicom: cannot open /dev/ttyUSB0: Device or resource busy
This would mean that something else had hijacked the port. A quick check confirmed that something called gpsd was using the port.
» lsof /dev/ttyUSB0
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
gpsd 883 nobody 8u CHR 188,0 0t0 11408 /dev/ttyUSB0
» ps ax | grep gpsd
883 ? S<s 0:00 gpsd -n -F /var/run/gpsd.sock
Now gpsd is for handling GPS devices, but it made no sense to trigger this daemon for a simple USB-to-Serial adapter.
Knowing what was causing the hazzle, I found this bug rapport https://bugzilla.redhat.com/show_bug.cgi?id=663124. In it, it is proposed to set USBAUTO=no in /etc/sysconfig/gpsd.
» echo "USBAUTO=no" >> /etc/sysconfig/gpsd
And sure enough, this fixed the problem. The USB-to-Serial adapter could now be accessed by any serial terminal.
October 2nd, 2009
I’VE BOUGHT A copy of the game Sacred Gold in an edition that is ported to Linux. This would be very exiting… if it didn’t segfault every time I start it :-(
$ sacred
sacred 1.0.1, built for i386
Segmentation Fault: I dont believe in dragons! oh...
This is a BUG, please report it to http://support.linuxgamepublishing.com
Stack dump:
{
[0xb8024400]
/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so [0xb68299a6]
/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so(gtk_module_init+0x5d) [0xb6829a5d]
/usr/local/games/sacred/lib/lib1/libgtk-1.2.so.0(gtk_init_check+0x3f3) [0xb7700443]
sacred [0x860422e]
sacred [0x8620770]
sacred [0x860839b]
sacred [0x809ab90]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb71557a5]
sacred(gtk_widget_grab_focus+0x31) [0x8053849]
}
The game publisher Linux Game Publishing has provided a test tool that evaluates if your system should be able to execute the game…
# testtool
Testing installation... OK, installed at /usr/local/games/testtool
Base system Test
----------------
Testing architecture of system... 32 bits
Testing system CPU... 1242MHz
Testing CPU flags... MMX SSE SSE2 SSE3
Testing system memory... 2025MB
Graphics Test
-------------
Looking for OpenGL library
Accepting /usr/lib/libGL.so.1
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 5 (X_GLXMakeCurrent)
Serial number of failed request: 26
Current serial number in output stream: 26
So It appeared that I had some trouble with the proprietary Nvidia driver. I ran glxinfo and indeed it gave an error.
$ glxinfo | grep -i error
Error: glXCreateContext failed
On the world wide web I found some hints about adding the following lines to xorg.conf.
Section "Files"
ModulePath "/usr/lib/xorg/modules/extensions"
ModulePath "/usr/lib/xorg/modules/drivers"
ModulePath "/usr/lib/xorg/modules"
EndSection
That didn’t help. :-(
Grepping the logs however revealed some useful information
$grep -i glx /var/log/*
/var/log/Xorg.0.log:(II) "glx" will be loaded. This was enabled by default and also specified in the config file.
/var/log/Xorg.0.log:(II) LoadModule: "glx"
/var/log/Xorg.0.log:(II) Loading /usr/lib/xorg/modules/extensions//libglx.so
/var/log/Xorg.0.log:(II) Module glx: vendor="X.Org Foundation"
/var/log/Xorg.0.log:(==) AIGLX enabled
/var/log/Xorg.0.log:(II) Loading extension GLX
...
/var/log/Xorg.0.log:(EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
/var/log/Xorg.0.log:(EE) NVIDIA(0): log file that the GLX module has been loaded in your X
/var/log/Xorg.0.log:(EE) NVIDIA(0): server, and that the module is the NVIDIA GLX module. If
/var/log/Xorg.0.log:(==) NVIDIA(0): Enabling 32-bit ARGB GLX visuals.
It was clear that the Nvidia driver failed to intitalize the GLX module, but before that, it can be seen that another GLX module was actually loaded Module glx: vendor="X.Org Foundation". This was a big hint.
Looking into earlier investigated directories I could see that I had two different versions of the glx library files installed?
/usr/lib/xorg/modules/extensions# ll
-rwxr-xr-x 1 root root 1269220 2009-07-25 13:10 libglx.so.173.14.20
-rw-r--r-- 1 root root 337008 2009-09-28 07:32 libglx.so
It seemed strange that I had two so differently sized versions of libglx laying around, and also that the Nvidia version appeared not to be the default file.
Searching for the libglx file revealed that only the fglrx-driver and the Nvidia drivers supplied that file.
$ apt-file search libglx.so
fglrx-driver: /usr/lib/xorg/modules/extensions/libglx.so
nvidia-glx: /usr/lib/xorg/modules/extensions/libglx.so
nvidia-glx: /usr/lib/xorg/modules/extensions/libglx.so.185.18.36
nvidia-glx-legacy-173xx: /usr/lib/xorg/modules/extensions/libglx.so
nvidia-glx-legacy-173xx: /usr/lib/xorg/modules/extensions/libglx.so.173.14.20
nvidia-glx-legacy-71xx: /usr/lib/xorg/modules/extensions/libglx.so
nvidia-glx-legacy-71xx: /usr/lib/xorg/modules/extensions/libglx.so.71.86.07
nvidia-glx-legacy-96xx: /usr/lib/xorg/modules/extensions/libglx.so
nvidia-glx-legacy-96xx: /usr/lib/xorg/modules/extensions/libglx.so.96.43.13
xserver-xorg-core: /usr/lib/xorg/modules/extensions/libglx.so
xserver-xorg-core-dbg: /usr/lib/debug/usr/lib/xorg/modules/extensions/libglx.so
Although the only glx package that was installed on the system was libgl1-mesa-glx.
$ aptitude apts glx
p fglrx-glx
i A libgl1-mesa-glx
Looking at libgl1-mesa-glx showed that that package installed a OpenGL library file
$dpkg -L libgl1-mesa-glx
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libgl1-mesa-glx
/usr/share/doc/libgl1-mesa-glx/copyright
/usr/share/doc/libgl1-mesa-glx/changelog.Debian.gz
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/libgl1-mesa-glx
/usr/lib
/usr/lib/libGL.so.1.2
/usr/lib/libGL.so.1
Strangely also here a Nvida version of the library existed in /usr/lib
-rwxr-xr-x 1 root root 667528 2009-07-25 13:10 libGL.so.173.14.20
This seemed like the Nvidia installer have had collisions with other already installed packages and had failed to resolve the situation properly. Unfortunately the installer had warned nothing about this situation. What I did then was to remove the existing libraries and make a symlink to the Nvidia libraries for libglx and libGL.
/usr/lib/xorg/modules/extensions# ll libglx*
lrwxrwxrwx 1 root root 19 2009-10-01 22:22 libglx.so -> libglx.so.173.14.20
-rwxr-xr-x 1 root root 1269220 2009-07-25 13:10 libglx.so.173.14.20
/usr/lib# ll libGL*
lrwxrwxrwx 1 root root 18 2009-09-13 13:40 libGL.so.1 -> libGL.so.173.14.20
lrwxrwxrwx 1 root root 18 2009-10-01 22:52 libGL.so.1.2 -> libGL.so.173.14.20
-rwxr-xr-x 1 root root 667528 2009-07-25 13:10 libGL.so.173.14.20
And then… glxinfo ran with no errors.
The log also changed for the better
$grep -i glx /var/log/*
/var/log/Xorg.0.log:(II) "glx" will be loaded. This was enabled by default and also specified in the config file.
/var/log/Xorg.0.log:(II) LoadModule: "glx"
/var/log/Xorg.0.log:(II) Loading /usr/lib/xorg/modules/extensions//libglx.so
/var/log/Xorg.0.log:(II) Module glx: vendor="NVIDIA Corporation"
/var/log/Xorg.0.log:(II) NVIDIA GLX Module 173.14.20 Thu Jun 25 19:49:59 PDT 2009
/var/log/Xorg.0.log:(II) Loading extension GLX
/var/log/Xorg.0.log:(II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is
/var/log/Xorg.0.log:(==) NVIDIA(0): Enabling 32-bit ARGB GLX visuals.
/var/log/Xorg.0.log:(II) Loading extension NV-GLX
/var/log/Xorg.0.log:(II) Initializing extension GLX
Unfortunately Sacred still segfaults big time :-(
August 30th, 2009
INTERRUPTIONS AT WORK is a frequent occurrence but generally its not a big problem. This time however the unavoidable loss of focus on what you was doing before, gave an unpleasant surprise.
I was adding some new functionality and had just written the following:
switch (state) {
case Step3:
configuration.length = 10;
break;
}
Next I added a line to specify the configuration data on index zero. With the intention of doing this for the remaining nine data indexes, I copy-pasted the first line and incremented the index.
switch (state) {
case ConfigureTask:
configuration.data[0] =
configuration.data[1] =
configuration.length = 10;
break;
}
But this was at the exact moment a colleague asked a question. To figure out the answer I had to browse around in the same file I was just editing. Not finding the complete answer there, the hunt led on to opening a bunch of other files. Eventually the situation evolved to a discussion using a white-board.
Now, even though the above code is incomplete, it compiles to perfectly valid code!. What the above code does is to initialize configuration.data[0], configuration.data[1] and configuration.length to 10. Naturally this behavior was never the desired behavior for that code…
Later, returning to my workstation, I had completely forgotten about the unfinished implementation I worked on before. In my mind it was already done and I proceeded on other things that would eventually allow me to run some basic tests for the new implementations. The nature of the code is to delegate a state dependent number of black-box data to a task. The receiving task is found by peeking into the first byte of the black-box data (configuration.data[0]). Unfortunately ’10′ is a perfect match for the first task to be configured. So when unit-testing, at first everything seemed to be okay.
Later some strange behavior appeared, for which I could find no good reasons. Eventually I found the faulting situation in great dismay.
This kind of logic errors is the kind that can become extremely difficult to find, and I’ve learned my lesson: if leaving in the middle of writing some source code, be sure to quickly add some non-code that will not compile.
August 4th, 2009
THE-CAMP 2009 WAS the third time I’ve dedicated a week of my summer vacation at TheCamp.
As mentioned in previous posts (TheCamp 2008 and TheCamp 2007) its a week where nerds meet to have fun, eat lots of food, drink beers and hack with ones own projects at will. This year we were 50 participant of a wide variety. The youngest participant was an (circa) 14 year old gamer, the oldest participant was a lady of 73 years of age wanting to acquire some more Linux knowledge. This year the female participant count was raised to five – a pleasant trend.
As the previous years I came with so many projects to do, that I knew I would not finish them all. I’ve been wanting to learn functional programming for a while. My intention was to learn Falcon, but one other participants had a task of learning Haskell, while another was proficient in the language, so I joined in on Haskell. I only had time for a brief encounter, but I’ve ordered some books and can’t wait to seriously dive in. I had brought some work with me, where I managed to clean up some unit-test and functionality-test code. Linx have had my interest for a while now, and I managed to do a prototype porting, of a client-server application of mine, to use Linx for IPC instead. I wanted to try out Mono on a PowerPC evaulation board, but LTIB didn’t really want to run on my Debian unstable install, so I ended up playing around with OpenSuse 11 on a Sun Virtualbox 3.0.
Virtualization was in fact the “great big thing” in this years guest talks. Asbjørn Sloth Tønnesen held a talk about Xen, Niklas Q. Nielsen held a talk about OpenVz. A third person (Svenne Krap) gave a short informal introduction to KVM. Poul-Henning Kamp held a talk where he apposed the increasing use of virtualizing the hardware.
Generally there was many excellent talks this year (to many to describe in detail), but here is some details on a few:
Bo S. Sørensen held a very entertaining talk about Android. He gave an overview in the evolution of smart-phones, and introduced the available Android phones. During his 45 minute talk he demonstrated the Android development tools by creating an application that could extract where his fotos on his phone where taken (if equipped Android phones stores the GPS position as meta data for each photo), and show the positions on a google map. As a side note: working daily with embedded Linux, it was with much envy I saw how seamless and easy the development environment integrated with the actual hardware. It was impressing to see how easy one could switch from running or debugging directly on a phone or in a Android emulator.
Palle Raabjerg ranted (friendly) about keyboard layouts. He’s a bit fan of the Maltron ergonomic keyboards. Martin Toft spoke about his experiences with bug fixing Vim at Google Summer of Code 2007.
An then there was Thomas Bøgholm… The two public television stations DR1 and DR2 are experimenting with streaming all their broadcastings in Linux friendly high resolution streams. So Thomas records and stores everything streamed from those two channels. Some might think this a the work of a crazy man, but I think it is an awesome (and crazy) thing to do. He’s made some software for automating the procedures, and got the software released under FOSS friendly license.
A very special event was celebrating the 40′th year of the moon landing by having a midnight outdoor movie display of the Apollo 11 mission. One of the TheCamp participants had bought a book where the authors had done a lot of work piecing together two movies of the moon landing mission. The first movie was the last 30 minutes of the decent and landing on the moon, the second movie was an almost 2 hour movie of Niel Armstrong and Buzz Aldrin working the moon. I’ve only seen small clips from the first moon landing, and it was first when seeing these movies that I really got my eyes up for the amazing achievement that was performed 40 years ago. I was very much awe struck. The same could be said for a revisiting participant of American (U.S.A) origin. He was convinced that he had seen everything there was to be seen of the Apollo 11 mission, but this movie had quite a few bits and pieces that was new to him. He went strait to amazon and bought the book :-).
This year we also had a visit from a public television station that did a daily broadcasting from different summer arrangement around the country. They didn’t have the first (or n’th) clue about computers, so they mainly wanted to hear “IT-jokes” (they didn’t understand a single one of the jokes) and filmed the days special event of hardware-throwing.
So TheCamp proved again to be the highlight of the year. I’m definitely going next year ;-).
June 1st, 2009
TERRY BROOKS NOVEL series “The Word And The Void” is a trilogy telling the story of Nest Freemark and John Ross fighting the battle against evil daemons. He is not an author I’ve read anything off before, nor is the urban fantasy my favorite genre, but when I by chance discovered this trilogy collection book, I found it to look very interesting. Now I’m finished reading the three books and its was not an all positive experience.
First a short resume of the novels: Each of the three books takes places in different times in Nests and Johns life. The first book “Running with the Demon” takes place when Nest is a teenager and joins forces with John Ross to fight on the side of the Word against the daemonic world of the Void. In the second book “A Knight of the Word” John Ross can no longer carry the burden of being a sworn knight of the Word. Denouncing the knighthood is catastrophic for both John and the world, so Nest must take upon her to convince John to return to his duties. The last book is 15 years from the first encounter between Nest and John and this time they must join forces against an old and wise daemon the want the magic gypsy morph John has captured.
Elaborate summaries are available at Wikipedia.
As such the books are an interesting read. It involves dangerous daemons and creatures living in our world but seldom seen by other people that those few who got magic. It has the classic clash of outnumbered good-guys fighting the casualty filled battle against an relentless and evil enemy. But, when reading the trilogy I could not help thinking that the story is a little thin to fill its many pages. Much of the text is in-between filler stuff, with many offtrack stories that bring nothing to the general story, plus some very elaborate scene description that makes an annoying long reading in between the next few grains of valuable information or plot actions.
Two distinct features of Terry’s writing struck me time and time again. 1) He really likes to use obscure words. I’m not native English, but I almost always read English/American books in their non-translated editions, and its very seldom that I have to do a dictionary look-up of unknown words or phrases (more often when reading pre-60s books though). Looking-up the words he uses reveals that more contemporary word of the same meaning often exists. 2) He gives a very detailed description of the surrounding in which the characters are staged. Actually he spends line after line after line describing the surroundings, but it is seldom that there is any significance to this in relation to the plot.
After finishing reading the books I cannot help feeling that Terry chose poorly when selecting the main character of focus. Terry mainly writes with respect to the viewpoint of Nest Freemark, and this is a shame because the other character in the books, The Knight Of The Word (John Ross), makes for so much more an interesting character. Terry missed the opportunity of writing the story of the lone knight. A knight that didn’t really wanted to be a knight due to the high personal cost, but whom had to continue his quest in order to save the world. And save it two fold by fighting daemons in the daytime, and surviving a nighttime when the price of his magics costs him to live the night in a future where he had failed to save the world from the Void.
Rating: 




April 27th, 2009
THE MENU IN GVim suddenly disappeared?! I did not provoke this by making changes in any .vimrc, .gvimrc or in any files in the .vim directory. The menu was just gone after a boot when GVim auto-loaded the documents open before the reboot. The system is Kubuntu 8.04 and vim-gnome.
I googled for a solution and eventually found an answer at Nabble (thanks goes to mmarko). It appears that something (?) changed the Gnome setup for GVim in the file ~/gnome2/vim.
No menu:
[Placement]
Dock=Toolbar\\0,0,0,0\\Menubar\\0,0,0,0
With menu:
[Placement]
Dock=Toolbar\\0,1,0,0\\Menubar\\0,0,0,0
February 8th, 2009
WORDPRESS 2.7 UPGRADE from WordPress 2.2.2 done with no problems.
I was somewhat worried that my old theme would break on the upgrade, but It appears to be working. Well, I got at little issue with the Wp-Syntax plugin. I upgraded the plugin and now my GeShi style overrides do not work anymore – guess that is things one discover when doing infrequent upgrading.
I’m looking forward to working with this new WordPress version and exploring its added features.
January 30th, 2009
THE INSTRUMENTAL PANEL on my 1992 VW Passat was giving some strange readouts on the electrical indicators and warning lights. At first I thought that something was wrong with the temperature censors, so I had en engine block censor changed. That helped nothing, but then other errors began to emerge. For example, the temperature gauge and diesel gauge would sometimes showing erratic values, jumping from one setting to another or just showing obviously false values. The overheating warning light would signal after just starting the engine, or having run only a few kilometers or the headlight settings would indicate the opposite of what was actually set. This recording shows how the gauges head for endpoints and the headlight indicator changes, when switching on the headlights and instrument panel lights.
All these issues turned my suspicion towards an electrical error in the instrumental panel; and sure enough it turned out to be an electrical fault. The instrument panel circuit board is connected to external components via a big multi-connector. The soldering for this connector were broken and needed re-soldering.
Steps take to make the instrument panel work correctly
To get the instrument box out, the steering wheel has to be unmounted first. The rim around the panel box can be awkward to pull out, but start but pulling the right side first and when that detaches the other side follows easily. The panel box is top mounted with a couple of screws.

When pulling out the panel box the speedometer cable will detach from the box. When refitting the panel box, position the lower part panel box in an outwards angle, and the panel can then be tilted into upright position with the speedometer cable guide right into place.

The speedometer guide is unscrewed in counter-clock wise direction. At the right side of the back cover is a multi-connector. When removing the internal circuit board, this connector has to be unlocked by prying a thin screwdriver (or other fitting tools) into each of the two locking mechanisms.
After opening the box, the gauges are removed. The speedometer is corner screwed while the two other can carefully be pulled of their mountings.

The problem in this case, was the multi-connector slot (here seen from the connector side)

Visually inspecting the pin soldering revealed that most of the pin soldering had gone bad. To fix the instrument panel the soldering had to be redone.

This panel, or variations of, is common to most VW’s of late 80′s and 90′s models and apparently this type of error is not an uncommon failure in these circuits prints.
October 7th, 2008
COLD, WINDY AND rainy would describe the weather this past Saturday evening. Not that that kind of weather uncommon in Denmark, but this particular day I was at the outdoor Speedway event “Denmark vs. The World” at Vojens Speedway Arena. Speedway is one of the most exiting motor sport types, and its a fantastic experience to watch it live. This event was a special event where two teams, with Danes on one team and non Danes on the other, would race each other for the price.
Here’s a movie that I recorded with my IXUS 50 Canon camera: Speedway – Denmark vs. The World. Not the best quality, but captures the excitement pretty well.
It was a fantastic evening apart from the fact that the event was canceled after heat 11 out of 18 heats due to bad weather. As this picture will show, we all got a bit surprised on the weather. Here sits my brother, my sisters husband and my father with his Easton cap, all hoping it would stop raining.

I’m somewhat glad that I’m not on the picture – we ain’t looking to stylish I guess. lol.