Zalman HD160XT
Contents
Zalman HD160XT
Incomplete, needs to be expanded. Please help to fill the gaps or discuss the issue on the talk page
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!)
- Currently: 2*1TB RAID0
- Future setup: add 3*320GB RAID5 (for the really important data)
- Cooling: Still to be determined (going for nexus/zalman combo now)
- NVIDIA 8500GT Silent (Normally running at 50-ish degrees)
- Modified Asus CNPS9500A (going to replace stock cooler with nexus 92 mm PWM cooler)
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, since this is well documented all over the internet.
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
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
At this moment I did it the hard way by altering the xorg.xonf file and restarting the system. 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
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
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, or mechanical mis-design of Zalman.
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
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!
TODO
What is left to do, this list will grow :-)
- Make sure the touch driver remains at the same port. here a link. Or use the 69-touchscreen.rules' file from Ostergaards guide.
- When touch-screen is enabled, the mouse stops working. This needs to be solved
- How to configure MythTV 0.21 use of the mplayer.
- openssh
- freenx
- sensors applet
- enable HD playback
- Make touchscreen work only on specific part of screen(s)
- Automatic login (Administration -> login)
- Automatic startup of 2x mythtv frontend on correct screen (preferences -> sessions -> session options -> remember).
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).
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.
- http://www.nabble.com/New-driver-for-Vlsys-mplay-%28the-one-in-Zalman-Hd135-case%29-to14282379.html
- http://wiki.nerdylorrin.net/wiki/Wiki.jsp?page=LIRC
- http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html
- http://ubuntuforums.org/showthread.php?t=260883
- http://www.linuxdriver.co.il/ldd3/linuxdrive3-CHP-18-SECT-4.html
- http://ubuntuforums.org/showthread.php?t=602693
- http://albertomilone.com/nvidia_scripts1.html