Zalman HD160XT

From MythTV Official Wiki
Jump to: navigation, search

Time.png End Of Life: This product is no longer being manufactured and may only be available in limited quantities, if it is available at all.

Zalman HD160XT
Included Remote

Zalman HD160XT

Incomplete.png Incomplete, needs to be expanded. Please help to fill the gaps or discuss the issue on the talk page

Initial

This page is work in progress, and I try to keep it as alive as possible.

Introduction

For Rev3.0 cases look for details here: http://zalman.ostergaard.net/ The rest of this guide is focussed on the Rev2.0 case combined with an Ubuntu (8.04 64-bit) distribution, This guide is roughly based on the link as described above.

The following hardware is already to be found in my case:

  • p5K motherboard
  • E8400 Dual core2 (Clocked @ 3.8GHZ)
  • 4 Gbyte @ 800MHz (no need for swap space!)
  • Storage: 2*1TB RAID0 + 3*320GB RAID5
  • Cooling: Nexus/Zalman quiet fans (including Modified Asus CNPS9500A)
  • NVIDIA 8500GT Silent (Normally running at 50-ish degrees)
  • 2x Hauppauge PVR-150 tuner


When there are inquiries I'm happy to replace the current pictures with my setup.

Previously this guide was based on a ubuntu 7.10 installation, so some content is not yet hardy-ready yet.

Installation

Execute a normal Ubuntu installation (including the updates). On a freshly installed system the touchscreen will already emulate a left mouse click. Test this by hovering a button with the mouse and tapping the touch screen.

After installation please:

  • remove the 'brltty' and 'brltty-x11' packages since these hampered the correct operation of the front-panel.
  • install 'libftdi-dev' package for correct usage of the front panel
  • When using NVIDIA Card install the libc6-dev package and install the latest NVIDIA driver (I used: http://www.nvidia.com/object/linux_display_ia32_169.09.html). Don't forget to stop the X when execiting the installation (/etc/init.d/gdm stop). Try to follow all default options, it worked for me.
  • Or use the Envy-gtk package now included to install the NVIDIA/ATI drivers.
  • Turn off all the possible compiz features (System -> Preferences -? Appearance -> Visual Effect Tab -> None)

TIP: During the installation process, create regular backups of your system. I used an external USB disk for this. This disk had a small UBUNTU server installation with parted and partimage installed.

Also I won't go into detail on how to setup MythTV, Only generic issues will be addressed

Screen setup

For my setup I used two separate desktops (thus: each with it's own menu).

  • Use the Envy package to install the driver (in my case) for NVIDIA
  • Right click on System -> Edit menus
  • select System -> Administration -> right click:'NVIDIA X Server Settings'
  • prefix the command with 'gksu'. In this manner the setting can be saved.
  • Close -> Close -> Restart
  • Now start the NVIDIA X Server Settings
  • Enable the second screen, and make it a "seperate X screen"
  • Drag and drop the screen to match the setup (keep them adjacent)
  • Save the configuration, and ignore warnings.
  • Again restart.
  • Adapt the xorg.conf file in such a manner that primary login starts on the HD160XT's screen.

Touch screen setup

Setup

Now install the evtouch package (don't forget to remove the brltty package):

sudo apt-get install xserver-xorg-input-evtouch

As suggested by: http://zalman.ostergaard.net/, take the '69-touchscreen.rules' file, and copy this to /etc/udev/rules.d. Don't forget to chmod this file to match the others already present in this dir. Reboot the machine, and you should have the /dev/input/evtouch_event device available.

Now adapt the /etc/X11/xorg.conf file, and add the following to the file:

Section "InputDevice"
   Identifier "touchpanel"
   Driver "evtouch"
   Option "Device" "/dev/input/evtouch_event"
   Option "DeviceName" "touchpanel"
   # These values proved to be good in my setup
   Option "MinX" "140"
   Option "MinY" "100"
   Option "MaxX" "1800"
   Option "MaxY" "1940"
   # For some reason the guys at Zalman rotated the touch-surface
   Option "Rotate" "CW"
   Option "ReportingMode" "Raw"
   Option "Emulate3Buttons"
   Option "Emulate3Timeout" "50"
   Option "SendCoreEvents" "On"
   # This option is needed for 8.04, make cursor move more smoothly
   Option "MoveLimit" "2"
EndSection

Finally add the following line to the "ServerLayout" Section

   # Make sure both the mouse and touchscreen keep on working
   InputDevice "touchpanel" "SendCoreEvents"

Hints on Calibrating the touchscreen

Using CTRL+ALT+BACKSPACE gives a quick way to restart the X-session (Edit /etc/X11/xorg.conf with ALT-F1 session, en switch back to X with ALT-F7). Keep in mind that since the display is rotated clock wise, MinX and MinY are swapped (same applies to MaxX and MaxY). The following I found during the calibration:

  • Increasing MinY makes the cursor reach the left border earlier when moving from right to left
  • Decreasing MaxY makes the cursor reach the right border earlier when moving from left to right
  • Increasing MinX makes the cursor reach the bottom border earlier when moving from top to bottom
  • Decreasing MaxX makes the cursor reach the top border earlier when moving from bottom to top

Adapting Mythtv's menu structure

The current mythtv menus don't support a "touchable" back button. The button has to be added to the already existing structure.

login as the mythtv user (Or the user normally used by the frontend)

mkdir -p ~/.mythtv
cd ~/.mythtv
rm -f *.xml
cp /usr/share/mythtv/*.xml .
files=`ls -1 *.xml | grep -v mainmenu.xml`
for file in ${files}
 do
  mv ${file} ${file}.old
  sed "s|</mythmenu>|\n   <button>\n     <type>MENU_TYPE</type>\n     <text>Back</text>\n     <action>UPMENU</action>\n   </button>\n\n</mythmenu>|" ${file}.old >${file}
  rm ${file}.old
 done

Problem still lies in a number of applications that are only using the keyboard for input (Watch recordings for instance). I still need to figure out how to interact with these "applications"

Getting the frontpanel to work

NOTES:

  • These are my preliminary tests, so this is work in progress
  • This is not one of the easiest tasks done so far, therefore expect some time to pass until I got this figured out.
  • Henrik's page refers to a 'ZalmanRemote' application. Run this application as root.

Patch the ftdi_sio.c as described on the page of Henrik, and rebuild the kernel. See one of the links below on how to rebuild/install a (patched) kernel.

For testing the following was used

/bin/stty -F /dev/ttyUSB0 38400 raw cs8
cat /dev/ttyUSB0

With each press of the keys on the front you see a letter appear on the screen. (eg: when pressing the volume button, the letter 'J' should appear)

As a sidenote: the circuitry is very noise sensitive. There are multiple occasions where the pressing of a key produces more than one response. I don't know if this is a result of bad de-boucing, mechanical mis-design of Zalman, my case or specific to my pressing technique.

Now install the lirc software (Not yet with a working volume-knob)

apt-get install automake
apt-get install libtool
apt-get install autoconf
apt-get install dialog
apt-get install help2man

get the sources (You need the latest, and not the 0.8.2 release. When a password is asked, reply with <enter>

cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login
cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc

compile the sources and configure the software. During setup a number of setting need to be made:

* "Driver configuration"
* "USB devices"
* "Vlsys Mplay blast" (in my case 'r')
* choose the correct ttyUSB (in my case ttyUSB0)
* "Save configuration & run configure"
cd lirc
./autogen.sh
./setup.sh
make
sudo make install
sudo cp  ./remotes/vlsystem/lircd.conf.mplay /etc/lircd.conf
sudo lircd -d /dev/ttyUSB0

to test if everything is working:

sudo irw

for each press on a key or the remote, there is a line printed on the screen.

Enabling SPDIF (DIGITAL OUT)

I'm not using any of the analog outputs of the system, so sound will be handled by my amplifier.

Double click the speaker icon, and select Edit -> Preferences. Place a tick before the IEC958, press close. Now select the 'switches' tab, and tick 'IEC958'. Done!

MYTHTV setup

To install, is used the following packages:

  • xmltv (really needed?)
  • tv_grab_nl_py
  • mythtv
  • all mythtv themes
  • mythweb
  • nuvexport

[TBD]

repair connection to DB: dpkg-reconfigure mythtv-database

TODO

What is left to do, this list will be maintained regularly:-)

  • How to configure MythTV 0.21 use of the mplayer.
  • freenx
  • When one application is using the digital out, the next application cannot mix-in his output, thus sigital out is not available.
  • enable HD playback (Using Mplayer for this [TBD] options to use)
  • Make touchscreen work only on specific part of screen(s)
  • Automatic startup of 2x mythtv frontend on correct screen (preferences -> sessions -> session options -> remember). Not yet perfectly working :-(
  • Better layout for this page (in chronological order).
  • Gestures usage, this will enable the <ESC>, <LEFT>, <RIGHT>, <UP>, <DOWN>, <ENTER> function in a number of menus that can not be adapted in mythtv (wayv works, but doesn't allow input of the touch-screen, go figure :-)

Hardware setup in more detail

CPU Cooling

From Zalman I planned to use the CNPS9500A LED to cool my overclocked CPU. However there is one big drawback with this cooler, it is using a 3-pin connection to the fan iso the 4-pin needed to have the q-fan option working. So reject or adapt? I choose to adapt. So I got myself the zalman cooler together with a nexus PWM 92 mm case fan. Now the rest is "simple": replace the zalman fan with a nexus fan (see picture).

Zalman/Nexus cooler

Case cooling

The case itself is cooled with Nexus fans only. [TBD: More info]

References

The number of links I used during this search is staggering. Whenever I felt like it, I added a link to the list below. So in no way this is complete.