Fighting with computers

Computers are not always friendly.

Friday, July 28, 2006

Intel is back on top


Although media messages have been a bit confusing, it seems that Intel is regaining customers from AMD. At the same time that AMD is buying ATI (an therefore expanding the number of fronts the company will be fighting), Intel is presenting new versions of their saga of confusing names:

    Pentium D
    Core Duo
    Core 2 Duo

Code names are not helping either as Yonah, Conroe or Merom tell you nothing about the processor (unless you are an Intel engineer).

So will tell you my simplified version: Pentium 4 is dead. Hyperthreading is not bad but having a dual core is better. It means more instructions executed per time unit (faster processing). Trouble is that the thing tends to be hot, hotter as it gets faster. It gets hotter because it uses more power, so computers need these 400W or 500W power supplies to keep all the parts properly sourced of energy.

Intel has moved from 90nm to 65nm which means transistors are now smaller (they have to be if you plan on packing 350 million transistors in a small package) and therefore can work using less energy.

Pentium M was a huge success in terms of breaking the myth that faster clock is what you need. Performance is not always connected to a clock to clock speed comparison and Pentium M processors have been consistently delivering better performance than Pentium 4 running at a much higher clock speed.

What Pentium D, Dual Core and Dual 2 Core have in common is they are all delivering a dual core system where two processors are packed in the same chip. Pentium D is still a power hungry beast while Dual Core family can work with less power.

Please remember that the speed-up of having two processors is only apparent for some applications and it can even mean a slow-down for others. You may want to check this Microsoft article. So until all the code you run is designed with that in mind, you still can get faster single-thread performance with some AMD processors.

However, if you look at the performance per buck ratio, I think that most of the time Intel is now the winner. I have already switch some of my systems to the (cheap) Pentium D and I reckon I will be testing Core 2 Duo in a few months.

Thursday, July 27, 2006

Advanced Web Publishing Service

This is the name of a new service offered on my university campus. It really is a Plesk-based control panel with a choice of databases and content management tools running on top of Windows 2003 servers.

As I have been running several servers and databases I thought I was well prepared to use this "advanced" new system: I was wrong. While Plesk's control panel looks nice (and you can chose the skins that pleases you the most) it was not very easy for me to manage through all the system. Eventually I was hitting against the wall when trying to import an ASCII file to fill-in a MySQL database table using phpmyadmin (because of wrong default options). I did not like the default management for SQL Server databases was done over (insecure) http connections. For reasons that were not explained PHP scripts returned a 404 Not Found error while at the same time I could not change any of the file access rights and, surprisingly, ASP files worked without any problem. Later on the system admin did fix it and now I have PHP scripts running properly.

I think that if you have the hardware and the knowledge you can have linux box up and running much faster than the time it takes to learn this (proprietary) Plesk thing. I am not yet a Plesk expert (not that I am planning to become one) and it is certainly not a web-publishing for dummies either.

However, it might be interesting for you to learn Plesk if you plan on getting your websites hosted on provider who uses it. A very good point for the system is that it includes a trouble ticket system that provides you a tool to be in touch with the help desk. Too bad the ticket system only allows text messages and no attachments.

Tuesday, July 25, 2006

New article


I already mentioned in this column that I was waiting for an article I wrote to be published on Circuit Cellar magazine. And there it is in the #193 August issue.

It describes some of my work to get an RFC 2217 serial device server based on a Rabbit Semiconductor 8-bit microcontroller. Some of the problems were mentioned here in the past but I've put together all the details to give readers an understanding of the full process.

My experience with Rabbit cores has been quite successful and I think it is a nice, cheap and low-power platform for not so complex systems' automation. The learning curve is not steep and the development tools work as expected, just keep in mind you need a serial port to get it working (and a real one will be faster than a USB-serial dongle).

Friday, July 21, 2006

World's smallest development kit


I've just got one sample ToolStick devolopment kit. It consists of a USB dongle and a credit card sized CD with the software. As the ToolStick is USB powered there is no new for an external power supply. The drawback is that it only contains a couple of outputs connected to a pair of LEDs so you can check whether your software is working as expected or not.

It is certainly a minimalistic setup and the easiest one to carry around. I'm not sure it can be very useful for general purpose development, but it seems like a cheap tool to be used (and given away) in the the classroom. A ToolStick costs $10.99 plus shipping. If you are happy with just two output LEDs I do not think any other system can beat this one as this one contains a nice Windows IDE and C compiler.

Tuesday, July 18, 2006

Minix is back


When I was a Computer Science student I've learned some of the Operating System basics with Andy Tanembaum's Minix educational Unix-clone. It was not powerful but it worked on a PC with less than 1 MB of RAM off a floppy disk.

While the aim of Minix, and later on that of Minix 2, was to provide an educational tool, the new version Minix 3 is intended as a microkernel OS for embedded and resource-limitted computers and for applications that require high-reliability too (I like this latter one).

Minix 3 is still a work in progress and ports to other targets different than x86 are underway. But if you want to give a try you can download the CD or USB dongle image so you boot a live system and to perform a hard drive install. While not even close to what you get with a current GNU/Linux or FreeBSD it is still worth trying it out. Full C source is available.

Sunday, July 16, 2006

"Paella Valenciana" HOWTO

It is time to get out and have some fun while your computers are powered off. So I propose a radical change just for today: Cooking a typical dish from my area that all of my friends love.

First of all the ingredients you need (I assume you already have a paella pan):


You add some olive oil (to cover 2/3 or the pan surface) and start deep frying the chicken you previously have salted.



Once the chicken is getting brown, spread it to the side of the pan and put the beans in the oil to fry it a bit too (beware not to burn it). Once this is done add the tomato and garlic and fry it too.



Add one spoon of sweet paprika (non hot!) and stir and mix thoroughly. Then add water up to half an inch of the border of the pan (for this to work you have to have quite flat to start with) and add the yellow food colorant too (or safron if you can afford it).



Let the water boil for half an hour so all the ingredients will get fully cooked. Afterwards add the rice (that has to be half the volume of water you have now).


The rice takes 20 minutes (check your rice bag instructions as it might be different for yours). Once the rice is done take away from the heat and let it rest for five more minutes.

Serve it and enjoy.

Some additional ideas:
  • Add some rosemary when you add the rice to give a special flavour.
  • Replace the chicken by artichoke, carrot and zucchinni to get a veggie version.
  • Add half cup of brandy with the water so chicken will get tender.
  • Thursday, July 13, 2006

    S.M.A.R.T. HDD temperature, too


    When I installed Speedfan software to my children's computers I realized it allowed you to measure the HDD temperatures if they are SMART compatible (which they are). So I thought it would be nice too to have such info on my Ubuntu desktop too.

    So I google for a moment to learn that hddtemp allows you exactly that: to measure your SMART-compatible HDD temperature from command line: just install it
    sudo apt-get install hddtemp
    and type
    sudo hddtemp /dev/hda 
    (or any other drive name you have). It works as expected and you may consider to run it as a daemon so you can use the nice Gnome sensors applet that does a very nice job of showing all the temperature (and fan info if you wish) collected by several means, including acpi, lm-sensors and hddtemp. It is not installed by default so you'll have to install it too.

    Wednesday, July 12, 2006

    Motherboard temperatures

    One of the important things when you plan on overclocking a system is to have an eye on the system temperature. Some systems are providing all data you need through ACPI and it is shown in the /proc/acpi/thermal_zone/ folder.

    However my /proc/acpi/thermal_zone/ folder is empty. I thought that this was because a bad ACPI implementation. You know, the BIOS contains a description of the capabilities of the hardware that is handed over to ACPI and it is called dsdt. Sometimes this file is broken and it contains errors but because they only test it against some version of Windows some errors are not fixed.

    You can extract your system's dsdt and fix it yourself. Linux boot process can either use the dsdt provided by BIOS or it can use a fixed copy you create on initrd. To do the latter, you need a patched kernel. The kernel that ships Ubuntu's Dapper Drake is already patched to support this feature, so you can store your patched dsdt to /etc/mkinitramfs/ and name it exactly as DSDT.aml and do a sudo dpkg-reconfigure linux-image-`your-current-version` and that's all.

    However, my dsdt file did not contain errors but warnings I could not fix. And although time consuming the task did not cure my problem of not having access to the temperature measurements of my motherboard (Asrock775Twins-HDTV R2.0). I hope the new BIOS version, when available, will fix the situation, but for the moment ACPI is not the way to get the temperature with this motherboard.

    So what I did was to look back for non-ACPI ways of getting the temperature information. And I have found this tutorial that worked for me.

    Saturday, July 08, 2006

    Fired for porn surfing (II)

    Some time ago (March 2006) I mentioned I was being asked to write a judicial report. The case was about a big company (supermarket chain) firing a worker for alleged porn surfing using the company laptop.

    This week I have learned that my client has won the case and he is either getting his job back or a significant amount of money for leaving the company.

    What I do not know yet is if my client will sue the company for building a false and humiliating case against him.

    It seems that big players have to stick to the rules too, at least sometimes.

    Friday, July 07, 2006

    Trying to get some music ...


    ... into my old Creative DAP Jukebox in Ubuntu on my new machine revealed that USB ports were not working properly. Although they were recognized nothing much happened as if interrupts were not getting to the system, however network card, keyboard and mouse were working and are also interrupt based.

    Rebooting the system with the "noapic" keyword as a boot option cured the USB problem. It confirms that it was somehow due to a bad routing of interrupts. I've added this my kernel boot line in /boot/grub/menu.lst to have it as default.

    Unfortunately life is always challenging us and this fix of the USB did not solve my problem. Neither Gnomad2 2.8.1 nor Neutrino software were able to talk to my MP3 player (though I have successfully communicated with it and an Ubuntu-based laptop at home). Because I've just downloaded the latest version of Knoppix that my friend Victor Alonso kindly translates into Spanish. I decided to give it a go to see if it included newer versions of libraries and/or software, so I can get some music uploaded. Not being my lucky day Knoppix CD did not include any software for my MP3 jukebox. But "apt-get install gnomad2" did the trick and now finally was able to upload some music to my device. It is interesting to note that I used here Gnomad2 2.8.3-1, slightly newer than the one on Ubuntu 6.06. However, because Neutrino did not work either I guess that the libnjb5 could be the problem.

    Next problem in the horizon was to get SuSE Linux 10.0 working on my new machine. Graphic card was not recognized and, even worse, sax2 froze my machine when trying to get the graphics configured. Finally I learned that I could force sax2 to use a given driver only. Although my card is an ATI Radeon, the radeon driver didn't work nor was the generic ati driver. So I resorted to the framebuffer driver that did work. However it only did it on 1024x768. No matter what resolution I were selecting on sax2, screen resolution was kept to 1024x768. Time to check the grub program documentation to see that frame buffer resolution is selected on boot with the parameter vga. So I rebooted with vga=794 to get 1280x1024 at 24bits color depth and now it works!

    Almost there, but sound is not yet working on SuSE. The configuration with Yast did not work with the card. The system detects the device but it does not produce any sound. Fortunately, the command line alsaconfig allowed me to get the sound back.

    I guess that with my latest posts you have been warned that this Asrock775Twins-HDTV card is not without some problems that are mostly fixable. Right now my 2.6 GHz processor is happily running at 3.3Ghz with the stock cooler. And my tests when encoding the MPEG video I posted some days ago with mencoder using 3 threads is peaking at 392 frames per second, I am really impressed with this result.

    One last detail, this kernel bug seems to affect my system too. I haven't tried the patch proposed but I have disbled DMA in my CD-ROM and DVD. I can understand all these details can scare away people from using Linux: Folks, it is not always this way. Just try not to use cutting edge devices.

    Wednesday, July 05, 2006

    uli526x annoyances

    When testing the Asrock775Twins-HDTV almost everything went ok. The keyword here is "almost". The built-in network card did not work. It seemed like the cable was not detected. As it is a Gigabit Ethernet I was not sure if the link auto-sensing could be creating the trouble (as the computer it is connected to a Fast Ethernet switch).

    I had a cheap Realtek 8139 Fast Ethernet card on my desk so I installed and I got the system working. But just to be sure I decided to reconnect the network cable to the previously non-working built-in socket to see if it was still dead. To my amazament this time the interface worked.

    Next day I'm getting rid of the Realtek NIC but then here it comes again. The built-in NIC does not work. A "dmesg" command output informs me the "Link is down" so it looks like a cable problem. I install back the Realtek and everything works again, including the built-in NIC.

    I'm kind of tired with this fight so I just disable the built-in NIC and I am going to use the Realtek card. From this thread it seems 2.6.16 will fix this, but I won't keep my breath. It is working ok with SuSE though. However, I have not yet been able to get the graphics working with SuSE with this new board, and the worst thing is that sax2 freezes.

    My first attempt to overclock the system to 3.0 Ghz seems a complete success with the standard Intel heatsink/fan.

    The other detail I did not like about this motherboard is the heatsink is pushing very hard the processor agains the socket and the printed circuit appears bended several milimiters arond the socket, not a comforting wiew I should say. I hope it will be ok. Maybe this is not a problem if you are not using the standard heatsink that comes with you CPU.

    Update: As Vicent reports in the comments, kernel 2.6.16 does not fix the problem. I am still using a PCI LAN card as a workaround. I reported the problem to Asrock support people but I did not get an answer on how to solve the issue.

    Tuesday, July 04, 2006

    Motherboard replacement

    By now, I've replaced three computers' motherboards, two of them were brand new and the third was actually relocated from one box to another. I have used a couple of cheap Pentium D 2.66Ghz to equip the new ones (around 115 Euros each taxes included). The motherboards came with this nice install video. So if you wonder what's all this thing about LGA775 socket you may have a look at it. In case you wonder LGA stands for Land Grid Array and it is type pin-less chip carrier, similar to BGA but where the balls have been replaced by flat conductive pads. So now the pins are on the socket instead of on the chip and you have to exercise caution not to damage them (or you'll need a new motherboard).

    As usual the replacement of the motherboard of a computer (and sometimes also the graphics card) is not without problems: All my systems had some version of an AMD K7 processor, so the change meant a new CPU type, new chipset and in one case, new graphics card (as the Asrock775Twins-HDTV comes with its own ATI X200 embedded graphics card). In two systems MS Windows XP refused to work at all, so a "Repair install" was required where new chipset drivers were installed. Ubuntu Linux worked in both cases, but without taking advantage of the new dual core processor. SuSE Linux however did not work with the 775Twins card till "noapic" command was added at system boot. At any rate, all the systems required me to install the new graphic drivers whenever graphic card was changed. It was not that bad but it kept me busy.

    Now I have added SMP support by adding linux-image-2.6.15-25-686 that can actually handle Pentium Pro/Celeron/Pentium II/Pentium III/Pentium IV with SMP support. It just worked and now I have the two cores working. The system feels much more responsive when playing a video and opening a spreadsheet at the same time (not that I think this is specially useful but you get the idea).