Thursday, May 28, 2009

Shuttle X50 Touch Screen Configuration

Unfortunately, I haven't had much time to work on the Shuttle lately, and this has been something that has been bothering me for a while...the Shuttle comes with an integrated USB touch screen (D-WAV Scientific Co., Ltd eGalax TouchScreen)...

I've installed Ubuntu 9.04 Netbook Remix on the Shuttle...and it comes with a calibration utility located here:

Administration -> Calibrate Touchscreen

The documentation for the program is rather lacking, and for whatever reason, it doesn't calibrate the touchscreen properly...either that or it doesn't store the calibration properly...(I have no idea where it stores the calibration...because it doesn't seem to be changing /etc/X11/xorg.conf)

But in any case, you can still use it to help you perform a manual calibration...this is how:

  1. Start the calibration program (Administration -> Calibrate Touchscreen)
  2. Read the instructions and read them again...you won't see them again :'(
  3. When the white screen pops up, drag your finger, or stylus around the edges of the screen.
  4. When you have completed a full circuit, before you start clicking the 'X's write down the values contained in the top line of debug text. It should look something like: Min: (548/789) Max: (3560/3269)
  5. Finish the rest of the calibration, find some way to kill it (you don't need the rest **)
  6. Open your /etc/X11/xorg.conf and add the following lines (making sure to substitute your recorded values for 'MinX', 'MinY', 'MaxX', 'MaxY'):
Section "InputDevice"
Identifier "touchscreen"
Driver "evtouch"
Option "Device" "/dev/input/event6"
Option "DeviceName" "touchscreen"
Option "MinX" "548"
Option "MinY" "789"
Option "MaxX" "3560"
Option "MaxY" "3269"
Option "ReportingMode" "Raw"
Option "SendCoreEvents" "On"
Option "SwapX" "true"
EndSection

Section "InputDevice"
Identifier "dummy"
Driver "void"
Option "Device" "/dev/input/mice"
EndSection

Now save your file, restart, and you should be good to go!

** - These values should technically be used. From what I can tell, they are used to calculate a homography matrix that correlates your touch screen coordinates with actual monitor coordinates with a greater accuracy than just using the max/min bounds. But there are two problems here:
  1. Since the calibration utility doesn't save it's values anywhere (correct me if I'm wrong), especially not in xorg.conf, it is really hard to get the touch screen values of these points. You basically need to run the calibration utility from the command line and pull the points from the command line output.
  2. When you put these points, in the order the calibration program specifies them, into the xorg.conf file not surprisingly, your touch screen is unusable. The problem here could be that X is expecting the points in an order that is different than what the calibration program outputs. Until someone can verify that for me, this solution works fairly well.

Wednesday, May 13, 2009

Shuttle X50 entering failsafe mode when starting X

It appears that the problem I was having with the Ubuntu installer entering safe mode (or not working at all) is actually related to a bug in the version of the Intel i945 driver that ships with Ubuntu 9.04.

Basically, X was having a problem starting and I was getting the following lines in my /var/log/Xorg.0.log file:

(WW) intel(0): No outputs definitely connected, trying again...
(II) intel(0): Output VGA disconnected
(WW) intel(0): Unable to find initial modes
(EE) intel(0): No valid modes.
(EE) Screen(s) found, but none have a usable configuration.

I tried a whole bunch of different things, but eventually resolved that it was likely a bug in the Intel driver. I filed a bug report with Ubuntu here:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/375545

The resolution was to use the 2.7.1 Intel driver, which is not included with the Ubuntu 9.04 release, but is still considered stable. To use the new driver, do the following:

Add the following lines to your /etc/apt/sources.list:
deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main
deb-src http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main

Add the archive's key to your list:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 643dc6bd56580ceb1ab4a9f63b22ab97af1cdfa9

Update your apt cache:
sudo apt-get update

Install the new package:
sudo apt-get install xserver-xorg-video-intel

And that should fix it!

Monday, May 11, 2009

Ubuntu 9.04 Netboot install

It turns out that the Ubuntu 9.04 alternate install disk, when used with unetbootin does work exactly right as detailed in my last post. So I decided to do a netboot install. The procedure I used was taken from:

https://help.ubuntu.com/community/Installation/Netboot

Basically, do the following:


Install dnsmasq, a DNS/DHCP/TFTP server all in one:
sudo apt-get install dnsmasq


Edit /etc/dnsmasq.conf adding the following lines:
dhcp-range=192.168.1.XXX,192.168.1.YYY
dhcp-host=,192.168.1.ZZZ
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/var/tftpd
dhcp-authoritative

Note: XXX, YYY are the upper and lower ranges of IPs you want to hand out. Ideally, this server will only hand out IPs to your target computer. That being said, ZZZ should be between XXX and YYY, with XXX and YYY chosen arbitrarily. For example, I used 240 for ZZZ, 239 for XXX and 241 for YYY.

Note: should be replaced by the actual MAC address of the machine you want to install on, in the form AA:BB:CC:DD:EE:FF.


Copy the contents of the '/install/netboot' directory on the Ubuntu 9.04 Alternate CD-ROM to '/var/tftpd'


Restart dnsmasq:
sudo /etc/init.d/dnsmasq restart


Reboot the target computer, and configure the bios to try to boot using your LAN/NIC/PXE (depends on manufacturer).

Ubuntu 9.04 Alternate Install

Like the standard install, I created a flash boot disk using unetbootin following the instructions I found here:

https://help.ubuntu.com/community/Installation/FromUSBStick

I followed the optional instructions to remove the unetbootin menu and bring back the root menu of the cd image. This allows you to select the text-based install option from the ubuntu menu.

But there is definitely some sort of graphic driver problem...

The text-based installer displays 4-5 lines correctly, but the rest of the screen is flickering like crazy.

Also, I'm not sure if it correctly detected the network card. The install is demanding that I setup a cd-rom drive to access packages. Usually there is a step to configure the network, and then download the packages, but that may be a later option. Obviously there is no cd-rom drive and this is something I kind of expected unetbootin to take care of.

Ubuntu 9.04 Standard Install

Friday, May 8, 2009

Shuttle X50 Unboxing

So we finally got the Shuttle X50! Here are some unboxing pictures:






One interesting thing to note is that it DOES NOT SHIP WITH AN OPERATING SYSTEM!!!
I suppose it's not a big deal since we were hoping to put linux on it anyways, but it is still a pretty big dissappointment...

Friday, May 1, 2009

Waiting for the Shuttle X50

So we ordered a Shuttle X50 for one of our projects. We will likely be one of the first people to get an X50 and I plan on publishing the whole unboxing/linux conversion process here!