The Treehouse Blog

Linux

MythVideo Thumbnails

by on Jun.19, 2009, under Linux

After having been embarrased by seeing Windows Media Center have thumbnails of all video content, I found this script to populate the thumbails in MythVideo from within the video.  A lot more useful for me than the manual IMDB lookup process that I think MythVideo has natively.  Definetly spruces up the MythTV box!

Comments Off on MythVideo Thumbnails : more...

PVR remote upgrade

by on May.26, 2009, under Linux

I’ve had a Logitech Harmony 550 for a few months now, but I’ve only used it to replace the remote for the TV and receiver up to this point.  More recently, but still awhile ago, I bought a serial IR receiver (yeah, should have make it myself, but was lazy).  This evening I finally put the pieces together and got MythTV working with it.  Fortunately, someone already has a decent remote template and config files for the Harmony which I put to use.  Between the Harmony and the receiver, it works at almost any angle, so I’m not losing as much flexibiltiy from my RF-USB remote as I thought.

Comments Off on PVR remote upgrade : more...

Brute-Force WoL

by on Mar.21, 2009, under Linux

For some time now, wake-on-LAN has not been working on my home server PC.  I had been using WoL to wake the machine via a cron job on my firewall before I got home from work, and also to power the machine on remotely if I needed to get a file or such.  I had guessed a kernel change was to blame, but several updates since have not resolved, and my search for related bugs only turned up advice that didn’t work.  So, I threw in an Intel e1000 and cabled it up (using the on-board for most purposes, as the e1000 is only PCI), and WoL “just works” with the e1000.  FWIW, the on-board is an Nvidia MCP55.  Problem solved… or at least worked around.

Comments Off on Brute-Force WoL : more...

PVR Booting with LCD off

by on Feb.10, 2009, under Linux

When things are working well, my PVR box is supposed to wake-on-LAN about the time I get home, and be ready for use.  Since the LCD, the box wouldn’t be driving the display after boot.  I would have to kill and restart X with the LCD powered on.  Apparently this is due the NVIDIA driver needing to read the EDID from the LCD to figure out what resolution to use.  I tried a variety of ways forcing it to work without validating the resolution, but I ended up downloading the EDID to a file (using the nvidia-settings gui) and having the driver run against that.  Not that inelegant, I think.

Section "Device"
        Identifier  "Videocard0"
        Driver      "nvidia"
        VendorName  "NVIDIA Corporation"
        BoardName   "GeForce 7300 GS"
        Option      "UseEvents" "True"
        Option      "CustomEDID" "DFP-0: /var/lib/mythtv/edid.bin"
        Option      "ConnectedMonitor" "DFP"
        Option      "MetaModes" "DFP: 1920x1080"
EndSection
1 Comment :, , more...

Storage

by on Mar.17, 2007, under Computers, Linux

Warning – long and boring. This is
as much for my reference than anything else.

It started Friday – several weeks
ago. In the evening, one of my drives, a 250GB SATA, threw some
errors. The RAID5 wasn’t terribly concerned, it corrected the reads
and was happy. There were probably less than a dozen errors, and it
didn’t kick the drive from the array. I made a note of it, but
didn’t bother kicking it out manually.

Early Saturday, a 400GB drive dropped
out of the array. This drive does this from time to time, going
utterly unresponsive but fine upon reboot. I re-added it to the
array, and it began to sync up. Chris and I went to the new Circuit
City in Chambersburg, as he needed to get a power supply for
debugging a box lockup issue. I decided to buy one of those
new-fangled DVD burner thingies, as it was probably about time I had
one. Upon getting home, my array was not happy. I had 3 active
members on a 5 device RAID5. Rebuilding the 400GB had sent the
ailing 250GB over the edge, kicking them both out of the array. It’s
a curious thing to see in /proc/mdstat. The metadevice stayed
active, but degraded. Ext3 freaked out and dropped to read-only. I
really would have expected the metadevice to deactivate under those
conditions… or better yet, be very reluctant to kick a drive from
an already degraded array. If only I had kicked the 250GB manually,
this would have been a bit less stressful. So, then the contingency
planning starts. Do I force the array back together, and try
resyncing the 400 again? Will the 250 be so badly corrupted that it
makes more sense to force the mostly-current 400 back in the array
instead of the 250? Should I dd the 250 to another drive, since dd
should at least keep going instead of giving up on the errored
sectors? Not pleasant thoughts or options. SMART data was
indicating that the temperature of the drive was over 60C–hotter
than the box’s CPU. I moved it to another machine for diagnostics,
which didn’t turn up anything. The Hardware_ECC_Recovered was
varying rapidly (not that that necessarily means anything…), so I
decided it was time to be replaced. I ordered a 500G (WD5000YS) and
another Promise SATA-II TX4 PCI card from Newegg. Later that night,
I put the 250G back in the box and tried the resync again. I watched
the resync all night (something like 4am), waiting for it to either
fail, or complete. I wanted to boot the 250G from the array at
completion, so this wouldn’t happen again. Yes, I could have and
should have scripted it. I was worried about my data! The resync
completed successfully with no errors. Seems the 250G was much
happier after it had flagged its bad sectors.

On Sunday, I really couldn’t do
anything about the array, so I started down the second storage path
of death for the week: the DVD-R drive. I installed it in my
desktop, fired up k3b, burned a backup DVD of several years of
photos, and it seemed fine. But I could mount it anywhere. Turns
out that it (k3b and/or growisofs) wants to burn DVD+Rs as unclosed
multi-session discs. Fine. Turned that off, and burned myself
another one. It was fine. It was nice to have something work for
once.

On Monday evening, feeling lucky from
the day before, I tried burning some more photos to DVD, but it was
not to be. IDE errors would start spewing into dmesg, growisofs
(which had elevated itself to a nice of -20) began consuming the
entire machine, making it unusable. I tried different speed
settings, just about any option k3b had to offer. I moved the IDE
cable to a different controller, tried changing cables, anything…
DMA settings, I looked for firmware, but the thing is a no-name OEM
drive probably originally from Lite-On, but their firmware won’t load
on it, and the site supposedly having the firmware genericizer was
down. Of course, I gave up at some point and burned something in
Windows which was fine… ARRGH!

Tuesday was supposed to be the day of
productivity. The new drive and controller arrived, and I installed
them. I spent a little time tooling the partition table and began
the resync. The mirror resync’d very quickly at 30-40MB/s. The
RAID5 resync stayed around 27MB/s when the system was idle, but
dropped considerably otherwise. The old setup would only resync
around 20MB/s, and was otherwise usable. But at 27MB/s, the system
crawled, yet wasn’t using up 100% CPU. I think this is the surreal
PCI bus exhaustion experience… 27*5=135, and 133 is the maximum for
a 33MHZ, 32-bit, PCI bus. But many of my PCI devices (including the
northbridge), are 66MHz capable, and from what I’ve read, 33MHz
devices shouldn’t be holding back the 66MHz ones entirely, but I
couldn’t find out how to test/debug this further. Later I found out
that the 66MHz-capable bit doesn’t mean very much, and what you
really need is a 66MHz-capable PCI bus – which mine isn’t. Myth
wasn’t happy about this, as ivtv wasn’t getting read from fast
enough. The system otherwise felt very sluggish. I left the box up
to resync overnight. I fought with the DVD drive some more, too.

Wednesday morning, I checked on the
status of the resync. But the box had locked up. I rebooted it and
checked the logs. The resync did complete, but sometime later, there
was an unhandled interrupt on the IRQ shared between a SATA
controller and the video card. Linux then disabled the IRQ, causing
all of the drives to fall out incrementally. I brought the box back
up, and had to force the array to be “clean” so that it would
re-assemble (echo clean > /sys/block/md0/md/array_state … there
appears to be no mdadm equivalent of this action. And you have to
write something to the device then for the superblocks to get
updated.) I eventually and experimentally determined that running
SMART commands on the new 500G drive is what causes the unhandled
interrupt. It takes time for the problem to manifest though –
maybe it’s a race condition somewhere. I haven’t found anything in
the kernel mailing lists about this, so I will have to research
further and maybe post about it.

As far as the DVD drive, I tried
different media with equally mixed results. I eventually returned it
to Circuit City and bought a better and cheaper Samsung from Newegg.
It seems to work much better… no spewing of IDE messages. I almost
made myself buy a SATA one, but I didn’t want to buy yet another SATA
controller and risk more problems with compatibility.

And the 250G seems fine now, so it
didn’t get tossed either. Sigh.

Comments Off on Storage more...

June 2021
S M T W T F S
 12345
6789101112
13141516171819
20212223242526
27282930  

Archives

Content Copyright © 2004 - 2019 Brady Alleman. All Rights Reserved.

As an Amazon Associate I earn from qualifying purchases.