Sunday, May 21, 2006

Addressing the heat problem with grumpy

Grumpy, my MythTV box, is running continously. The PVR-500 is running hot, the NVidia graphics card (fanless) is running hot, the CPU is running hot, the northbridge isn't exactly cool either, neither is the hard-drive.

When I first put this together, I used only the single fan that came with the case (Antec Overture). It's temperature controlled and with all the heat was quickly running at full speed after I closed the case, along with the associated noise. Even though it is a silent fan, it's not the most quiet around. I like the Coolermaster SAF-S84-E1. Virtually quiet.

I installed a fan next to the PVR-500 that blows air out of the case through the open expansion card slots. However, it didn't get enough air flow. So, I built another Coolermaster ultra-quiet fan in the 5 1/4" expansion slots:





Sunday, May 07, 2006

Piggy-backing off SpeakEasy's mail rejector

I'm running postfix with spamassassin and procmail on chef. The system works quite well. The amount of spam we see in our mailboxes has come down dramatically compared to a few months ago. I'm using SpeakEasy as default relay to work around a deficiency in SpeakEasy's domain sender verfication.

Patricia is forwarding her mail to a gmail account for easier and faster searching. SpeakEasy's sender domain checks are more stringent occasionally than what I use (and the spam checks on chef are performed on user delivery, not when I accept mail and forward it on to gmail.com). So I regularly end up with entries in my mail queue that are rejected by SpeakEasy (and I have softfail enabled).


-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
473825800 3908 Sat May 6 00:24:50 abcdf@0451.com
(host mail.speakeasy.net[69.17.117.59] said: 553 sorry, your mail was administratively denied. (#5.7.1) (in reply to MAIL FROM command))
_______@gmail.com

3EAED52BF 5611 Thu May 4 23:34:11 huneycu@alma.net
(host mail.speakeasy.net[69.17.117.59] said: 554 refused mailfrom because return MX does not exist (in reply to MAIL FROM command))
_______@gmail.com

60D3E53FF 3900 Sat May 6 00:22:11 dage3@0451.com
(host mail.speakeasy.net[69.17.117.59] said: 553 sorry, your mail was administratively denied. (#5.7.1) (in reply to MAIL FROM command))
_______@gmail.com

DC5E752C3 3303 Wed May 3 23:31:49 czj@0451.com
(host mail.speakeasy.net[69.17.117.59] said: 553 sorry, your mail was administratively denied. (#5.7.1) (in reply to MAIL FROM command))
_______@gmail.com

A579A537C 1538 Fri May 5 14:54:49 awawa@0451.com
(host mail.speakeasy.net[69.17.117.59] said: 553 sorry, your mail was administratively denied. (#5.7.1) (in reply to MAIL FROM command))
_______@gmail.com

-- 18 Kbytes in 5 Requests.


I added the following to /etc/postfix/main.cf:


smtpd_sender_restrictions =
reject_unknown_sender_domain
reject_unverified_sender


The first test will do a DNS lookup on the sender domain and make sure there is either a MX or an A record returned. The second test will actually try to initiate sending an email to the sender ("email callout"). Since I'm smart hosting through SpeakEasy, I'm actually not hitting the destination mail server (and won't participate in e.g. JoeJobbing aol.com). Instead, this just asks SpeakEasy's mail server whether it would allow an email from that domain to go through later when it'll be forwarded to gmail.com after it finally got accepted on chef.

Here's an example SMTP session with this feature enabled:


$ telnet mail.goodcoffee.net 25
Trying 216.27.180.215...
Connected to dsl027-180-215.sfo1.dsl.speakeasy.net (216.27.180.215).
Escape character is '^]'.
220 chef.goodcoffee.net ESMTP Postfix
MAIL FROM:
250 Ok
RCPT TO:
450 : Sender address rejected: undeliverable address:
host mail.speakeasy.net[69.17.117.59] said: 554 refused mailfrom because
return MX does not exist (in reply to MAIL FROM command)
quit
221 Bye
Connection closed by foreign host.


Note how chef responds with the error message from mail.speakeasy.net. The respective maillog entries nicely show how the verify(8) server is calling out to speakeasy.net while the incoming connection is still open.

Oh yes, the MX entry for alma.net is kinda amusing:


$ dig mx alma.net

; <<>> DiG 9.2.4 <<>> mx alma.net
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6518
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;alma.net. IN MX

;; ANSWER SECTION:
alma.net. 7200 IN MX 0 dev.null.

;; AUTHORITY SECTION:
alma.net. 7195 IN NS ns.buydomains.com.
alma.net. 7195 IN NS this-domain-for-sale.com.

;; ADDITIONAL SECTION:
ns.buydomains.com. 172795 IN A 208.254.3.177

;; Query time: 87 msec
;; SERVER: 192.168.200.1#53(192.168.200.1)
;; WHEN: Sun May 7 09:43:16 2006
;; MSG SIZE rcvd: 132



(Of course, I could just disable the softfail feature of postfix and the annoying entries in my mail queue would go away, but that wouldn't be so interesting...)

Update:
So, that ended up being a really stupid idea. Apparently, the mail check on SpeakEasy's server
failed 95% of the time and all legit mail was blocked (amusingly, spam still got through...). I took this out again. Doesn't seem to work the way I expected.

Saturday, May 06, 2006

Getting ShiftTV segments to grumpy

We have over 35GB of content downloaded from ShiftTV. In the one week MythTV is running here it already filled up 40+GB with MPEG2 material from the cable broadcasts.

So, we copy on demand:
- I added an icon Patricia's desktop to open up a sftp kio slave to grumpy with ssh authorized_keys login (URL: sftp://mythtv@grumpy/opt/movies/)
- copy over the move to that folder
- Media Library -> Watch Videos

Getting overscan to work properly

The nvidia package comes with a nice X tool called nvidia-settings. It controls all aspects of the graphics chip. I feel like being on Windows. When you exit the tool it saves all settings to ~/.nvidia-settings-rc. It even has a helpful --load-config-only option that will suck in and apply the values from the rc file. You can put that e.g. into the KDE autostart folder.

The only catch: The graphics chip doesn't care.

When I open the tool, overscan is not adjusted at all. Only once I move the overscan slider even only one notch the setting gets applied to the output properly. However, the setting does get adjusted properly when I use the --assign option of nvidia-settings.

Oh well, here is the script I use to configure TVout:


#!/bin/sh

nvidia-settings -a 0/TVOverScan[TV-0]=14
nvidia-settings -a 0/TVSaturation[TV-0]=130
nvidia-settings -a 0/TVHue[TV-0]=10
nvidia-settings -a 0/TVFlickerFilter[TV-0]=153
nvidia-settings -a 0/DigitalVibrance[TV-0]=7
nvidia-settings -a 0/ImageSharpening[TV-0]=0


The values are copied from nvidia-settings-rc after I was happy with the picture. It does need a little bit more fine-tuning for the greens, but looks pretty good already.

Thursday, May 04, 2006

success!!!

MythTV is now running for almost a week.

Stuff I have working:
- Debian 3.1 Testing base install
- wintv pvr-500 with dual tuners recording hardware encoded mpeg2 streams using the ivtv drivers
- computer in nice case (Antec Overture) and hooked up to TV
- mythvideo, so I can play back German TV segments downloaded from shiftTV using mplayer
- automatic login and start of mythfrontend
- manual commercial skipping (well, ok, that's a mythtv feature, but it's cool. Not as cool as the automatic skip of ReplayTV, though)

Basically, the whole system is usable. Decent video quality, too (especially considering that I'm feeding this via composite TVout to a 10 year old 26" TV). I'm excited!


Stuff I need to work on:

- no remote, still using keyboard
Patricia won't use this unless there is a remote. It is asking a bit much to remember all the relevant key strokes (although, she is getting curious ... slowly). I'm planning to build or buy a cheapo IR receiver for the serial port and re-use one of the dozen IR remotes I have laying around. The ReplayTV one is particularly interesting ("Commercial Skip" button is already properly labeled...)

- TVout borders/overscan
The Nvidia TVout signal leaves an ugly border around the picture. I didn't bother yet with experimenting how to get rid of this, aside from enabling the TV overscan setting in xorg.conf which had zero effect. Maybe need a special ModeLine? Or investigate http://sf.net/projects/nv-tv-out

- cooling issues
The Antec Overture is a *very* nice case, given the footprint. 3U, so regular expansion cards fit without the need for riser cards. The case is huge, but the case doesn't look bulky. 380W True Power power supply, temperature regulated 9cm fan in the back. The only catch is that the PVR-500, the FX5200 and the CPU generate quite a bit of heat and the airflow is not optimal so that the fan can get the hot air out of the case. It runs at full speed, but the inside of the case still gets very hot. Actually, the case around the PVR-500 feels warm from the outside...
I turned around the airflow of the case fan, so it blows air into the case straight on the hard drive, and installed another fan on the inside that blows air over the PVR-500 and the video card out through the PCI slot holes. Doesn't help much, though. For now, I opened the front expansion slots, so that warm air exits the case through the front.

- scheduled shutdown/boot to save power
Yet another computer sucking up power in the house. MythTV supports putting the computer to sleep after recordings are done and waking it up before the next recording. Need to see what my motherboard supports and how this is all configured.