Setting up my HDTV HTPC with xUbuntu 8.10

Here my chronicle of fixes and tasks I had to go through while setting up my HDTV HTPC / home server.

I upgraded from an older xUbuntu to xUbuntu 8.10 64-bit and the first thing I had to do is restore the windows file share where I backed up configurations, samba shares, and my Adaptec SATA Raid 1210SA. Then I had to conquer ATI’s proprietary drivers and restore my previous install’s server functionality. Next time I’ll be finishing up the HTPC portion by configuring my TV Tuner with mythTV and installing Boxee as well – and maybe integrating the two together if possible.

Note: you can copy paste the code commands with the “# comments” at the end because Linux will ignore everything after the #

Network Shares and Raid

apt-get install samba # for sharing my raid storage across the network
apt-get install smbfs # for mount.cifs to mount windows file shares
apt-get install nfs-common # for the other mount types
apt-get install dmraid # for my Adaptec SATA 1210SA Raid card (x2 320GB drives)
apt-get install vim # because vi drives you insane after using vim

With the right programs installed I could reach my backups, test/setup my mounts permanently, and setup samba so I can start listening to my music right away again.

mkdir /media/a-computer; mkdir /media/a-computer/backup # make a folder to mount to
mount.cifs //192.168.0.51/backup /media/a-computer/backup -o guest,rw # mount my windows backups share
tail -3 /media/a-computer/backup/fstab >> /etc/fstab # copy old fstab permanent mounts to new fstab

tail -3 /media/a-computer/backup/fstab # outputs
/dev/mapper/asr_1 /media/windows ntfs rw 0 0
//192.168.0.51/usenet /media/a-computer/usenet cifs guest,rw,mand 0 0

Video Setup

I’m plugged into my Panasonic Viera 42″ HDTV through an ATI HD2600XT and DVI-I to HDMI cable (from monoprice). After installing xUbuntu 8.10 on a CRT Monitor (so I could read the text) I switched video cables and plugged in my HDTV only. It booted into X with VESA drivers on “Default” resolution (not sure what res.,it wasn’t HD, but it worked on my TV somehow) and first thing that was obviously needing fixed is the text was too small to read.

I quickly remembered you can’t fix the font size problems high resolutions in the XFCE menus. You have to make a config change for X:
echo "Xft.dpi: 96" >> ~/.config/xfce4/Xft.xrdb

To install the video drivers I decided to just go through the menus instead of attempting it through command line (if you need to use apt-get I believe you need to manually add the proprietary apt-get rep source). I went to Applications > System > Hardware Drivers > And There were ATI/AMD Proprietary drivers – after one click it launched the package manager and installed fglrx for me, very painless. I also ran updates and rebooted at this time.

I had some issues with the fglrx video driver at first but to make a long story short, here’s how I finally got a good xorg.conf for it.

dpkg-reconfigure xserver-xorg # This helped the next step make a more complete config
aticonfig --initial # Before I ran the above step, this generated a very minimual xorg.conf
aticonfig --resolution=0,1920x1080,1280x720 # Set my HDTV resolutions
service gdm restart # Restart X and test new xorg.conf - booted into 1920x1080 for me

Being in 1080p resolution caused fonts to look a lot smaller, even with the xfce font DPI fix, so I increased font sizes in the menus: Applications > Settings > Settings Manager > User Interface & Windows Manager. I also increased the Panel sizes to 41 to make Icons bigger.

Switching to fglrx enabled HD resolutions but it also gave me black bars around my screen. To fix this at first I was trying to utilize the aticonfig’s overscan tv functions since I’m using a TV. however my display isn’t detected as a “TV” type for whatever reason, as this shows:
# aticonfig --query-monitor
Connected monitors: tmds1
Enabled monitors: tmds1

aticonfig --tv-info
The TV is not connected
The TV geometry is "0x0+0+0"

After a lot of Googling and experimenting with various aticonfig commands I came to this solution: aticonfig --set-pcs-val=MCIL,DigitalHDTVDefaultUnderscan,0 – This fixed my underscan black bars but isntead created an overscan problem (screen was bigger than TV borders). I managed to fix this by tweaking the resolution (not sure if this causes pixel stretching but it doesn’t look bad – may just be a work around). Here’s my overscan fix autostart script which lowers my resolution and bump the screen into center position:
#!/bin/bash
# Add this script to autostarting apps, these commands don't seem to save
aticonfig --set-pcs-val=MCIL,DigitalHDTVDefaultUnderscan,0
# X was over by 28 pixels on each side (1920 normal)
aticonfig --set-dispattrib=tmds1,sizeX:1866
aticonfig --set-dispattrib=tmds1,positionX:+28
# Y was over by 16 pixels on each side (1080 normal)
aticonfig --set-dispattrib=tmds1,sizeY:1048
aticonfig --set-dispattrib=tmds1,positionY:+16

X/Y overscan values needing adjustment may be different for you

Diversion 001
With my video completely setup I needed to test it out:
sudo apt-get install vlc
I checked out some videos, normal video started skipping, HDVideos were artifacting, skipping, and top showed them taking over 50% of my CPU most of the time…that’s not right, never had this problem on my previous installs (windows XP or xubuntu 8.04). Investigation revealed my CPU frequency is set to the minimum of 1000mhz of 2200mhz max. Google revealed an application I hadn’t heard of before that was quite easy to use and fixed this problem:
apt-get install cpufrequtils
cpufreq-set -g performance # Sets frequency to max

I thought that was very odd, maybe a bug with Intrepid Ibex?

Torrents, usenet/Sabnzbd, and GNUMp3D

Next I setup my uTorrent webui to act as a central torrent server for my home. If you need instructions on setting up webui see uTorrent’s webui post. I already set it up in wine previously so I’m just restoring from a backup here:

sudo apt-get isntall wine # We need wine to run uTorrent
cp -vip /media/a-computer/backup/uTorrent.exe .~/wine/drive_c/Program\ Files/uTorrent/ # Get the exe
rsync -aP /media/a-computer/backup/adam/.wine/drive_c/windows/profiles/adam/Application\ Data/uTorrent/ ~/.wine/drive_c/windows/profiles/adam/Application\ Data/uTorrent/ # I need the app data folder where webui is saved
cp -vip root/startup-uTorrent.sh /home/adam # Copy my startup script
cat /home/adam/startup-uTorrent.sh # It's a simple script needed for auto start on boot
#!/bin/sh
wine /home/adam/.wine/drive_c/Program\ Files/uTorrent/uTorrent.exe &

Then I add the script to the startup applications list through Applications > Settings > Settings Managed > Autostarted apps > Add > Then Enter a description and the path /home/adam/startup-uTorrent.sh

References:

http://ubuntuforums.org/showthread.php?t=225721

http://www.phoronix.com/forums/showthread.php?p=36734#post36734

http://ubuntuforums.org/showthread.php?p=5842624

http://www.thinkwiki.org/wiki/How_to_use_cpufrequtils

Brain

Share and Enjoy:
  • Print
  • Facebook
  • Reddit
  • Digg
  • Tumblr
  • Google Bookmarks
  • del.icio.us
  • StumbleUpon
This entry was posted in linux and tagged , , , . Bookmark the permalink.

8 Responses to Setting up my HDTV HTPC with xUbuntu 8.10

  1. Mike says:

    Bless you for showing me how to fix my screen overscan/resolution/position. How can the Catalyst control center NOT include such basic functions, especially when ATI picked such brain-dead defaults for digital video output (they should be 1920×1080+0+0 as the *default*)

  2. diginc says:

    I’ve already switched to an nvidia card out of necessity, the repeated use of aticonfig commands somehow caused an issue in my /etc/ati/amdpcsdb file which would make XServer freese upon start.

    I’ll have a write up on my ordeals trying to fix my overscan on the nvidia card once I get around to fix it (I’m just putting up with it right now).

  3. corruption says:

    Came across this while lookin to see if theres an easy fix yet for ati + hdmi out of curiosity, as I had dealt with this before as well — but noted something else you mentioned here in the article: uTorrent for webui..

    Just out of curiosity, is there a particular reason you choose to go this route? TorrentFlux, IMO, is a perfect frontend for torrenting, and its even better if you install tf-b4rt (http://tf-b4rt.berlios.de/) as this allows the use of 4 different torrent engines, for whatever your needs may be (simplicity vs choosing individual files)… the base TF will install through apt, and work out of the box… try it, you may be impressed! :)

    BTW — you have the most comprehensive ‘guide’ to the hdmi issue I’ve seen yet, and with the latest ATI drivers fixing spdif passthru, I’m considering switching back over ;)

    -The Wheelchair Ninja

    • diginc says:

      My faimly and I are used to uTorrent+webui and it runs fine in wine…actually it used to run fine but the webui portion has been failing randomly recently, requiring a restart. It’s easy to add torrents to the webui with a little .exe called ‘uTorrentHandler’ where you just put in your webui IP, user and pass. I also add torrents from work through a forwarded port.

      I will try some of your suggestions out and if they can replace my current functionality (the key part being a webui handler which opens .torrent extensions in windows and sends them straight to the torrent server).

      Oh…and also I’ve switched to an NVidia card (8800GT) since I wrote this and have been putting up with overscan, LOL. Maybe I’ll write an article about how to fix it, if I ever do.

  4. stardotstar says:

    Just found you, looking for info on completing my mythbuntu to a 50″Viera – TH-50PZ80A and note that I am using the 8800GT – not got so far as to playing with the TV since I have built the box using a monitor while I got sound, video, DVB and so on sorted. I would be interested in your work on the nVidia card with this tele – I will be working to get around an overscan that I couldn’t properly defeat with a Sony Bravia 42″ that has since kicked the bucket…

    My setup is a basic BR/DVD/PVR HTPC running mythbuntu9.x – my last effort on the Sony was via Gentoo which I use for my regular systems and only dived into mythbuntu because I didn’t have time to do a gentoo build and cut everything loose myself 8: It took days to get it more or less perfect last time. The Viera did display for the mythbuntu installer via dvi->hdmi but only for framebuffer it didn’t want to play for x – so I am going to look at it tomorrow. I have tried the opengl and nvidia prop drivers and think that I will be able to configure dual with the nvidia control panel. I would be interested to hear how you have gone with this!

    Best regards,
    Will
    \\’

    • diginc says:

      I haven’t had time to fix my overscan problems yet but I did find a very helpful looking thread that seems to have cropped up since I last did research into this matter:

      http://ubuntuforums.org/showthread.php?t=1003099

      I hope following the steps from hpadrick on page 2 or David Valentine on page 4 will fix this problem. Once I find what works for me I’ll try to make a quick & concise how-to.

  5. diginc says:

    I’m running torrentflux-b4rt now and love it :) thanks for the recommendation Wheelchair Ninja

  6. Roxanne Moudy says:

    Greetings just wondering if any one could suggest a good torrent downloader. Preferable free but if reasonable and quick with large storage I would consider a paid service.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>