Tuesday, December 15, 2009

MythBuntu 9.10 Quickly Dying Due to missing PCHDTV firmware

So, I have been pretty unhappy with my MythTV for the last week, as something was seriously wrong with it. It would work for a while and then performance would collapse to the point I couldn't even SSH into it. Apparently, there was a massive memory leak, and the swap became exhausted resulting in the kernel doing nothing but try to find a few extra bytes.

This was after I pushed the button to upgrade to 9.10. And if there is anything I less want to do is spend more time tweaking Linux.

Anyway, I took a few minutes this morning to look through /var/log/messages and found it was jam packed with:
...
Dec 14 06:53:40 MythTV kernel: [25073.152929] or51132: No firmware uploaded(timeout or file not found?)
Dec 14 06:53:40 MythTV kernel: [25073.653032] or51132: Waiting for firmware upload(dvb-fe-or51132-vsb.fw)...
Dec 14 06:53:40 MythTV kernel: [25073.653042] cx8800 0000:02:0c.0: firmware: requesting dvb-fe-or51132-vsb.fw
Dec 14 06:53:41 MythTV kernel: [25073.902202] or51132: No firmware uploaded(timeout or file not found?)
Dec 14 06:53:41 MythTV firmware.sh[23812]: Cannot find firmware file 'dvb-fe-or51132-vsb.fw'
Dec 14 06:53:41 MythTV kernel: [25074.401098] or51132: Waiting for firmware upload(dvb-fe-or51132-vsb.fw)...
Dec 14 06:53:41 MythTV kernel: [25074.401109] cx8800 0000:02:0c.0: firmware: requesting dvb-fe-or51132-vsb.fw
Dec 14 06:53:41 MythTV firmware.sh[23823]: Cannot find firmware file 'dvb-fe-or51132-vsb.fw'
Dec 14 06:53:41 MythTV kernel: [25074.780264] or51132: No firmware uploaded(timeout or file not found?)
Dec 14 06:53:42 MythTV kernel: [25075.281031] or51132: Waiting for firmware upload(dvb-fe-or51132-vsb.fw)...
Dec 14 06:53:42 MythTV kernel: [25075.281042] cx8800 0000:02:0c.0: firmware: requesting dvb-fe-or51132-vsb.fw
Dec 14 06:53:42 MythTV firmware.sh[23839]: Cannot find firmware file 'dvb-fe-or51132-vsb.fw'
Dec 14 06:53:42 MythTV kernel: [25075.503654] or51132: No firmware uploaded(timeout or file not found?)
Dec 14 06:53:43 MythTV kernel: [25076.001099] or51132: Waiting for firmware upload(dvb-fe-or51132-vsb.fw)...
Dec 14 06:53:43 MythTV kernel: [25076.001110] cx8800 0000:02:0c.0: firmware: requesting dvb-fe-or51132-vsb.fw
Dec 14 06:53:43 MythTV kernel: [25076.266695] or51132: No firmware uploaded(timeout or file not found?)
Dec 14 06:53:43 MythTV firmware.sh[23850]: Cannot find firmware file 'dvb-fe-or51132-vsb.fw'
...

Googling "Cannot find firmware file" dvb gave me this forum post which very helpfully gave the proper command line solution:
sudo apt-get install linux-firmware-nonfree
Now my MythTV can go 20 minutes without grinding to a halt.

Now, as to whether a missing firmware to a tuner card should bring a linux distribution to a halt is another thing entirely.

Saturday, December 05, 2009

MythBuntu upgrade and mythcommflag killing my MythTV

So, I pushed the button and upgraded the MythBuntu box in the basement, and bad things happened. Oh, the new MythTV interface is lovely. But the box became utterly non-responsive. Turns out that the server had spun up 4 instances of the commercial flagging process and each was taking one quarter of the CPU. And I don't even care if my commercials get flagged or not. Anyway, went into mythtv-setup and turned off commercial flagging, and things got a whole lot better.

How Not to Ask For A Feature

"best RDP" reviews my Signal GH iPhone app for HDHomerun

Title: "piece of junk"
Body:"This thing is worthless until they add QAM cable scanning capabilities."


First of all, the "they" is me, Glenn Howes—father of two, husband, software engineer, PhD Chemist, and occasional iPhone developer. I have made a grand total of $392.05 on this app, yet still found the time to release 2 updates to it when it made absolutely no monetary sense to do so. My work is not junk, it is of the highest engineering quality I could make it. I've spent hours tracking down bugs, ran static analysis of the code, put the executable through performance instruments for memory allocations and performance, and optimized the launch time. I did this when I had other paying projects waiting my time because I like this little app and I want it to be as perfect as I can make it.

It just lacks a feature you desire, a feature which is neither promised nor implied by the product description in iTunes. If you had e-mailed me requesting this feature, I would have seriously considered including it even though an app, who's primary function is monitoring antenna signal quality is not going to be very interesting looking at digital cable traffic. Now, I'm not inclined to add this feature, and you have only your bad social skills to blame.

Wednesday, November 18, 2009

My Unibody MacBook had Been Grinding to a Halt

I'm used to my Macs being reliable; of going months between forced restarts. And yet, two weeks ago, I found myself restarting my unibody MacBook a couple times an hour. Apps would just lock up with the spinning disk cursor, and I'd go to another app and it would soon lock up to. I associated this with something fairly disk intensive, like doing a Spotlight search, and I found that if I avoided Spotlight things would be OK most days. I tried rebuilding the Spotlight database, reinstalling 10.6.0, upgrading to 10.6.2, etc., with no help.

Finally, under the working theory something was wrong with my 500 GB Western Digital Scorpio Blue drive, I ordered and installed a new 640 GB Western Digital Scorpio Blue drive. And this worked. I don't know if it was the hardware or the completely clean install or the act of reinserting the drive, but it worked and my Mac is back to its normal reliable self. And I've got more disk space than I know what to do with. I learned my lesson a few years back about waiting for a hard drive to fail; I no longer give them a second chance at catastrophe.

This might be the last mechanical hard drive I ever buy for a laptop. SSD capacities are overtaking mechanical, and I would certainly pay $300 for a 512 GB SSD of reasonable read and write throughput. Maybe this time next year.

Monday, November 16, 2009

When the Books are Free - Amazon Vine

A few months ago, I noticed an invitation to join Amazon Vine program on my Amazon front page. I clicked on it, realized it wasn't a scam and signed up. And now I get 4 free things a month; from a limited catalog of newly released products. Mostly books are available, but I've also received software and iPod accessories. All I have to do is review three fourths of what I get and I stay in good standing.


It is awesome getting free stuff. The Phillips iPod dock/CD Player/Radio in the kitchen is sweet. But that is the exception, only the quickest get gadgets, and most of the time I have a choice between books and nothing. And getting a free book is hardly a bargain: It takes hundreds of dollars of my time to read, and I don't have the universe of books to pick from, I have whatever is in the newsletter, so I have to be picky and choose only titles which are of use—a book on business law for my wife's business—or of interest—a book on how to draw dinosaurs and aliens.


One nice thing is the motivation to read; to keep up my 75% review rate. It isn't often I read 3 books in 2 months. I just wish they offered more books about software engineering and fewer about adolescent vampires (or whatever constitutes juvenile fiction).


Amazon gets value from me. Under the theory I'll get offered items similar to things I buy or review, I bought a laptop hard drive from Amazon rather than Newegg; and I've been making sure to review anything that moves to push up my ranking. Just passed into the top 3000 woo hoo..


As to whether I'm unbiased about products I'm given to hold on to (I can't resell them), I think I'm OK. I certainly have a happy feeling about being given something nice, but on the other hand, a mediocre book is such a pain to trudge through, and a junky alarm clock just takes up space. So far, I've given out a variety of star ratings, pretty much in line with things I've purchased with my own dimes; maybe a bit lower as at least when I buy something on my own I have some expectation it will be of high quality.


Anyway, when you see the "Vine Voice" badge on a review on Amazon, you'll know it's somebody like me; just an ordinary consumer who likes to write reviews and lucked into getting free stuff.

Tuesday, November 10, 2009

When Apple Doesn't Follow It's Patterns: UIScrollView

A comment in UIScrollView.h
// override points. default is to call touch methods on the content subview. if -touchesShouldCancelInContentView: returns NO in order to start dragging after we have started tracking the content view, we don't drag and continue to feed events to the content subview. if -touchesShouldBegin:withEvent:inContentView: returns NO, we don't send events even if we don't drag

So basically, if you want to modify the behavior of how a UIScrollView drags, you need to create a subclass. Fine, that's basic polymorphism, but it isn't the way most UI behaviors are changed in Cocoa on the iPhone. Typically, behaviors are changed by the use of delegate objects, and there already is a UIScrollViewDelegate interface defined. It's not clear to me why touchesShouldBegin:withEvent:inContentView and touchesShouldCancelInContentView were not just added to the delegate.


Why is this important? Well first of all, one of the joys of Cocoa programming on the iPhone is that the object model tends to be more consistent then desktop Cocoa. Everything fits together, and you know where to look for the hook which allows you to customize your app's behavior.


Secondly, I think Apple was right to choose the delegate model over object subclassing. It's less fragile, in that you are less likely to rely on the original object's behavior being constant. And some Cocoa objects are basically impossible to subclass; for instance UIButton cannot be subclassed because it isn't a "real" object. And from a coding point of view, the delegate solves both the problem of changing behavior and intercommunicating between objects.


So, when you see a comment like the above, it sticks out like a sore thumb in what is normally a disciplined and consistent API.

Monday, November 02, 2009

New Version of Signal GH

Apple has sent me a notice that version 1.1.3 of Signal GH—my iPhone app to get the signal quality of OTA TV broadcasts with an HDHomerun—is available for download. There's nothing flashy about this release, just a variety of bug fixes, including some pretty vexing ones.

Monday, October 05, 2009

iPhone as Baby's First Computer

My son, Wil, wanted to paint on my unibody Macbook this evening. He turned four in September and this was the first time he'd wanted to drive Dad's computer. In the past, "we've" painted by him telling me to "draw an alien fighting a dinosaur." So, I setup Pixelmator in full screen mode, started him up with a blue brush, and let him go to town while I watched The Amazing Race next to him on the couch. And he basically figured it out, with occasional hints from me. He figured out how to switch tools without input from me, and was playing with radial gradients with an arbitrary selection mask in no time. I did notice he was drawing everything with his tiny thumb, which allowed him to put his weight behind mouse clicks on the MacBook's zero button trackpad; I think he would master a traditional trackpad, but the MacBook's trackpad allowed him to better transfer skills he learned from his first computer: my iPod Touch.


He's been using the iPhone interface since he was still 2, and I can still remember my astonishment that he'd mastered the drag to unlock maneuver without any help from me. One of many things, he figured out himself. Thankfully, he has yet to pick up typing my password so he has not been buying apps, although he will make daily trips to the app store looking for new games and will ask me to read the user reviews. He watches YouTube videos and my own collection of videos, plays games, paints, and looks through photos, and has been doing so this entire time. His 2 year old sister does the same, except she has no interest yet in all but the simplest children's games.


In the few times they've ventured to touch my MacBook, they expect that something will happen when they touch the screen. Direct manipulation is so obvious and engrained in how they deal with computers. I've worried if I could even teach them to use a mouse, which seems so foreign and backwards as an input device. But after today's session, I'm not worried. Wil can figure things out; the MacBook trackpad is close enough to what he knows. And he enjoyed learning. I could see how happy he was to learn that pressing the command and z keys would undo drawings.