Archive | hardware RSS for this section

Horrible errors on my Linux box.

Horrible errors on my Linux box. When trying to boot up. I mean, eventually it did boot, but this was not good:

Feb 27 15:17:00 lauequad kernel: [21057.921922] ata2.00: cmd 25/00:08:00:08:c3/00:00:16:00:00/e0 tag 0 dma 4096 in
Feb 27 15:17:00 lauequad kernel: [21057.921923]          res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x14 (ATA bus error)
Feb 27 15:17:00 lauequad kernel: [21057.921924] ata2.00: status: { DRDY }
Feb 27 15:17:00 lauequad kernel: [21057.921932] ata2.00: hard resetting link
Feb 27 15:17:01 lauequad kernel: [21058.643829] ata2.01: hard resetting link
Feb 27 15:17:01 lauequad /USR/SBIN/CRON[6290]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 27 15:17:01 lauequad kernel: [21059.118482] ata2.00: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
Feb 27 15:17:01 lauequad kernel: [21059.118493] ata2.01: SATA link down (SStatus 0 SControl 300)
Feb 27 15:17:01 lauequad kernel: [21059.226065] ata2.00: configured for UDMA/33
Feb 27 15:17:01 lauequad kernel: [21059.250462] ata2.00: device reported invalid CHS sector 0
Feb 27 15:17:01 lauequad kernel: [21059.250466] ata2: EH complete
Feb 27 15:17:32 lauequad kernel: [21089.830651] ata2: lost interrupt (Status 0x50)
Feb 27 15:17:32 lauequad kernel: [21089.830669] ata2.00: exception Emask 0x52 SAct 0x0 SErr 0x58d0c02 action 0xe frozen
Feb 27 15:17:32 lauequad kernel: [21089.830672] ata2.00: SError: { RecovComm Proto HostInt PHYRdyChg CommWake 10B8B LinkSeq TrStaTrns DevExch }
Feb 27 15:17:32 lauequad kernel: [21089.830674] ata2.00: failed command: READ DMA EXT
Feb 27 15:17:32 lauequad kernel: [21089.830677] ata2.00: cmd 25/00:08:00:08:c3/00:00:16:00:00/e0 tag 0 dma 4096 in
Feb 27 15:17:32 lauequad kernel: [21089.830678]          res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x56 (ATA bus error)
Feb 27 15:17:32 lauequad kernel: [21089.830679] ata2.00: status: { DRDY }

Except they were all nicely coloured and arranged by vim’s syntax highlighting.


This was in the file /var/log/syslog

Freakin’ scary. I thought one of my hard drives was on the way out. Fortunately it’s not my main drive, the one that houses / and /home, but it’s the second drive which mounts at /home/username/Music.

So, I thought maybe the drive was on the way out. My back ups were up to date, but I noticed that when I want to have a look in ~/Music, there were some files that were corrupt. On boot the messages included one telling me to run fsck on /dev/sdb1 (the Music partition) and then dropping me into a shell, and then fsck told me it could not fix the drive…


Double-checked my backups were current, then unmounted the partition and used gparted to reformat it freshly as ext4. Started to copy the files across from the backup.

Stopped. Could not access the drive.


Remembered an old POST OF MY OWN.

SATA cable plugs sure do wiggle in their sockets. A lot more than old IDE ribbon cables.

Powered down. Removed power cable. Opened case. Noted which SATA cables went from which socket on the motherboard to which drive. Removed them all, blew some dry air into the plugs and cable ends. Replaced the cables and gave them a good wiggle, then left them, making sure they were not getting tugged out or sideways by tension but were square in the sockets. This involved rerouting some cables so they were more comfortable, and tying a bunch of unused power plugs up out of the way.

Reboot. No error messages. Mount back up drive. Copy 240+ GB of backups onto blank drive. All faultless. Seems to work perfectly.

Take home message: SATA cables are fussy and can cause problems that might look like something worse.

Something worse.

Getting lp, lpq and lpstat to work…

I want to be able to use lp and print from command line, not just from gui. My Linux box (Debian, running FLWM as window manager), prints fine from applications with print dialogues, for example LibreOffice or evince, but I want to be able to use lp, a2ps, maybe print from xFig, and these all use the lp command line interface, and that is not set up.

I know I can go ($ is command line prompt)

$ lpadmin -d [printer-name]

but what is ‘printer-name’? I have a couple of printers attached by USB, not network.

It’s actually very simple.

$ lpstat -a

FUJI_XEROX_DocuPrint_CP305_d accepting requests since Wed 02 Nov 2016 13:26:34 AEDT
HL5340D accepting requests since Wed 14 Dec 2016 17:33:54 AEDT
Stylus-TX100 accepting requests since Tue 13 Dec 2016 20:19:20 AEDT

$ lpadmin -d HL5340D


Wacom tablet, Debian, shenanigans.

Getting Wacom tablet to work…it ought to work out of the box, though my system is getting a little old… anyway, the details…

Wacom PTH-851 (Intuos Pro).

$ uname -a

Linux machinename 3.2.0-4-amd64 #1 SMP Debian 3.2.82-1 x86_64 GNU/Linux

Debian 7.xx, always kept pretty much up to date.

Don’t usually use gnome, but opened a gnome session and ran the ‘Wacom’ control panel GUI thing. Got:

‘No Tablet Detected’


$ lsusb | grep Wacom

Bus 002 Device 006: ID 056a:0317 Wacom Co., Ltd

So the USB device showed up (I am not using bluetooth).

$ xinput list

⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                    id=4    [slave  pointer  (2)]
⎜   ↳ Mouse USB Laser Mouse                         id=8    [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                     id=5    [slave  keyboard (3)]
    ↳ Power Button                                    id=6    [slave  keyboard (3)]
    ↳ Power Button                                    id=7    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                    id=9    [slave  keyboard (3)]
    ↳ ACPI Virtual Keyboard Device                    id=10   [slave  keyboard (3)]

$ lsmod | grep wacom

No result.

So no kernel module.
Why not? All the Wacom packages are installed, according to apt-get…. Probably just not loading the module, but… Anyway…

$ cd installs/
$ mkdir wacom
$ cd wacom

Browsed to:

and download the latest version.

$ tar xjvf input-wacom-0.32.0.tar.bz2
$ cd input-wacom-0.32.0/
$ ./configure
$ make
$ sudo make install

It said:

Warning: you may need to install module-init-tools

$ sudo apt-get install module-init-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
module-init-tools is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

OK, rebooted.

$ lsmod | grep acom
wacom                  56840  0
power_supply           13475  2 nouveau,wacom
usbcore               128741  6

$ xinput list

⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                    id=4    [slave  pointer  (2)]
⎜   ↳ Mouse USB Laser Mouse                         id=8    [slave  pointer  (2)]
⎜   ↳ Wacom Intuos Pro L Pen stylus                 id=9    [slave  pointer  (2)]
⎜   ↳ Wacom Intuos Pro L Finger touch               id=10   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos Pro L Pen eraser                 id=13   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos Pro L Pen cursor                 id=14   [slave  pointer  (2)]
⎜   ↳ Wacom Intuos Pro L Pen pad                    id=15   [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                     id=5    [slave  keyboard (3)]
    ↳ Power Button                                    id=6    [slave  keyboard (3)]
    ↳ Power Button                                    id=7    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                    id=11   [slave  keyboard (3)]
    ↳ ACPI Virtual Keyboard Device                    id=12   [slave  keyboard (3)]

And it worked!

And gone.

Last one, I promise. Olympia SF De Luxe

Uh oh. I’ve now got four. That counts as mania. This one was on ebay for $10. It had a sticky ribbon tensioner that prevented the ribbon from feeding, and has a few marks, and the case is perished a little and missing the handle of the zip, though the zip works. Came with a Pelikan eraser, too. Not too bad.

Olympia SF De Luxe. About 1963, I think.

Olympia SF De Luxe. About 1963, I think.

The reviews are good for these. Indeed, now that have a Hermes, an Olivetti, a Brother and an Olympia, I feel that I have a god cross-section of the more common good-quality brands. Enough!

While it needs a bit of attention, it is clearly an impressive machine. It has visible margins, a spring-up paper stand, a carriage lock that works from the top, a good-sized return lever, ribbon selector, a ‘1’ key, metal reels on the ribbon, line spacing selector. Pretty much everything except a tab key, which is not something I miss, and more of an office machine feature anyway.

On unsticking the tensioner, the ribbon started to feed. It was too faded to be of any use, and I get the impression from the sticking that the unit had been in storage and unused for a very long time and could use a little oil. ‘q’ and ‘y’ seemed to stick a bit, with the typebars not returning after a strike; but ths improved with a little use, and with moving the touch regulator all the way to ‘+’. And if things do stick, due to stickiness or hitting more than one key and them jamming, the margin release key doubles as an ‘unstick’ key; very handy. ‘G’ sits a bit low on the keyboard as if its stalk is bent, but works fine. The rubber grommets that seat the lid are completely hardened and crumbling away.

Olympia SF De Luxe text example.

Olympia SF De Luxe text example.

But these are quibbles that can be sorted out with a little care. The key press is very short and definite. It is carriage shift (the paper goes up and down, not the typebars), but on a portable, small machine like this the weight is not a problem. The bell is clear, the whole design careful and extremely well thought out, and the feature set remarkably rich. The text is extremely well-aligned, though even with a new ribbon not very dark. Dark enough, however. In summary, a very fine machine.

Made in Wilhelmshaven by Olympia Werke AG, (Western Germany). Ser. 95-701687 (really good photos of an essentially identical one here).

A real carriage shift.

A real carriage shift.

Scrappy case.

Scrappy case.

Steel reels

Steel reels.

The ribbon feed. De Luxe.

The ribbon feed. De Luxe.

Reink sample: A few weeks later

Just posting a sample of text from reinked ribbon a week or two after doing it. Looks OK to me.


Small sample. Real colour. Low res.

Small sample. Real colour. Low res.


Hi res, well, 300dpi anyway.

Hi res, well, 300dpi anyway. On used paper, so there is some show-through.

So, it’s not very blue but it is blue. It is pretty even, and has actually improved since I did it. And it has had plenty of time to dry out and it hasn’t, even the bit of ribbon near the paper and which is exposed to the air. Maybe if I left the machine unused for weeks it would dry out, but so far it looks like the glycerine works.

Time wasters.

Reinking a typewriter ribbon II: My crazy experiments yield something

This follows on from part I.

So the next thing to do was get a clean glass jar, drop in twenty or so drops of ink and one of glycerine, then mix. Well, here is a numbered list of things:

(1) I made up a small jig to hold two spools. The spools were not parallel enough, but it was okay for a first pass.

Do a little jig.

Do a little jig. I just wound the spools by hand.

(2) Between the spools I put a stamp pad, and I loaded the stamp pad with some Artline stamp pad ink that had been mixed with glycerine, the latter simply bought from a supermarket, from the cake-making aisle. The ratio of ink to glycerine was about 10:1, possibly richer in ink than that.



(3) I used a glass jar held on its side to push the ribbon against the pad as I wound the ribbon from one spool to the other. I recharged the pad a couple of times on the way.

(4) When I was done I dropped a little excess ink on the tightly-wound spool and let it soak in, just because I had some left. I wanted to see if the glycerine stopped the ink from drying out too quickly, so it was better to err on the side of having extra ink, so that I could be sure that a simple lack of ink was not the problem.

(5) I note that the ribbon is quite old (metal spools) and rather frayed which leads to stray strands of nylon flopping around and giving unwanted spidery lines on the page. Can’t blame the reinking for that.

(6) I found that immediately after reinking it worked pretty well. An hour later it still worked just as well. Next day even the exposed bit of ribbon was still usable, so it seems to work! I seem to have put too much ink into the ribbon, and not as uniform as I would have liked, so probably not much good for serious work, but for a few notes and whatnot it would be fine, and with a bit of trial and error I think I’ll be able to get ribbons that can do almost a well as a bought one, and in some funky colours. Can even experiment with buying a lightweight half inch nylon ribbon and inking it.

Not exactly brilliant, but a good place to start.

Not exactly brilliant, but a good place to start. Scan is b&w so not blue at all.

I am wondering if a different brand of ink — Horse brand comes to mind — would not need the glycerine added. I’d be interested to hear.

Live and don’t learn.

Reinking a typewriter ribbon: My crazy experiments

So first I needed some stamp pad ink. I got that at TCF in Canberra. They sell Artline stamp pad ink in 50 cc bottles for about (at time of going to press!) $A6.00 each, which is very reasonable. Most excitingly, it comes in a range of colours — blue, black, red, green and violet. Fantastic. I would like to be able to type in green in particular. I could buy a ribbon, and not for much money, and some nice colours are available, but I’d rather do an experiment first. Now, when I bought my Olympia, it came with a completely dead ribbon. A two-colour ribbon, the customary red and black. It was very dead, though on two nice pressed-metal spools. I also had a nearly-as-dead one on plastic spools. I kept them both for experiments…

A couple of plastic spools.

A couple of plastic spools.

Now, plainly you should always reink a ribbon with the colour it was originally. That would essentially restrict me to reinking in black and tossing out the two-colour ribbons. But the ink is only $6, and the ribbons are useless anyway, so a better idea is to monkey around first.

Reading around the web, it is clear that there are essentially two schools of thought on reinking a ribbon (assuming you are going to bother at all). First, some just say wind it onto a spool as tightly as you can, so that it is a sort of single mass of nylon, put ‘some’ ink on it and let it rest, possibly rotating it periodically, to let the ink spread through the ribbon via capillary motion. The other method talks about inking a stamp pad, laying the ribbon on the pad, laying a weight on the ribbon and pulling the ribbon across the pad under the weight. This on the surface sounds more convincing, but also more effort. And I only have one stamp pad and it is purple/violet, not that that would be a bad colour to have for a ribbon.

So, what I am going to find out initially is: does the lazy method work, and does it work on a ribbon that used to be two-colour but is very dried out? Some articles talk about rejuvenating ribbons using a spray of WD40, but I want to steer clear of those kinds of solvent chemicals for now. That will come along if it looks like the ribbon won’t wet properly.

Anyway, I wound the ribbon onto one spool, keeping it under tension just with my fingers. (Using very dry but two-colour ribbon, so may make a horrible mess.) I started with just a few drops of ink, since I had no idea of quantity, but that did very little. So more and more, but the ribbon was blotchy, as if the ink was not spreading enough. Tried adding a few drops, rotating ribbon a few degrees, and repeating until a full circle. Left ink to spread for some hours. Looked unchanged, as if it had not spread. I am thinking it is the wrong ink — it seems to wash out in water, which suggests it will dry off too fast. This was confirmed when the ribbon that was exposed to air (the bit between the spools, when I put it on the typewriter) was a different colour (blue) to the eye, but when I tried to type on it after a few hours it gave me the same almost-invisible red and black the ribbon had had before I dyed it.

In other words, the ink was drying out and ceasing to do anything except crufty up the ribbon.

So the experiment was dead, except I tried one more thing. Even though I knew the ribbon would not keep, I tried making a wooden frame to hold the spools, placing a well-inked stamp pad between the two spools and winding the ribbon from one spool to the other while pressing the ribbon against the stamp pad with the back of a wooden spoon. Visually, the ribbon looked far more uniformly inked, and when I went to use it right after the test, apart from getting ink on everything when I threaded it on the typewriter, it worked quite well — too dark, if anything.

Hence, I have the following conclusions: If I try this again, I’ll research the ink I use better first (I had read on the web that stamp ink was the way to go, but I assume not all inks are equal). Also, I’ll make an improved version of my wooden frame and use the stamp pad method rather than just expecting the ink to spread.

Next: glycerine.

‘pod’ is an interesting word because it has a two-fold rotation axis.

Live and learn.

Live and learn.


Copying Librivox files to my mp3 player and getting them to play in the right order.

I don’t know how common this is, but I have an mp3 player, a Philips one in this case, a ‘GoGear RaGa’, which has to be one of the worst names ever. Anyway, when I download an audiobook from Librivox, and copy the mp3 files into a directory on the player (let’s assume I just use a folder off the root directory of the player. On my Debian system it mounts at /media/PHILIPS), they don’t play in the correct order, even when the files have names that list in the correct order. So I don’t know how the mp3 player orders them for playing, but it means that whenever a chapter ends I have to manually select the next file, rather than letting it play through. It is a pain.

Philips mp3 player, GoGear Raga. A few years old now...

Philips mp3 player, GoGear Raga. A few years old now…

One time I copied them over and the mp3 player played all the odd-numbered files then the even numbered ones, so I am wondering if it is something to do with the date/time/second the files were copied, and the way in which I copied the files (say a GUI that does them in some weird order or something, I have no idea). Hence, a belt-and-braces approach:

(1) I named them so they were properly consecutive. Note that 1_name.mp3 will often come after 10_name.mp3 since 0 comes before _ in ASCII value, so it was important (maybe?!) to use names like 01_name.mp3.

(2) Created a directory on the mp3 player and copied the files in the order I wanted them to play with separate copy commands. eg:

cp 01_filename.mp3 /media/mp3player/folder
cp 02_filename.mp3 /media/mp3player/folder

Now, if this is scripted, I suggest incorporating a pause between copies, to ensure that the times on the files are what is needed. For example, I would do an ls command to make sure the files come out in the order needed, then perhaps a script like below, where I run the script from the folder on the desktop computer that has the mp3 files in it:

mkdir $1
for f in *.mp3
  cp -v $f $1
  sleep 2s

so if the script is called copymp3 and made executable (chmod +x copymp3) and in the directory with the mp3 files, then I type:

./copymp3 /media/PHILIPS/foldername

and it will create /media/PHILIPS/foldername then copy a file, wait 20s, then copy the next. ($1 is just the first command line argument given to the script). Now, Linux will sometimes not actually do the write until some action occurs (hence the need to always unmount USB drives etc before removing them), but I have tried doing it this way and so far it seems to work; I can now start playing the first file in the folder and the mp3 player will jump to the correct next file.

I don’t see why a similar method would not work on Windows, just changing the script appropriately for the different environment.


Magical unrealism.

Brother Deluxe 700T

So I am trying out this old Brother Deluxe 700T manual typewriter. It is is nice condition, and seems to work perfectly well. The bell sounds dull and the ribbon is faded but does feed. The machine works well and it is my only machine with a ‘1’ key (instead of using ‘l’) and an exclamation mark (!). On the other hand, it feels sloppy and tinny compared with the Dora and especially the Hermes, which feels like it was machined from solid lump of steel where this feels more like it was riveted together from pressings. Good pressings, I suspect. It’s in great nick and set me back $20, which is pretty reasonable. I’ve put a two colour ribbon in it, since the other ones have black.

I can’t be bothered inserting pictures carefully, so here they all are:

Brother Deluxe 700T with it's top on. Beige beige beige.

Brother Deluxe 700T with it’s top on. Beige beige beige.


With the top off. Case in background. All plastic but all in good condition. Why is tab in red? Is it dangerous?

With the top off. Case in background. All plastic but all in good condition. Why is tab in red? Is it dangerous?


Some type from the Brother, man.

Text in two colours. The machine produces stuff that looks good on the page, though it feels flaky under the fingers while typing, as if bits are bending and flexing, but everything seems to end up in the right place when the typebar comes down.


My Brother from Nagoya.

My Brother from Nagoya.

Quick wipe with a bit of Jif on the casing, no cleaning of the machine itself required, and away it goes. The case is very plasticky, and looks quite flimsy, so I am quite impressed that it is so intact; I suspect it has not been used very much. No doubt being owned by me will see to it that the plastic lugs and springs and other vulnerable bits get broken. But in the meantime it gives me another unit to, well, put somewhere.

Nagoya B75635279, means was made Feb 1977. ‘JP-7’ model, under the hood.

Conclusion: The type is clear, with excellent contrast and readability. It has a paper stand, an eraser table, 1, 1.5, 2 line spacing, fixed but useful tab stops, a carriage lock (that I cannot get to work, though I can’t see anything wrong with it, so probably it is me), a ‘1’ and an exclamation mark (bang!) and an asterisk (*). I would say the selection of characters is probably superior to my other machines. It feels tinny but actually works very well and is lighter than my other machines (because uses a lot of fairly thin plastic). If results are important and ‘feel’ is not, it is an excellent machine. If ‘feel’ is as important as results, it does not match up with the Hermes. Brand new it would have been a lot cheaper than the Hermes (and it was cheaper second hand as well, though of course none of them cost much) and probably cheaper than the competing Olivetti, though, so I can see why there are so many Brother typewriters around.

This I think shows how clear and well-aligned the type is. The OCT routines I use work better with this than with the other machines I have.

This I think shows how clear and well-aligned the type is. The OCR routines I use work better with this than with the other machines I have (I will admit I thresholded the image in ImageJ because there was some show-through of type on the other side).

Nothing you needed to know, for sure.

Install HP LaserJet on Win 98

Note: This is a pointless note to myself.

I wanted to install my old LaserJet II on a Win 98 box. There’s only one trick to this; go here: and get the file lj120en.exe (or whatever language) and put it on a USB drive, after installing USB software on Win 98, which I outlined here. Or get the file into Win 98 directly if it is networked, or via a floppy or a CD or whatever. The exe file can be unzipped using any zip program, or you can run it and let it unzip itself. Note that if you can find out which file you need from this repository, you may well be able to use the other files there to install any number of devices. This is just one example; but HP do not keep old drivers on their website, so this is a useful site to know about.

Then just use Settings -> Printers -> Add Printer and click through the various dialogues and tell it to find the files wherever you have copied them to (‘Browse’ button). Then make sure your printer is connected and turned on and has paper in it, and go and see if the test pages works. It did for me.

Why? I have an old PC non-networked and an equally old printer with plenty of toner but no connection to a USB-only modern machine, and I just want to use the old hardware to print out some rough drafts.


Print that.