Writing

Feed Software, technology, sysadmin war stories, and more.

Friday, May 24, 2013

CD/DVD burners are drama magnets

I recently went through another "black box" problem with some computer hardware. I had a CD/DVD reader/writer drive which decided to stop behaving properly. All it was doing was blinking at me, and I couldn't make much sense of it.

It all started when I pulled out a disc I had burned some years before out of storage and attempted to read it on this drive. I had originally created it on this weird VCR/DVD hybrid box while converting a bunch of old VHS tapes to another format. All I got upon putting it in this Plextor drive was a blinking light. I figured that disc had just succumbed to "rot" and wrote it off. It wasn't until a brand new blank did the same thing that I got worried. Was my drive dead?

It occurred to me that it wasn't just a blinking light, but a specific sequence of two amber blinks, and that started me down the road to some yak shaving. If you dig around for "blink codes", you will eventually find a page which describes these conditions. Two amber blinks turned out to mean "auto adjustment failed". Supposedly, this had something to do with the drive being unable to "... configure the focus and track adjustment settings". That page did not specifically cover my model (PX-755SA), so it seemed plausible but not a sure thing.

Now, I've been doing this long enough to know that some kinds of stupidity can be resolved with a software upgrade. Even though a device like this should Just Work and upgrading the firmware shouldn't even be "a thing", it is. I went in search of more.

It seems that Plextor was split up and sold at some point since I bought this drive, and now all of their old URLs are broken. Going in through the "front door" eventually leads to a support page for old products, but the only thing they supply is a Windows .EXE flash program. Yeah, this is not going to work. My only Windows box is a laptop, and this drive is in a Linux box. It just so happens that someone wrote a binary-only program to do exactly this on Linux. Of course, it can't make any sense of the .EXE, and you need to find a raw .BIN file.

I tried running the .EXE on my Windows box in hopes it would actually do some kind of self-extractor which would leave the .BIN behind, but that never happened. I tried going back to the manufacturer's page, but that was no good. Remember how I said all of the Plextor URLs no longer work? This includes any chance of finding a FTP server. One thing which became obvious from all of these dead ends was the filename: "755A108.bin". I just couldn't find it.

Then, my luck changed. I came across a page which matched that string. Actually loading that page gave a whole bunch of unprocessed ASP garbage, but there was one key piece: I could tell that it was linking to the file directly. I edited the URL to point to the file instead just to see what would happen. It worked!

So now I had a Linux burning program and a binary, so it was time to give it a shot. That's when things went sour again.

Plextor drive DVDR PX-755A not recognized (drive info missing in this software)

Did I mention this flashing program was ancient and crusty? The fact I had to get a binary-only "i386" program from 2004 probably explained it. My drive probably didn't even exist back when this was written. Unfortunately, that was also the last version of this "pxupdate" tool, and the author had obviously stopped work on it.

Now I was stuck again. It sure looked like I was going to need to rip this drive out of my machine and get a USB-SATA adapter so it could be connected to my Windows laptop. Then it could be flashed just to be returned to the Linux box, and that adapter would just take up space in storage somewhere.

I tried to change tactics. Devices of a certain age sometimes have DOS firmware burners. This can be useful when Windows is not an option, since it's trivial to get a bootable DOS image online. This sent me back to searching the web and a whole bunch of forum posts. This was also fruitless. There doesn't seem to be a way to do this from DOS.

But then I got lucky once again. During one of my many tumbles through different search engines and query strings, I spotted an interesting snippet:

How can I update the Plextor firmware with pxfw?

It went on to show a series of example commands to do exactly that. Obviously, now I had to figure out just what pxfw was, and that lead me straight to something called QPxTool. It's actually a useful resource on a sourceforge URL in 2013. That alone shocked me.

So it turns out this project exists to let you do "quality checks" of CDs and DVDs and the drives themselves, and it just happens to have a tool which will upgrade the firmware in these drives! I jumped on it and ran it against the .BIN file from earlier. It worked! My drive started reporting back as version 1.08.

It was time to try that DVD again. I put it in the drive and ... nope. Two amber blinks again. I tried some other media. Same thing. During all of this, I kept noticing this program (qpxtool) was complaining about my drive being "locked". That didn't make much sense since it was clearly ejecting the tray on demand. It took a trip into the source code to understand what was going on.

In this context, "locked" refers to the feature set in the firmware. Apparently, Plextor made some of these drives in such a way that they would only do some of their more interesting tricks in Windows. Without some kind of magic unlock sequence, it wouldn't let you do most of the disc voodoo this program promised.

This got me searching for a solution, and the program's forums made it clear: there are people out there who take stock firmwares and edit them. Then you can flash that onto your drive and that will unlock it for full use even in operating systems like Linux. The one my drive needed was called "1_08Xrpc1.bin", and that sent me on yet another search.

I wound up finding a link to this file, but of course, it turned out to be Geocities, and Yahoo killed that not too long ago. The link was dead. That would have been the end of this tangent except for the fact that I remembered something about Geocities recently. A few groups of people had decided to mirror it before Yahoo took it down, and they had put the old content back online at slightly different URLs.

I took the URL and changed the hostname to geocities.ws, preserving the path. It actually worked, and I got a copy of the file. That also worked in the firmware tool, and now I had a drive which no longer threw any warnings about being locked. It also started displaying all kinds of weird info in qpxtool, like how many discs had ever been loaded, how long it had been run in read and write modes, and so on.

I put in the blank again, and this time it gave me an actual error message:

[40401] TRACKING SERVO FAILURE

Other blanks did the same thing. That seemed like bad news, but I decided to keep poking around.

This is where things get a little fuzzy, since I started trying all sorts of things. I still have a stack of old CD-R blanks from the '90s which have no real purpose in life any more, so I decided to torture a few of them. This program has modes for running write tests, so I decided to see if this drive would work for a CD-R instead. Oddly enough, it did! I was able to make it run a full write pass and then a full read pass, and the drive seemed fine.

Then at some point, I plopped a DVD blank in the drive, and ... it worked. Yep, the very same disc from before no longer generated the "two amber blinks" error. I dropped out from qpxtool and ran cdrecord to see what would happen. It actually worked!

I tried another burn. It also worked.

So now, I have a drive which seems to work again, but I'm not exactly sure which round of rubber-chicken waving actually fixed it. My best guess has something to do with two different lasers for CD vs. DVD activity. Maybe the DVD side had some dust or other gunk in it, and it only cleared up after the CD tests I ran? Maybe spinning the disc for all that time knocked something loose, or maybe the CD writer incinerated any dust which had been in the way. Who knows.

I guess this was a heisenbug: the act of trying to find it killed it. Unlike software, however, this bug didn't come back when I stopped looking for it. Whatever I did seems to have actually resolved the problem.

So here's what I figure I learned from all of this.

First of all, ftp.berlios.de is a terrible place to go for Plextor stuff, particularly 'pxupdate'. It's old and cranky. Don't bother with it.

Second, Plextor's URLs all suck. You're better off trying random web site voodoo to find their firmware images now.

Third, QPxTool is an unappreciated little utility which happens to include a very useful tool called pxfw which replaces pxupdate.

Fourth, Geocities URLs all suck too, but more web voodoo can let you get to the original content.

Fifth, once you unlock your drive, you can run a bunch of weird tests on it, and one or more of them may in fact get it to work again, even if it seems unrelated. If the drive won't take DVDs, try it with a CD, or vice-versa.

Sixth, what is it with me and CD-burning yak shaving stories? Are these drives just magnets for drama?