Sunday, 29 June 2008

OpenSuSE 11.0

OK, I was going to wait for OpenSuSE 11.1 but I weakened and am putting 11.0 on now. :)

First surprise - the touchscreen works during install - albeit with a slight scaling issue, possibly because the install runs in 800x600 stretched mode but very promising.

11.0 will help as the code I found for the keyboard lights is for a later kernel than 10.3 stock. If I'm going have to do a kernel recompile (which I haven't needed to do since 1998 with Slackware!) I might as well go for a new OS install (which will almost certainly take less time than a kernel rebuild on the U810). It will also clean up the cruft from various experiments...
  • Banshee - whose existence in a market with Amarok et al already there seems a bit of a mystery. Plus it requires an unbelievable amount of Gnome bits to work.
  • The gstreamer dependency mess between OpenOffice and Elisa
Now the fun and games begin...
  • Wired networking fails to work unless you add the following boot parameters to /boot/grub/menu.lst
    • pnpbios=off pnpacpi=off
  • The autodetected touchscreen settings seem to be uncalibrate-able so the evtouch installation needs to be done. However, the build for OpenSuSE 11.0 has the calibration parameters in out.txt mixed up - they should be renamed as follows: x0/y0 -> x6/y6, 1 -> 7, 2-> 8, 6 -> 0, 7 -> 1, 8 -> 2
  • Display brightness works out of the box although the keyboard buttons only move it up/down one notch (other programmatic changes work fine)
  • Suspend to/from disk works fine
  • Package management is a LOT faster which makes fiddling a whole lot more fun.
  • Installation detects the Atheros wireless and inserts the ath5k module but it doesn't appear to work. The madwifi repsoitory doesn't contain a correct package for the kernel I'm running (latest patch) so I need to compile it. Ho hum, now the download link for source doesn't work from the OpenSuSE Atheros page - what I want is the latest trunk version and all is well.
  • Elisa is now upset by the new version of python and/or it's libraries (damn!)

Thursday, 26 June 2008

U810 Elisa

I am giving up on MythTV for now - although the core works quite well, the plug-ins are too inconsistent in terms of input handling at the moment. For example, some keys are inherited from the core and others not - and the input mapping plug-in seems to only cover some of the aspects. Mouse/touchscreen behaviour also seems to vary with plug-in so the whole affair, while usable, is rather unsatisfying. I think more time is needed for some of the core features to make it to the plug-ins so will revisit it later.

As another aside - I don't understand why Gallery, Video and Music all have different navigational interfaces when they all provide the same basic functionality. Oh well.

Looking around I found elisa which looks promising if a little ..erm.. pre-release at the moment but often OSS projects are quite usable pre-release and there has been some good press. Sooooo - how to install...

The PackMan repository has a package but before we go ahead, it has a dependency on a more recent version of gstreamer than is shipped with openSuSE 10.3 which is in the PackMan rather than the OpenSuSE repository. So go into Yast and remove the old gstreamer010-* packages. There will be dependency squeals for OpenOffice and Amarok but ignore them - we're going to put it back! Now we can install elisa which should also pull down all the updated gstreamer packages too. One bug - the elisa packages dependencies will only pull down the elisa-plugins-good - it also needs elisa-plugins-bad (naughty!) but you'll have to add that manually.

OK, elisa fires up fine and looks nice but it doesn't yet have configuration within the app itself so it's off the edit files with a text editor...

...but it does seems to play nice with the touchscreen.

Monday, 23 June 2008

U810 MythTV

I have just found mxk which should allow me to use the mouse-stick as a cursor pad for MythTV in tablet mode. This makes things a whole lot easier!

Saturday, 21 June 2008

U810 Tablet Buttons

I've settled on some keyboard events for the tablet buttons (Fn is Sticky):

Down/Left: KEY_PAGEDOWN (rewind in MythTV)
Fn-Down/Left: KEY_HOME (previous track in MythTV)
Up/Right: KEY_PAGEUP (ffwd in MythTV)
Fn-Up/Right: KEY_END (next track in MythTV)

C-Alt-D: KEY_ESC (previous screen in MythTV)
Fn-C-Alt-D: ?? Hibernate

/: ??
Fn-/: ?? Keyboard LED toggle
//: KEY_MEDIA (play/pause in MythTV?)
Fn-//: ?? (Menu in MuyhTV?)
Screen: ??
Fn-Screen: ?? Invert Screen toggle (since XRandR-Intel-compiz combo fails on rotate +/- 90)

There are a number of KEY_* events in the linux source but not all of them seem to make it though to keyboard mappings in console or X mode - some experimentation required, obviously.

U810 MythTV

The U810 is just asking to be used as a media player in the Archos vein and MythTV looks like a good way to go. I don't want to lose OpenSuSE but fortunately the MythTV guys have a good page on getting it working over OpenSuSE that's a good start. Here's what I did...
  1. Skip partitioning/configuration and go to section 3.2 and do the 1-click KDE install
  2. Add the mythtv user (3.3)
  3. Skip all the hardware we don't have and go the section 4 and configure the backend (well sections 4.1-4.3 anyway - and I didn't do detailed setup as that's for PVR/TV functions)
  4. Skip mtoto section 5 and install MythVideo, MythGallery, MythMusic and MythWeather (why not?)
  5. Skip the rest
However, there are a few wrinkles with MythTV for this particular application...
  1. It's basically a MediaPC model so TV and PVR functions dominate - fortunately it installs fine without a TV tuner. Then I went into /usr/share/mythtv and there I found the menu layouts: library.xml contains the button definitions for starting MythVideo, MythImage and MythMusic. I edited mainmenu.xml, commented out the TV functions (Watch TV, Watch Recordings and Manage Recordings) and replaced them with the button definitions from library.xml, removing the, now redundant, button link to the media library too.
  2. I found that images in MythImage were't displaying with the correct aspect ratio - turns out I had the DisplaySize in the Monitor section of /usr/X11/xorg.conf set to default values which assume a 4:3 15-inch screen. However. if you change them to the actual values (124 72), all the fonts become huge as X attempts to display them at the correct size. Doubling up the figures (248 144) gives a more reasonable look and ensures the aspect ratio comes out right for photos.
  3. I found the volume toggle produced a nice display on screen but did nothing. In Setup, set the Mixer Device to ALSA:default and Mixer Controls to Master.
  4. Don't try using OpenGL as a drawing engine - it is truly glacial.
  5. In the default, window-manager-less version, playing video (which launches mplayer behind the scenes) results in a loss of input focus so keypresses/mouse clicks have no effect. This means I need a non-intrusive window manager to sit behind it - TWM is too basic and I may be lazy and just use a pruned KDE as I have other things to hack now.
  6. It's really designed for remote controls rather than touchscreens/mice so tends to expect button/keypress navigation. This is fine but in tablet mode we have only got 7 buttons and one of them is a shift-key so 12 functions tops. Pen gestures springs to mind as a way round that one.
  7. It doesn't know about laptop to tablet switching. hibernation and powersaving.
This means I need to sort out the tablet mode buttons, XRandR screen switching and probably some sort on-screen keyboard facility before this will really fly.

Friday, 20 June 2008

U810 Touchscreen

As martschie on the UMPC portal Forums has pointed out, the Touchscreen only misbehaves when AC power is plugged in. In battery mode it works fine - guess that means it's meant to be mobile.

Now a dilemma - do I carry on hacking away at OpenSuSE 10.3 or risk going to 11.0? Having had some issues with the *.0 releases for 8,9 and 10, I think I'll wait for 11.1. It sounds like some of the Lifebook U drivers may well be merged into mainline by then.

Tuesday, 17 June 2008

U810 Buttons and Touchscreen Part 3

Now for the touchscreen.

  1. Go into the BIOS and set the Touchscreen mode to TouchPanel rather than Tablet. This messes up Vista until you switch it back.
  2. Install the x11-input-evtouch drivers from the OpenSuSE Tablet Page
  3. Log into a text console as root and do init 3 to drop out of X
  4. Create the following symlink in / (yes! silly bug in evtouch software!)

    ln -s /usr/share/xf86-input-evtouch/empty_cursor.xbm .
  5. Add the following to /etc/X11/xorg.conf:

    Section "InputDevice"
    Driver "evtouch"
    Identifier "TouchScreen[1]"
    Option "Device" "/dev/input/by-id/usb-Fujitsu_Component_USB_Touch_Panel-event-joystick"
    Option "SendCoreEvents" "On"
    Option "Calibrate" "1"
    End Section
  6. Add the following to the ServerLayout section in xorg.conf:

    InputDevice "TouchScreen[1]" "SendCoreEvents"
  7. Run the calibration procedure:

    cd /usr/lib/xf86-input-evtouch
    ./calibrate.sh
  8. On the first screen (white with 9 little crosses) move the pointer around the edges of the screen so that the readout gives good maximum/minimum values for the screen limits (in my case the coordinates went from around 500-15000). You'll notice that resposne is really rotten towards the top right - can't seem to fix that without resorting to hacking code.
  9. Hit enter to go to the next phase which is calibrating for digitser unevenness. the top-left cross will turn red. Tap on it and the next cross should turn red - and so on. Due to the responsiveness prblem you probably can't tap on some X's. Left click on the mouse to go to the next one (right click to go back). After the last one you are unceremoniously dumped back at the command prompt.
  10. You will find a text file called out.txt generated by the calibration software. We need to remove the bogus entries caused by the untappable points so open it up in an editor. The calibration offsets are the x0,y0-x8,y8 pairs (in the same order as the calibration X's, I believe) and should be around +/-20. If there are any out-of-range numbers try and interpolate between adjacent sensible values.
  11. Open up xorg.conf and paste in the contents of the modified out.txt into the InputDevice section just after the Calibrate line. Then place a # before the Calibrate line to comment it out.
  12. init 5 to restart X and enjoy (except for the top right insensitive spot).
  13. If you're happy with the calibration delete the symlink in /

Thursday, 12 June 2008

U810 Audio

Two steps are required to get audio working nicely on the U810. Firstly, you need to drop out of X so you are at the login prompt and then switch to a console window.

Edit /etc/modprobe.d/sound so that the first line reads...

options snd-hda-intel model=fujitsu enable=1 index=0

Then restart the sound system (as root):

rcalsasound restart

Now switch back to the gui and login, then fire up KDE Control Centre ("Personal Settings" on my menu) and go to "Regional & Acessibility", then "Keyboard Layout". On the right of the panel you can choose the keyboard model - select a multimedia one (I chose Microsoft Wireless Multimedia). This tells KDE to expect multimedia key events.

Now the mixer works and the volume rocker takes it up/down and mutes with a press.

U810 Buttons and Touchscreen Part 2

Have done some hacking to the fsc_btns code and now it can detect a U-series system using DMI and locate the button controller which gives me access to the three buttons at the bottom of the screen, the dedicated Ctrl-Alt-Del button and the Up-Fn-Down triplet by the mouse nub. Now I just need to decide which keycodes to assign to them and work out how to make the Fn button a sticky modifier key. Then I'll feed the code back to the sourceforge project.

While testing for scancodes and events to work out which key is which, I've verified that the volume control rocker generates the correct scancodes but the Fn-A/S/D screen controls generate nothing (so more work required then).

As audio volume doesn't work, the Intel audio config is obviously stuffed. There's a longish page in the OpenSuSE support database on this subject to be worked through

Editing code on the U810 has been quite a good exercise in getting used to the keyboard - to the extent that I find myself reaching for Alt-Space on a regular keyboard instead of Tab and trying to use shifted cursor keys. I do think the A-row could be moved over a few mm though (make the :; skinny and you have room for a slightly displaced skinny Tab too). Yes, I have seen the U2010 keyboard.

Tuesday, 10 June 2008

U810 Buttons and Touchscreen Part 1

The Fujitsu touchscreen Lifebooks are Novell/SuSE certified so where are the drivers? They're not in the released mainstream OpenSuSE distro (10.3) but they have to be somewhere. A bit of digging gets me to the OpenSuSE Tablet PC pages which look rather promising - there's an evtouch package for the touchscreen and a Fujitsu button driver too. The T/P series tablets are mentioned but I'm hoping the U series will be covered too as I doubt Fujitsu would re-engineer a different mechanism unless they really had to. These drivers are currently listed as unsupported but I hope they make it into the mainstream 11.0 release or soon after.

Adding the OpenSuSE Tablet PC Repository to YAST allows us to pull down fsc_btns which looks like a good shot for a button driver (there's also a fair bit of Fujitsu-related activity in the Linux ACPI Project itself so this may be a stopgap). So I attempt to download it and discover it has a dependency on an earlier kernel than the one I have.

Okay, install the basic development packages and kernel source from the main repository and get the fsc_btns source from the SRPMS. Then proceed as follows...
  1. cd /usr/src/linux
  2. make cloneconfig
  3. make modules prepare
  4. make coffee, eat lunch :)
  5. cd /usr/src/packages/SOURCES/fsc_btns
  6. make
  7. make install
  8. modprobe fsc_btns
  9. "No such device" :(
Okay, time to look at the source code then...

Monday, 9 June 2008

U810 Xorg Munging Part 2

XRandR is a valuable feature for laptop and especially tablet users. It handles on-the-fly reconfiguration of Xorg including multiple screens, resolution and orientation changes. This, then is how we get internal/external monitor switching and screen rotation in response to system events (screen swivel etc.) and button presses (Fn A on the U810). Quite how we acquire these non-standard events and presses I will leave till later (if ever!) as these can always be invoked by more conventional methods.

The first thing to do is ensure that the Xorg driver allocates enough screen real-estate to handle multiple monitors. Apparently, the Intel embedded graphics can only handle 2048x2048 pixels with 3D accleration enabled so that's what I'll use - I like my compiz toys!

Open up /etc/X11/xorg.conf in your favourite editor and add the following to each SubSection "Display" within the Section "Screen".

Virtual 2048 2048

Actually, only the 24-bit depth really matters since I'm not likely to use the lower bit depths.

Now, dropping to a shell we can run xrandr and see what it thinks we have...

Screen 0: minimum 320 x 200, current 1024 x 600, maximum 2048 x 2048
VGA disconnected 1024x600+0+0 (normal left inverted right) 0mm x 0mm
1024x600 57.7*
LVDS connected 1024x600+0+0 (normal left inverted right) 0mm x 0mm
1024x600 57.7*+ 60.0 60.0 60.0 60.0
800x600 60.3 60.0 56.2
768x576 60.0
640x480 59.9 60.0
VGA-1 disconnected (normal left inverted right)
TV disconnected (normal left inverted right)
Looks like the VGA output is tied to the screen (which is the LVDS one) and we don't have TV out so let's disable these in xorg.conf. Add the following sections...

Section "Monitor"
Identifier "VGA"
Option "Ignore" "True"
EndSection

Section "Monitor"
Identifier "TV"
Option "Ignore" "True"
EndSection

Once we've plugged in an external monitor using the dock or the dongle we can run xrandr and see that the spurious VGA and TV settings have gone. Now we can do things like...

xrandr --output VGA-1 --mode 800x600 --right-of LVDS
xrandr --output VGA-1 --mode 1024x768 --same-as LVDS
xrandr --output VGA-1 --mode 1024x768 --below LVDS

Which gives us, respectively, a long desktop 1824x600 across the two monitors, mirrored outputs (though the U810 screen only shows the top 600 pixels), and a tall desktop 1024x1368. And we can also turn the LVDS off (--output LVDS --off, strangely enough!) and use just the external monitor which gives us the basic mechanism for laptop display switching.

It turns out the LVDS output on Intel graphics is actually the secondary screen so when you plug in an external monitor it becomes the primary screen so KDE puts the toolbar there and OpenOffice Impress needs to be used carefully in dual monitor mode.

Now logically, we should look at the --left, --right and --invert options which allow screen rotation on a tablet PC but unfortunately there is a bug in the current xorg Intel driver that causes screen updates to stop after changing orientation. There is a patch available so hopefully it will make it to the OpenSuSE repositories soon.

Friday, 6 June 2008

The HP 100LX

Back in the early 90's, when HP was still an innovative company with decent US R&D and manufacturing operations, they produced several machines that effectively anticipated the whole UMPC thing years in advance. Through the luck of my job at the time, I got hands-on experience with them all and my involvement with lightweight computing began.

The first of these devices was the 100LX - there was an earlier 95LX but the 100 was a lot better. This packed an MS-DOS 3.3 machine with PIM apps, Lotus 1-2-3 and a basic database into a pocketable clamshell form factor (6¼ x 3½ x 1 inches) which ran off 2 AA batteries. It had a PCMCIA slot that could take flash and SRAM cards and a serial port for mobile phone/modem connectivity on the road (the later 700LX even had a cradle for a Nokia phone built into the lid). The approx. 5-inch monochrome (4 greys) LCD was 640x200 and supported CGA graphics.

The processor ran at 7.5 MHz but a sizable modding community built up - processor overclocking, processor replacement and upgrading the soldered-on memory were all possibilities. The base model had 1MB of RAM but up to 96MB was possible (OK, on the slightly later 200LX anyway).

Such was the power of these machines that they still command good prices and support for such elderly tech.

Thursday, 5 June 2008

Random Installation Thought

It occurs to me that the OpenSuSE Windows-based installer would probably have let me install from SD or CF if I had just copied all the files fro the ISO image on the card ... and I had a card big enough. Something to try for later....

Wednesday, 4 June 2008

U810 Xorg Munging Part 1

Xorg is going to need quite a bit of work so first of all lets just get it working at the right resolution with compiz-fusion (I'm assuming you know what this is and want it!). The installer does a reasonable job of autodetecting except that it gets hung up on 1024x768 instead of 1024x600 - you can set it right with SaX2 but there are another couple of places that need prodding to get the resolution to stick for good without resorting to 915resolution.

  1. boot/grub/menu.lst - ensure that the boot parameters say vga=normal so we don't get the framebuffer in a silly mode
  2. /etc/sysconfig/displaymanager - change the line at the end of the file to DISPLAYMANAGER_RANDR_MODE_auto=
    "1024x600 48.96 1024 1064 1168 1312 600 601 604 622 -HSync -VSync"
Now for compiz-fusion, first of all we need to get the Intel Xorg driver into AIGLX mode, then install compiz-fusion. Sathya Says has an explanation that pretty much matches what I did although I didn't have to do the one-click-install of compiz-manager - that seemed to come with the compiz-fusion install anyway.

The final bit is to start compiz-manager automatically - for some reason, Settings|KDE Components|Session Manager won't let me change the preferred windows manager from kwin. For each user you thus need to:
  1. cd ~/.kde/Autostart
  2. ln -s /usr/bin/compiz-manager
Now go and play!

A couple of gotchas...
  • Updating the system has once resulted in the reversion of the displaymanager edit above.
  • Running SaX2 seems to nobble the AIGLX setting in xorg.conf
  • In /usr/bin/compiz-manager my COMPIZ_OPTIONS were prepended by -- rather than - so I went along with that.

Atheros hacking

Now I have Linux on, I will be downloading stuff and patching stuff so I want some connectivity. Wired ethernet works OK on my U810 with OpenSuSE 10.3 - some people have reported acpi issues but I have it enabled with no problems. However, this is a mobile device so I want to get wireless working.

I got the U810 in the USA and the Atheros WiFi chipset therefore has brain damaged firmware that restricts you to channels 1-11 for 802.11b/g. This is, of course, completely stupid for a device designed for mobility so it needs to be fixed but it appears that firmware updates are not exactly thick on the ground.

A bit of trawl takes me to Tamosoft who have something called CommView for WiFi which, if I was using Windows, seems to be quite a nice WiFi monitoring/analysing app. along with some other network tools. However, there is also an Atheros firmware adjuster mentioned on this page. You'll need to download the CommView for WFi trial to run it but it works. So now I have channels 1-13 (or 14 if you select a Japanese locale).

So there was a reason I kept that Vista partition about...

Now to get the Linux Atheros drivers, which aren't included in OpenSuSE because of licence conflict issues with Atheros' binary-only HAL. The madwifi guys are working on the problem but in the meantime, the OpenSuSE site has these instructions which do the trick.

The madwifi one-click-install also adds the OpenSuSE online repository to the software repository list. This contains all the stuff on the DVD and more so, now I have it in, I go into Yast and disable the DVD as a software source - that way, if I download anything that needs the DVD it will go to the online repository instead which is fine now I have WiFi working.

Getting OpenSuSE on the U810

First things first, we have to clear some space on the HDD. I'm not ready to kill Vista entirely yet since I might need to use the Device Manager to look at settings etc. So I fire up the Disk Management module and delete the redundant 1GB D: partition which exists for no obvious reason. I'm leaving the 1.5GB hidden "EISA Configuration" partition for now (what a quaint anachronism!) as they often contain useful "recovery-type-stuff" but I can't be bothered to look at the moment.

I resize the Vista partition to give us some space...and it won't shrink smaller than 24GB even though there's "only" 10GB of stuff on it (for a "basic" Vista Business install!). Hmm, WTF - okay let's do a disk cleanup and a defrag and see if that improves anything...nope! OK, what else have we got that clogs up the filesystem?

Shadow copies & Restore points, that's what. Switch them off and I can resize away to give me 18GB for Vista, 18GB for OpenSuse and 1.5GB for EISA which makes 40 HDD-sales-GB. So three basically tiny restore points (I hadn't messed with Vista much) clogged 14GB of filesystem - nice.

The U810 doesn't come with an optical drive but I have a rather useful USB to IDE cable from Maplin which did the trick (not an enclosure which you have to mess about with, just a cable with a Molex) along with a random spare DVD drive I had lying around.

Drop in the OpenSuSE 10.3 DVD (32-bit for the A110 processor) and fire up the installer from inside Vista. This patches the MBR on the disk and starts the installer on reboot after which it's the standard OpenSuSE install. Next time you reboot into Windows it tries to uninstall itself (how very tidy and polite!) but Windows blocks it since I'm in "Protected Admin" mode which offers no real protection and a whole lot of irritation so I have to run it manually.

I've installed the standard desktop configuration...now the fun begins.

New Lifebook U810

Okay, I have my Lifebook U810 and very nice it is too except that...
  • Vista takes an age to start with a lot of screen flickering and drive churning
  • ...which means you use hibernate/standby a lot
  • ...which means being nagged constantly as it seems to need a lot of patching
  • ...and Explorer and Media player both crashed within the first 12 hours of use
  • ...it's just plain annoying to use with too many clicks to do anything useful
So, it's time to put Linux on and since it's Novell certified (yeah, right) that means I'll try and use OpenSuse and will doc the process here - for my benefit when I rebuild on an SSD more than anything.