Friday, June 28, 2013

Ubuntu on OEM Production 2550L2D-MxPC

One of the cheapest bare-bones mini PC on Newegg is the OEM Production 2550L2D-MxPC. I thought all the reasonably positive reviews meant it would be a good buy. I also saw it had an Intel graphics chip, which I know is well supported on Linux. Unfortunately I was wrong on both counts.

Summary:

  • Ubuntu 32-bit ONLY. Probably have to run 12.04.1 unless your googlefu and linuxfu is better than mine.
  • Do not bother buying more than 4GB of RAM! The kernel will ignore anything more.
  • A note in the box says the machine supports "800MHz and some 1066MHz DDR3 memory module. 1333MHz DDR3 memory module is not guarantee to work. [sic]" I got lucky that the 1066MHz G.SKILL F3-8500CL7S-4GBSQ I ordered worked.

The graphics chip is Intel GMA 3650, which is in the family of infamous GMA 3600s. These are the unwanted step children of Intel graphics chips.

For Windows, there is a Windows 7 (only) driver which plays full screen HD video smooth a butter.

Only a single proprietary binary Linux driver is available, and I hear no further support will be available for this kind of chip. Ubuntu appears to have officially stopped supporting this one driver because it's based on an old Linux kernel (3.2).

Note that both the Windows and Linux drivers are 32-bit only, so don't expect to run a 64-bit operating system and watch HD video.

This is how I got Ubuntu working on this thing.

I tried many different versions of Ubuntu, Mythbuntu, and Linux Mint before finally finding something that worked: Ubuntu 32-bit 12.04.1. This version of Ubuntu still uses a kernel compatible with the graphics driver. I tried starting with 12.04.2 then downgrading the kernel, but ended with X failing to start.

After Ubuntu was installed I did not download and apply any updates. This again would mess up my kernel. Magnus Deininger posted vital info about getting the right kernel. Running these commands removes the PAE version of the kernel. PAE allows 32-bit operating systems to support RAM > 4GB. Unfortunately the graphics driver is incompatible with it.

$ sudo apt-get install linux-headers-generic linux-image-generic
$ sudo apt-get remove linux-headers-.*generic-pae linux-image-.*generic-pae

I then rebooted. Checking for "Additional Hardware", the graphics driver appeared, and I installed it. The installation overwrites the /etc/lightdm/lightdm.conf file, so my login settings were messed up a bit. It creates a backup, so I just restored the old version.

Finally I downloaded and installed Ubuntu updates. Sadly the Update Manager would hang forever at the very end. So after rebooting I'd run it again to have it tell me there were no more updates to apply. The kernel stays within the 3.2 family.

Unfortunately that's not the end. Silky full screen HD still didn't work because the video player needs VA-API (Video Acceleration API) support. Someone has made a special build of mplayer that supports VA API. A fine post shows how to install VA-API mplayer for Ubuntu.

$ sudo add-apt-repository ppa:sander-vangrieken/vaapi
$ sudo apt-get update
$ sudo apt-get install mplayer-vaapi

Once installed, open SMPlayer (or whatever MPlayer GUI you're using: Gnome Mplayer, KMPlayer, etc.) and in its Preferences, on the Video tab (in SMPlayer: General Video > Output driver) set the video output driver to "vaapi"

sigh. 5 days pounding at this thing. It would be really nice if Ubuntu centered its update dependencies on these critical drivers. Also I'm pretty sure the Newegg reviews are being astro-turfed. Any comment about how Linux support sucks is heavily voted as not useful.

Saturday, January 12, 2013

Giana Sisters: Twisted Dreams

Recently picked up this fun and awesome looking game. Did some hacking on its massive data file Game.pak. Searching for its header SBPAK V 1.0 led me to a forum post and a nearly compatible QuickBMS script. I converted the script to Python to dump all the data.

Wednesday, March 23, 2011

Smartphone as PDA

After posting about potential PDAs 4 months ago, and spending several more hours researching alternatives, I finally concluded that the HTC Touch Diamond really is the perfect (or as close as the market will allow) device for me. Even better that it occasionally shows up on sale for about 30% off at Newegg, so I recently picked one up.

Several more hours of investigation have followed. I've seen it may be possible to upgrade the device to Windows Mobile 6.5, and even install Andorid. Not being ready for that kind of commitment, I've just been finding various programs and tweaks to turn it into my new PDA.

Thus begins the migration from my Palm z22 to Windows Mobile 6.1 HTC Touch Diamond

Programs

First programs I install are .NET Compact Framework 3.5, SQLServerCompact 3.5 Core, and full featured Japanese Display and Input.

After a reset, Dred Sensor, OpenMobileMaps, (Japanese) Pocket Dictionary (along with EDICT), JWPce (be sure to use the ARM "palm" version), Pocket Digital Clock, Total Commander Pocket.

System tweaks

  • Settings -> Personal -> Menus -- Remove Phone
  • Settings -> Sounds & Notifications -> Notifications
    • All Phone and Messaging options -- Disable all sounds/notifications
    • Event: Reminders -- Disable visible calendar popups
  • Settings -> Today -> Items -- Deselect TouchFLO 3D and select Pocket Digital Clock and Calendar
  • Settings -> Today -> Items -> Pocket Digital Clock Options -- Disable seconds display
  • Settings -> System -> Error Reporting -- Disable it
  • Settings -> Comm Manager -> Always keep Phone turned off

I hunted a long time for a (free) program to change button behavior. Dred Sensor had all the power I needed. Using Dred Sensor, I replace all the Send and End button behavior as shortcuts to Calendar and Notepad (similar to how my Palm was setup). I also set a long-press shortcut of one of the buttons to open Comm Manager for quick toggle of WiFi setting.

Copy a pic to the phone, then browse to it and select it, then set it as the background to change its translucency setting (you can't set that from Settings -> Today)

Google Maps is a very nice program, but pretty much requires constant connectivity--something I (thankfully) don't have (to pay for). So to save maps for OpenMobileMaps, first start OpenMobileMaps so it can setup its cache folders. Then download a fixed version of JTileDownloader, browse an area of interest on the OpenMaps site, download the tiles, and copy them into the cache folders on the Diamond.

I haven't yet needed to tweak the registry, but MobileRegistryEditor is my editor of choice.

Transferring Data

I've used HandyShopper on the Palm for years -- it's a brilliant program. Thankfully it's also available for Windows Mobile. Transferring the shopping list is a breeze. Just find the backed up database in %USERPROFILE%\Documents\Palm OS Desktop\<id>\Backup\HS2_Shopping.PDB and simply copy it to the device. Browse to the PDB file on the device and just click on it. Your list is now available on the Diamond.

The biggest issue I had was getting the Palm Note Pad scribbles off the z22. Since Palm all but dropped support for the Palm OS and Windows 7, I had to download their latest (and final) version of the desktop client off their website. Unfortunately that version of Palm Desktop doesn't provide an interface for Note Pad. Forum posts suggested I had to find a computer with WinXP and install the older software that came with the z22 to sync those Note Pad images off the device.

While I still have XP on my lappy, it sure seemed like a hassle -- and what about people who don't have XP anymore? So I turned to Open Source for help. After installing all variations of Palm related software in Ubuntu, nothing seemed to provide a GUI for getting those Note Pad images. Then I happened upon a man page for a command-line tool called pilot-read-notepad. To my surprise, the following command actually worked

pilot-read-notepad --type=png -p usb: > list.txt

After pressing sync on the device, I found myself with all the images exported (some of the note titles with illegal characters had to be tweaked).

Blogging with Markdown

I haven't done much blogging lately, so most of the asciidoc esoteric syntax is gone from me. Meanwhile, I've been using Markdown on a couple of popular web sites. Markdown has come a long way since I first investigated a blogging markup language with code highlighting. There is now a Python module with the built-in CodeHilite extension. This post gave me the confidence that Markdown was ready for primetime.

Here's how I setup my new blogging solution with Markdown*:

  • Install Python 2.5+
  • Download Markdown source code
  • Download Pygments source code
  • Uncompress the Markdown directory
  • Uncompress the Pygments directory
  • From the Pygments directory, move the pygments and external sub-directories into the Markdown directory
  • Apply this patch to the Markdown source files so noclasses configuration is exposted and fenced_code is also highlighted (I'm bummed this patch isn't included in the downloaded source)
  • Download and install the jEdit syntax and Notepad++ syntax files

Now the following command will do the work**:

python markdown.py input.md -o html4 -x "codehilite(noclasses=True)" -x fenced_code -f output.html

I still have to manually create the blog post in Blogger, but then it's just a copy-paste of the html, and I'm done.

* I don't like installing Python modules because I rarely use them--hence the simple uncompressing and use in-place.

** Like with my previous blogging solution, I like the syntax CSS to be inline.

Thursday, November 4, 2010

Using the iPod Touch as a PDA

I've been sporting the stylish Palm z22 for several years now (originally purchased for $100), and its battery is beginning to fail. Would it be too much to ask for something similar at a similar price point? Apparently it is. There is only one company that still makes normal PDAs: HP with their iPaq 111 (3 times the cost!) and 211. So if I can't get a PDA, it seems Portable Media Devices (PMD) are the only alternative.

The iPod Touch almost meets the bill, but still lacks a way to properly scribble notes. Researching compatible styluses led to the BoxWave Mini stylus, which is adequate, but falls short of my 5 year old PDA's accuracy. I could settle with that, if only there was a decent case that would hold it for me. Again, I must be asking way too much because there are currently only two* (2) on the market, and they are ugly as sin.

Fine, I won't get the iPod Touch. So what's left? The Creative Zen seemed to be able to sync with MS Outlook...about 4 years ago.

If I can't get a PDA, or a PMD, I guess I could just get a stinkin' smartphone and just never activate it. Lo and behold that's not such a bad idea. The HTC Tilt and HTC Touch Diamond are both available unlocked on Newegg for not terrible prices. Plus they even have a camera that's 3x better than my cellphone's. Just wish I could try out those devices before committing $half-a-PS3 to it.

* Got my links messed up. There is one case that I really like, but it's only compatible with iPhone.

Wednesday, January 27, 2010

Parentheses

The fellows over at the newLISP fan club forums are a witty bunch. During yet another discussion in the long history of "how might all those parentheses be removed from Lisp" discussions, Elica solved this age old conundrum ever so gracefully.

There is one easy recursive solution, but I’m afraid you will not like it, although you may enjoy it. Here it goes:

To solve the problem with parentheses, we can replace them by square brackets. However, this will introduce a new problem - a problem with the square brackets. To solve it, we can replace brackets with parentheses, which will reraise the initial problem. Fortunately, we already know how to solve it.

So, everything is OK - the initial problem is reduced to a sequence of problems, each of which can be solved trivially.

Java and VNC on Windows

Sometime between JRE 1.6.0 update 3 and 1.6.0 update 15, something changed.

I use a VNC program heavily, and was surprised to see all Java Swing GUIs become almost useless because they would never refresh through VNC. Yet at the same time Netbeans still worked fine over VNC.

I sought high and low, but what kind of search string would you use for this issue?

As a work around at the time, I set the JAVA_HOME to an older JRE, and updated some of my Java program shortcuts to use "C:\Program Files\Java\jre1.6.0_3\bin\javaw.exe"

Today I finally found the issue and fix.

J2D_D3D=false

This problem might occur with any other kind of Remote Desktop program, or perhaps it is just those that use a special video driver.


Oh and Netbeans seems to run under the latest JDK installed instead of the latest JRE. Guess I should update that sometime.