RSS

Well that was stupid…easy MythTV fixes

2 Comments | This entry was posted on Nov 23 2008

Just a real quick tip for anyone having problems watching live TV or recording shows in MythTV. After a fairly fresh install I could not watch live TV. My screen would go black for a second and I would be kicked back to the main menu. I also was not able to record shows. The recording would show up on the schedule but nothing would happen when the time to record would actually come. So my tip is check your log files!!! They are stored in /var/log/mythtv (at least they are in ubuntu). You should have mythbackend.log*, mythwelcom.log, and mythfrontend.log* in that directory. The log files are incremented making the highest number the oldest file and the one without a number your newest file. So check the newest file first.
As for my problem I checked my frontend log first, but I didn’t see much information besides the fact that I changed skins. So I decided to check the backend. Here is what I found.

2008-11-23 10:26:22.432 TFW, Error: Opening file '/media/mythtv/recordings/1941_20081123102621.mpg'.
eno: Permission denied (13)
2008-11-23 10:26:22.436 TVRec(1) Error: RingBuffer '/media/mythtv/recordings/1941_20081123102621.mpg' not open...
2008-11-23 10:26:22.437 TVRec(1) Error: CreateLiveTVRingBuffer() failed
2008-11-23 10:26:22.438 TVRec(1) Error: Failed to create RingBuffer 1

Now this may not be too obvious to most people but take a look at “Permission denied (13)”. DOH! I forgot to give my user permissions to the directory I set up to record my shows in (as well as my live TV folder).

sudo chmod 777 /media/mythtv/*

and now I am able to watch live TV and record whatever shows I feel like.
Just thought I would save you the hassle if this happens to you.

Why the Mac Mini sucks for MythTV/PVR

9 Comments | This entry was posted on Nov 17 2008

I bought the mac mini for a few reasons:
1. It is very small and very quiet
2. It looks good with my AV equipment
3. There are a lot of accessories that match the looks of the mini
4. It came with good enough specs for video playback and recording

The main problem I had was dealing with the small/slow hard drive. So I wanted to upgrade that but here are some of the things I ran into.

First of all, the Mac Mini had almost everything I wanted (and some things I didn’t care about) built in. I wouldn’t need to add any features to the device unlike other small computers I was looking at. Most other small computers came with almost everything I needed except one or two thing, built in IR for a remote or firewire. These were requirements for me. I know I could have used a USB -> IR adapter but I wanted this computer to look a little less DIY than my last MythTV. And not having firewire seemed too complicated to try and add my own through expensive adapters.

My goal for the Mac Mini was to upgrade the internal hard drive and use an external 1 TB drive. The reason for this was storage and speed. The internal hard drive in the Mac Mini is only 5400 rpm and while that works fine for web pages and word documents, when reading and writing large media files all day it just would not be fast enough for the task. One option was to install the OS on the internal hard drive and use a external hard drive just for storage over USB but the CPU overhead of USB and the read/write speeds would just not cut it (internal SATA II is over 6 times faster than USB 2.0/Firewire 400). There also is no firewire 800 port so that wouldn’t work either. I tried following a walk through that someone else already did with a mini hard drive upgrade but apparently Apple has updated their device since this was done and adding a hard drive the same way is no longer possible. If this worked for you on a post Nov 2007 Mac Mini please let me know in the comments. The problem I had was the Mac Mini would never detect any hard drive outside of the chassis. I tried with multiple cables, hard drives (2.5″ and 3.5″) but never once was able to get OSX or Ubuntu installed on the bigger hard drive.

To break it down, the reasons the Mac Mini actually sucks for building your own PVR are these.
1. Slow (low storage) hard drive
2. Expensive features that are not needed but you don’t have a option but pay for. (OSX, iLife, Apple tax, etc.)
3. Hard to upgrade processor and memory

And these are the reasons I picked the AOpen over the Mac Mini.
Mac Mini uses a older 945GM chipset with 667 Mhz vs. GM45 chipset with 1066 Mhz, it uses a more power hungry 65nm (T5600/T7200) processor vs. 45nm (T8100 or any socket p processor you want), and GMA950 GPU vs. GMA X3100. Not really big deals considering both should have the ability to play back most 1080p content. But having updated specs just make things a little easier, and the ability to upgrade helps make the PVR future proof…well almost.

For anyone interested, here are some pictures of the steps I took to make the Mac Mini NOT work with an external eSATA 1 TB hard drive.

Sata to eSATA adapter. I was sent the wrong adapter and Microbarn would not accept the fact that this was a female SATA to male eSATA cable when I needed male to male. Even after sending them this picture. P.S. don’t order this, order this.
Adapter plugged into the Mac Mini SATA riser card with a male to male sata adapter I had to buy extra thanks to Microbarn. Maybe I just don’t understand male and female connectors. :)
SATA cable run inside the case. This wasn’t as hard as I thought it would be. See the picture above for what it looked like coming out of a slightly modified Kensington lock hole.

Let me know how a Mac Mini is working out for you as a PVR or what other machine you bought as a substitute in the comments.

Ubuntu CPU scaling

0 Comments | This entry was posted on Oct 16 2008

I ran across a good article on how to scale your processor in Ubuntu. For me this was turned on by default and it really helped my battery life on my laptop and now it is nice to know how to configure it.
Here is the link to the full page. I am going to echo the text here just in case the website becomes non-existent like so many good sites do.

CPU Scaling is a feature built into most modern (mobile) CPUs that allows them to scale up or down in how fast they run and how much energy they suck down based on demand. If you have a fairly modern mobile computer there’s a very good chance that your CPU(s) can handle frequency scaling.

Why should you care? Well, you can control this to tell you computer how much power and how fast it should allow it’s CPU(s) to operate. This can save some energy and thus battery life at the expense of a little performance – which is great for extending the use time of your laptop when it’s unplugged.

Can your CPU(s) handle scaling? There’s an easy way to find out. Open up a terminal session (Applications -> Accessories ->Terminal) and type or paste the following into it:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

On my machine I get back

1667000 1333000 1000000

Those are in Hertz, so my machine is capable of 1.66Ghz, 1.33Ghz and 1.00 Ghz.

Now that you know your CPU(s) can handle scaling, let’s see what modes are available. In the terminal, type or paste:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

Again, I get:

powersave ondemand userspace conservative performance

Powersave will keep the CPU constantly at the lowest frequency. Ondemand will set the CPU at the lowest frequency (in my case, 1.00Ghz) until use of the CPU increases, then it will automatically bump it up to the highest frequency (with me, 1.66Ghz). Userspace means that a different program will be used to control the CPU’s scaling. Conservative is where your CPU will go up as needed, starting at the lowest frequency, and then bumping up to the next available until it maxes out. Performance simply sets the CPU(s) at the highest available frequency and keeps it there.

The lower your frequency, the less power you use. So, if you’re bent on extending your battery life to the max, you’d want to keep your CPU(s) at their lowest frequency – but you’ll do this at the expense of computing power. In my case my 1.66Ghz processors would effectively be 1.00Ghz processors.

Now, how do you actively control this? It’s fairly easy. Right click on an empty space in your taskbar (where your applets and such things as Applications, Places and System are located) and choose “Add to panel”. From there, find the CPU Frequency Scaling Monitor. Double click on this and it will appear in your taskbar. Right click on it and choose Properties and you can set various options like have it show your CPU frequency as a frequency (i.e. 1.33Ghz) or as a percentage. If you have multiple CPU’s or a dual/quad core machine you can also choose which CPU to monitor.

To configure this applet to actually allow you to control how your CPU(s) scale, you’ll have to had back to the terminal.

Type this:

sudo dpkg-reconfigure gnome-applets

This will throw up a nifty blue screen asking you to say Yes. Do so. Then it will ask if you want to install cpufreq-selector with SUID root. Say yes. Once you’ve done this, go back to your CPU Frequency Scaling Monitor in your taskbar and left click it. You should now be presented with a bunch of options from which you can choose the one you want. You can also directly set the frequency at which your CPU(s) will run at, which can be handy if you want to scale up or down for a short bit and then manually change it again.

As you can see, I’ve got mine set to Ondemand, allowing the frequency to scale up through three different settings (1 GHz, 1.33 GHz or 1.66 GHz) as needed.

While this will take effect immediately, it will only be in effect until you reboot at which time your default settings will come back. To change the default head back into your terminal and type:

gconf-editor

From there head to apps -> gnome-power-manager -> cpufreq. Find the settings policy_ac and policy_battery and change them to whichever setting you want for the default.

For those with multiple cores or processors who happen to be a bit needy in the info department (like myself) you can add an applet for each CPU. Just add as many applets as you have CPUs and then right click on them, choose Preferences and use the drop down to choose which CPU that particular applet is monitoring.

Now you know a lot more about CPU Frequency Scaling then you may have when you started reading this article and you know how to set it on your computer.

All credit goes to arsgeek at Hubpages.
While I didn’t use the applets the whole article is very well written and has lots of information.