Ubuntu / Kubuntu 13.04 Amazon Prime Flash Video Fix

Amazon Prime is one of the best options for legally watching movies on Linux.
After upgrading to Kubuntu 13.04 (Raring Ringtail), Amazon Prime video would no longer play back in Chrome or Firefox.
I tried all the usual fixes: Install hal, libhal, make sure I had the latest flash player, etc. but nothing seemed to work.
As it turns out hal was not working out of the box.

sudo /usr/sbin/hald --daemon=no --verbose=yes

13:02:43.542 [I] hald.c:672: hal 0.5.14
13:02:43.542 [I] hald.c:673: using child timeout 250s
13:02:43.542 [I] hald.c:741: Will not daemonize
13:02:43.543 [I] hald_dbus.c:5444: local server is listening at unix:abstract=/var/run/hald/dbus-81sVuox6FO,guid=734ba2444a74b35032c3b96f51814ab3
13:02:43.547 [I] hald_runner.c:304: Runner has pid 11134
Runner started - allowed paths are '/usr/lib/hal:/usr/lib/hal/scripts:/usr/bin'
13:02:43.551 [I] hald_runner.c:184: runner connection is 0x9ab2728

** (process:11133): WARNING **: Failed to add monitor on '/etc/hal/fdi/preprobe': No such file or directory

** (process:11133): WARNING **: Failed to add monitor on '/etc/hal/fdi/information': No such file or directory
13:02:43.624 [I] mmap_cache.c:126: Regenerating fdi cache..
Run started hald-generate-fdi-cache (60000) (0)
! full path is '/usr/lib/hal/hald-generate-fdi-cache', program_dir is '/usr/lib/hal'
13:02:43.726 [E] create_cache.c:551: Cannot scan '/etc/hal/fdi/preprobe': No such file or directory
13:02:43.726 [E] create_cache.c:709: Error generating fdi cache
pid 11136: rc=1 signaled=0: /usr/lib/hal/hald-generate-fdi-cache
13:02:43.727 [I] mmap_cache.c:104: In regen_cache_cb exit_type=0, return_code=1
13:02:43.727 [E] mmap_cache.c:153: fdi cache regeneration failed!
13:02:43.727 [I] mmap_cache.c:156: fdi cache generation done
13:02:43.727 [I] mmap_cache.c:278: cache mtime is 1367279160
*** [DIE] mmap_cache.c:di_rules_init():70 : Unable to open cache /var/cache/hald/fdi-cache

I created the missing directories and tried again.

sudo mkdir /etc/hal/fdi/preprobe
sudo mkdir /etc/hal/fdi/information
sudo /usr/sbin/hald --daemon=no --verbose=yes
rm -rf ~/.adobe

And now Amazon Prime Video is working again!

I have to give thanks to this thread in the Ubuntu forums and enigmaniac23 specifically for finding this fix.

If you run Linux and are not an Amazon prime member you should be. Not only do you get a huge library of movies and TV, but you get free 2 day shipping on every Amazon purchase. With he money you save in shipping alone the service pays for itself.

Join Amazon Prime - Watch Over 40,000 Movies