Friday, January 16, 2009

Adventures with Netflix and the postal service

Here are some of the incidents I've had with Netflix and the postal system:

Netflix's fault: I almost always mail 2 DVDs back in the same envelope. This saves them on postage since I use half the number of envelopes. On a few occasions, they indicated they got disk A but not disk B. This is one of the few cases where I know their computers or scanners messed up. They clearly got them both, but missed one. In every case, later that day or the next day they noticed disk B. I assume the scan-in missed disk B but on the scan-out to the next customer they notice the disk and realize it had been returned.

On several occasions I've had disks not arrive on time. I usually wait 3 extra days. It arrives about half the time, but the other half it never arrives. Netflix is really good and has never given me any hassle about lost disks. Probably because they are a small percentage of all my rentals.

I try to rent movies the moment they are released, before the masses realize it.
The most recent snafu was when I got all but one disk on the expected date. Several of the envelopes were partially torn. And of course, the one disk I didn't get was the one I wanted most. I was hoping the disk would arrive the next day, but instead I got mail from Netflix indicating they had received this back from me! Ack. So I've put it back on my queue and probably won't get it for another 6-8 weeks.

And finally, despite the tone of this post, a big shout out to the US Postal Service. I know empirically over 95% of all the Netflix mailings get to me and also get returned in 1 day. It's really first class service.

Friday, January 2, 2009

Linux and the Nvidia GeForce 6050/7050 IGP - getting rid of the X11 flicker

The goal was a new dual core machine that would be quiet and cheap. Oh I like to have 4G of ECC RAM, too.

So, I installed Ubuntu 8.04 AMD64 many months ago and all went. Almost. It recognized the 4G of ECC RAM. In fact everything was perfect except that when I started up X11, the screen would flicker randomly every few seconds. It's a brief tearing as if there is memory contention (recall that an integrated graphics chipset shares main memory with the rest of the system). It made the system unusable. My hardware is an Asus Socket 939 M/B using the Nvidia GeForce 6050/430 chipset; AMD Athlon 64 X 2 3800+, Kingston unbuffered ECC DDR2 PC4200 RAM, Seagate HDD.

I found that Slackware 12.1 which is based on a 32 bit kernel would not recognize any more than 3G of RAM, though it didn't have the flickering. But I didn't install 4GB to only get 3GB. And besides, I was trying to move away from the big Slack.

Back to Ubuntu....I tried the latest Nvidia drivers of which there are many and not labeled in any coherent fashion. I tried reconfiguring X11 fifteen different ways, I tried searching on Google and LKML, I tried looking at header files and everything I could think of. Eventually I just gave up and let that machine sit. And sit.

It's now 8+ months later and as a Christmas project, I installed Ubuntu 8.10 and again all goes well except the screen still flickers. Not as much but it's still there.

Hunting through the internet, somebody finally nails the problem down for me. In a post not on what caused the problem. Thank you, thank you.

When the CPU changes clock speed, the screen flickers.

The recent Ubuntu releases make use of CPU governors, which dictate if/when the CPU changes speed. The dynamic freq governors, which slow down the CPU when there isn't much load and speed it up when there is are "ondemand", and "conservative". The default is "ondemand". AMD desktop CPUs seem to have the following 3 frequencies they can run at: nominal (max performance), 1.8GHz and 1.00 GHz.

So I changed the governor to "powersave" which simply runs at the slowest speed all the time. (If you know anything about CPU performance, you typically don't lose that much normal performance by halving the speed .. say around 30-35%, unless you are doing CPU intensive computations like floating point). And I get a cooler CPU. On a second system based on the BE-2300 (45W) Athlon X2 3800, the CPU heatsink is barely warm running at the slowest frequency.

How to do this


# As root
% cpufreq-selector -g powersave

# As an administrator
% sudo cpufreq-selector -g powersave


To see the available and current both governors and cpu speed look in /sys/devices/system/cpu/cpu0/cpufreq/

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
powersave

% ls /sys/devices/system/cpu/cpu0/cpufreq/
affected_cpus related_cpus scaling_governor
cpuinfo_cur_freq scaling_available_frequencies scaling_max_freq
cpuinfo_max_freq scaling_available_governors scaling_min_freq
cpuinfo_min_freq scaling_cur_freq scaling_setspeed
ondemand scaling_driver stats

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
userspace ondemand powersave conservative performance