These are the ramblings of Matthijs Kooijman, concerning the software he hacks on, hobbies he has and occasionally his personal life.
Most content on this site is licensed under the WTFPL, version 2 (details).
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 |
(...), BaRef, Blosxom, Busy, Examination, Firefox, Flash, FreeBSD, Hardware, Inter-Actief, IRC, LARP, Layout, Linux, Madness, MS-1013, Nerd, Notebook, Personal, Plugins, Random, Rant, S270, Samba, Sleep, Software, Study, Symbols, Travel, Trivia, Xanthe
&

Recently, I was having some problems with the internal speakers on my Lenovo Thinkpad X201. Three times now, the internal speakers just stopped producing sound. The headphone jack worked, it's just the speakers which were silent. Nothing helped: fiddling with volume controls, reloading alsa modules, rebooting my laptop, nothing fixed the sound...
When trying to see if the speakers weren't physically broken, I discovered that booting into Windows actually fixed the problem and restored the sound from the speakers. It's of course a bit of a defeat to accept Windows a fix for my problem, but I was busy with other things, so it sufficed for a while.
When migrating my laptop to my new Intel SSD, I broke my Windows installation, so when the problem occured again, I had no choice but to actualy investigate it.
I'll skip right to the conclusion here: I had broken my sound by pressing the mute button on my keyboard... Now, before you think I'm stupid, I had of course checked my volume controls and the device really was unmuted! But it turns out the mute button in Thinkpads combined with Linux is a bit weird...
This is how you would expect a mute button to be implemented: You press the mute button, it sends a keypress to the operating system, which then tells the audio driver to mute.

This is how it works on my Thinkpad: You press the mute button, causing
the EC (embedded controller) in the thinkpad to directly mute the
speakers. This is not visible from the normal volume
controls in the software, since it happens on a very low level (though
the thinkpad_acpi kernel module can be used to expose this special
mute state through a /proc interface and special audio device).
In addition to muting the speakers, it also sends a MUTE acpi keypress
to the operating system. This keypress then causes the audio driver to
mute the audio stream (actually, it's pulseaudio that does that).
Now, here's the fun part: If you now unmute the audio stream through the software volume controls, everything looks like it should work, but the hardware is still muted! It never occured to me to press the mute button again, since the volume wasn't muted (or at least didn't look like it).
I originally thought that the mute button handling was even more complex, when I found some register polling code that faked keypresses, but it seems that's only for older Thinkpads (phew!).
In any case, the bottom line is: If you have a Thinkpad whose speakers suddely stop working, try pressing the mute button!

After nearly five years of intensive use, the time has finally come to replace my trusty S270 laptop, Xanthe. Overall, I'm surprised that she held out as long as she did. There has been some defects along the way, but in the end I've managed to keep things pretty much working (where the most recent and most serious fix was to remove the laptop speakers and soldering the inverter cable, which got partly severed in the screen hinge).
However, since a few months, there is one issue that I can't seem to fix: The AC adapter plug doesn't seem to properly connect to the socket, making the battery switch between charging and not charging all the time (once per second or so). This had a great number of side effects, like keys on my keyboard getting stuck or making the keyboard stop working completely, making my network connection break, making my screen brightness change eratically and other stuff that makes me utterly and completely annoyed. I've made a detailed post on the s270-linux mailing list about that, if you're interested.
So, after a few months of on-and-off annoyance, I've finally decided to get a new laptop. It's sucky, since apart from this issue, Xanthe is still serving me well. On the other hand, it's utterly cool, since I just ordered myself a Thinkpad X201. It's a very durable and efficient 12" notebook (over 10 hours of battery life, according to Lenovo!). More details when I get the package (should be somewhere this week!).

Recently I've been fixing up some critical defects in my MSI S270 notebook: My display stopped working due to a broken inverter cable and my power adapter switched on and off all the time due to a broken cable as well.
The inverter cable goes from the laptop mainboard to the inverter, which is below the display. On its way it passes the left hinge, which is exactly where it was broken. Apparently I'm not the only one having these kinds of problems with the S270. Some people suggest that the hinges are badly made causing these problems.
I've looked closely at the inverter cable and it even seems the cable breaks are caused by a tiny thread that is wrapped around the inverter cable to keep it together. Three of the six (IIRC) wires has broken and a few more had cuts in the insulation. The breaks were very clean and seemed to be exactly at the spot where the wrapping thread had cut into the insulation...
Anyway, I managed to solder the tiny wires back together again (using some extra wire to fill the gap). The cable did become bigger from this, so I had to remove the speakers and their cable to make a bit room in the hinge to fit the soldered cable in.
It has been working for a few weeks now, but I'm afraid the solder connection will break eventually again. In the meanwhile I've been trying to get a new cable, but it's pretty impossible to get at and MSI Netherlands refuses to sell me a cable. They say the want to use all cables they have for repairs, meaning I have to send my entire laptop to them and pay €80 - €150 for a repair I could have done myself (the part alone is usually €20 - €30...).
I'm still happy with the laptop, while it is working, but I won't be buying another MSI when this one finally breaks down for good...
My power adapter cable had also broken, switching on and off when I wiggled with the cable. The cable used to have two round "blocks" at the start and the end (ferrite rings to prevent interference). Over a year ago the cable broke near one, now it broke near the other one. I've removed both of them now and soldered the stuff back together, making it work again.
With no indication as to why, the battery light of my laptop started blinking red yesterday. Normally it is green when charging, red when nearly empty and off otherwise. It shouldn't be blinking, ever. But it did.
Turning off the laptop, reinserting the battery, leaving it out for a while, none of this helped to stop the light from blinking. Some closer inspection showed that when not connected to AC power, the battery was discharging and Linux could read out the status just fine. However, when connected to AC power, the battery would not charge, and the status would be "unknown"!
I tried swapping the battery with my old one, which worked just fine. This seemed to suggest that my battery had somehow got broken. Since I've only bought the battery a few months back, I was already dreading having to deal with MSI support yet again. To confirm that the problem was in fact with the battery and not my laptop, I put my battery in Brenda's laptop (who has the highly similar S271). There, it worked like it should, giving a fancy green light. However, when I put the battery back into my own laptop, all the problems were gone and it charged normally again...
I'm still not completely sure what happened, but it seems like the battery got into some state that my S270 couldn't fix, but the newer S271 perhaps could? Oh well, glad it's working again, now let's hope it won't break again...
As you might have read in my previous post, I have been vastly unimpressed by MSI's warranty department. Or actually, I have been actually been quite impressed by the amount of incompetence that they have managed to concentrate in that department. But, I digress.
A few weeks back, MSI managed to take weeks to not replace my hard drive. I have been complaining about this, and they offered that I sent them the faulty drive (again) so they could replace it. Yet they could not send me a new drive, before they had received the old drive, since "the system would not allow it". They would not, however, require me to send back my entire notebook again, as a courtesy. It's not like I could use it for anything but decoration without a hard drive (it does not support booting from an USB stick, I discovered after installing debian om my stick), but well.
I was going to write a nice piece about MSI support here, as soon as I got my notebook back from MSI. About their nice service (pick up and return with UPS!) even though they are a little slow-ish. About their nice battery warranty (minimal 80% of capacity after a year) and their flexibility in applying that warranty (I was a few days too late, technically) But, I've decided not too.
There are several reasons for this. First of all, my notebook HD broke in the first place. Not a nice thing to do, though I should probably blame WD for not making HD's that can sustain repeated writes resulting from hibernation in the same area of the disk.
It could also be because it took them nearly a week to respond to my service request when I complained about a bad HD (with complete smart status and error logs to back up my case). All I got back was a UPS label, but I reckoned it took them a while to fully read through my case and decide what to do with it. As it turns out now, it seems they didn't even read it and just needed 6 days to send me a UPS label.
For the last couple of months, I've been having issues with my Linux hibernation. I had it working from the start, but for some unknown reason, it ceased working as of kernel 2.6.16. For the past months I have been unable to upgrade my kernel, since I did not have enough time to find and solve the problem.
This was nasty, since the newer versions of my wireless network drivers require > 2.6.16, the wacom tablet drivers have a few new features in 2.6.18 and there should be support for my (built-in) SD card reader since 2.6.18 (really generic support for SD host controllers ). None of which I could use, since upgrading would break my hibernation (and I really can't use my notebook without hibernation).
Last week, 2.6.19 was released. Even though I couldn't find anything in the changelog that would fix my hibernation (I'm nearly done reading it), I decided to give it a try anyway. Well, waddayaknow? It worked right away! I have to admit that suspend and resume is slower than it used to be (5s vs 2s for the actual writing/reading to/from disk), but it at least it works.
Also, the generic SD card reader support worked straight away, despite a warning in my kernel log:
sdhci:slot0: Unknown controller version (16). You may experience problems.
So far, I've not experienced any problems, though I haven't really done any real testing yet...
Another weird side effect of this new kernel is the occurrence of APIC errors:
APIC error on CPU0: 40(40)
So far, there have been no ill effects apart from this message, so I'll just ignore it for now. It is typical however, that I get this error roughly every 1000 seconds. Oh well...
As an added bonus, 2.6.19 introduces "MSI laptop extras". This allows me to query the state of my WLAN/Bluetooth button and allows my to set the display brightness programmatically. Real nifty, though I'm not sure how to use it just yet...
Update: It seems that suspend code now no longer swaps out applications before writing the memory to disk. This means the actual writing takes longer but starts earlier. In particular it also means that after desuspending, I don't have to wait until firefox gets unswapped first.
Recently, I've added an extra memory module to xanthe, my notebook. Originally, she shipped with 512 MB DDR400 (== 200Mhz) memory. I added 1024 MB DDR400. For some weird reason, this caused my memory to be clocked at 133Mhz instead of 200Mhz, even when both memory modules support 200Mhz. Removing either memory module makes the other module at 200Mhz again.
Tonight I was googling around for a fix for this problem, when I found that a new BIOS version was released (v6.70, while I was running v6.50). Since MSI does not seem to like changelogs, my only option was to just try. Easier said then done, since the supplied flash program needs dos to run. The recommended way for this is, as usual, "Make a dos bootable floppy and run the program". Not having a floppy drive severely limited my options here. So, I googled around and found the "ultimate boot cd", wich should be able to boot into DOS.
Trying the UBC (supplied as a 200M iso download) proved very handy. It provides a FreeDos and OpenDos installation (IIRC, the flash tool worked under OpenDOS, but not FreeDOS). Furthermore, a lot of testing utilities and hard drive tools are included on the CD. Nice to have lying around.
Anyway, updating the bios was succesful (though my laptop did a full powerdown when it was finished, I suspect this was a feature of the flash tool). I was unable to see directly if it also solved my problem, since the new BIOS does not show the memory speed anymore (which would be a very stupid way to 'fix' the problem). But, using Memtest86+ (also on the UBC), I found out my memory was correctly clocked at 200Mhz.
Dehibernating my linux worked, which I did not really expect and I experienced a significant speedup when dehibernating and especially deswapping Firefox. Yay!
Lastly, when I first bought my notebook, I promised to post pictures of her insides and a tutorial on dissassembling the S270. Just now, I've found a S270 disassembling guide by MSI themselves, so I won't bother anymore. I might publish the pictures anyway if I finally get my gallery plugin to properly work.
I mentioned earlier on that I had been given an old NES, without any accessories (no power adapter, no controllers, just the box itself). Having grand plans to use it for various cool mods, I needed to get it to work first. As I am writing this, Brenda is playing Mario bros on my NES, so it actually works!
Using a bunch of borrowed (original NES) hardware, I established that both the NES and the Mario/duckhunt cartridge I had with it, were working. I did need to bend out the pins on the cartridge slot on the NES, but now it seems to make contact properly.
Last week, I bought a second hand NES controller, so I could start experimenting with it. This weekend, while I was in Enschede with Brenda, I have been toying around with it. I borrowed a power supply from Bert, which had conveniently and only supplied AC voltage (which is exactly what the NES wants, though DC should work as well). I connected the NES to the composite input of my workstation's TV card.
After remembering exactly how to properly setup my TV card (haven't been using it in years), I got a properly coloured and sized image. Only, the image was distorted here and there and sometimes sprites would disappear all together. The cause of this was the power supply: When the NES was turned on, it supplied only 6V instead of the 9V the NES required. The solution was to turn up the power supply to 12V, so it supplies about 8V when loaded (yes, the supply is a bit overloaded).
The only problem left so far, is a nasty low buzz in the audio. This is probably related to the unstable power supply, but is nasty nevertheless. I have tried filtering the signal to get the buzz out, but that failed because using my microphone input as an ALSA input just didn't work for some reason.
Anyway, I can now play Mario! Next project: Building my own zapper gun to play duck hunt!
I've been spending this evening for a just cause: Fixing our flat's toaster. It broke down somewhere around yesterday. At first, the toaster would not stay down and on, but later on the glowing wires wouldn't do their glowing act at all. Thinking I'd just have a quick look and repair the thing proved somewhat of a challenge...