Saturday, May 01, 2010

mythtv on both TV and 720p projector with nouveau

I just finished installing my mythtv (mythbuntu) box to lucid. The upgrade went well enough, although X wasn't working well afterwards. No problem, since I really wanted to switch from the proprietary nvidia drivers to the nouveau drivers anyway.


I have both a (SD)TV and an HD projector connected to my nvidia FX 5200, the former via S-Video, and the latter via an hdmi cable plugged into a DVI-to-hdmi adapter. With the "nv" or "nvidia" drivers, xrandr only sees the projector if both are plugged in, although it sees the TV if the projector is unplugged. So, I've been restarting X when I want to use the projector, which is a pain. With the nouveau drivers in lucid, though, xrandr now shows all three connections at boot time:



grant@mythbuntu:~$ xrandr -q
Screen 0: minimum 320 x 200, current 720 x 480, maximum 4096 x 4096
VGA-1 disconnected (normal left inverted right x axis y axis)
TV-1 connected 720x480+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
720x480 59.9*+
1024x768 59.9
800x600 59.9
720x576 59.9
640x480 59.9
400x300 119.9
320x240 119.9
320x200 119.9
DVI-D-1 connected (normal left inverted right x axis y axis)
1280x720 60.0 + 60.0 50.0
1280x1024 60.0
1024x768 60.0
800x600 60.3
720x576 50.0
720x480 59.9
640x480 60.0

Awesome!



Unfortunately, the TV output was showing up in black and white. Oops. Looking at the output from xrandr --verbose, I realized that nouveau was assuming the TV out should be PAL instead of NTSC-M. After a great deal of searching, I completely failed to find any document that would tell me how to fix that problem for nouveau, since I couldn't find the magic incantation for xrandr that actually worked, and the old standby of Option "TVStandard" "NTSC-M" in xorg.conf just lead to (WW) NOUVEAU(0): Option "TVStandard" is not used showing up in Xorg.0.log. Sigh.



When all else fails, ask on IRC. So I asked about it in #nouveau on freenode. It turns out that what I needed was to have nouveau.tv_norm=NTSC-M in the kernel boot line, because it's the kernel that does the detection. Oh. Works, though. (Incidentally, the list of settable parameters may be found from modinfo nouveau.)


Now my TV is in color, and xrandr may be used to set which output device I want to use with no plugging/unplugging involved. There's a bit of a catch, though, since the aspect ratios and screen sizes are different between the two displays. If I have mythfrontend filling the screen on the TV, then cloning that display on the HD projector leaves a bit of unused real estate. I don't really want to use both screens at the same time, though, so I wrote a couple simple scripts and connected them to "Switch to TV" and "Switch to Projector" buttons that I added to the mythtv main menu:




grant@mythbuntu:~$ cat bin/tv.sh
#!/bin/bash

export DISPLAY=:0
xrandr --output DVI-D-1 --off
killall mythfrontend.real
xrandr --output TV-1 --auto
nohup mythfrontend &

along with



grant@mythbuntu:~$ cat bin/projector.sh
#!/bin/bash

export DISPLAY=:0
xrandr --output TV-1 --off
killall mythfrontend.real
xrandr --output DVI-D-1 --auto
nohup mythfrontend &


Now I just have to get two minor bugs worked out. The first is the fact that putting the GRUB_CMDLINE_LINUX="nouveau.tv_norm=NTSC-M kernel line in /etc/grub.d/40_custom and running update-grub doesn't seem to actually append that string to the kernel boot line. That's annoying, but fixing it in /etc/default/grub does work, and I'll just have to remember to update that when grub is updated. The other bug is that now mythfrontend crashes when I put a DVD in the drive. A mythtv box makes for a great upscaling DVD player, or at least it would if QT wouldn't segfault. All in all, not too bad a set of problems.

Wednesday, September 23, 2009

40



It's good to be 40.

Tuesday, August 04, 2009

Nautilus annoyance

When using gnome with ion3 as the window manager, it makes sense to have nautilus not draw the desktop. Unfortunately, that gconf setting causes nautilus to die and restart repeatedly (https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/325973), which one can notice by watching the nautilus PID increase every fraction of a second or so. Until the bug is fixed, it's simplest to turn desktop drawing back on, and just hide the window that's produced. Ugh.

Sunday, August 02, 2009

Night photography

Some results from the recent "Big city nights" houston photography meetup (http://www.meetup.com/HoustonPhotography/):

Night photography Wortham

Night photography Buffalo Bayou

Night photography at Bayou Place -- Wortham

Night photography at Bayou Place

Monday, July 27, 2009

Photowalk pictures

Sarah and I spent the morning of 18 July at the Houston zoo as part of Scott Kelby's worldwide photowalk (http://worldwidephotowalk.com/).

Here's some pictures (Sarah took most of these pictures):

Bear

Leopard feet

Leopard

Sentry meerkat

meerkat.

Tuesday, May 12, 2009

Frodo

Hollyhill_frodo_2009 04 19_0796_E



Six months old, and far too cute.


Photo taken by Sarah Goodyear.

Wednesday, March 11, 2009

Migrated to blogger

I seem to have better things to keep me occupied these days than keeping my pyblosxom blog spam-free, so I'm moving my blog into the cloud and letting Google take care of things for me. The gdata python package made migrating the blog fairly painless, except for moving the comments. There haven't been so many comments, so I just migrated them by hand.

Contributors

Label Cloud