Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Thursday, 10 February 2011

Goodbye Adam

Well, it is final. I am disappointed with Notion Ink's Adam... and I am not talking about the numerous business-side problems everyone can read about, but about their decision to cover the Pixel Qi display with a reflecting glass and thus turning it into another high-tech mirror (still much better than the iPad but I am not interested in half measures).
Since I still need a mobile device, I decided to stop waiting for a miracle and bought myself a netbook yesterday (hope to get it tomorrow). I decided to go with the Samsung n210/n220[plus] (they are all almost identical... really). With the right battery (these models are sold with either a 3-cell battery or a 6-cell battery which comes in two versions - 4400 and 5900 mAh) the battery life should be around 8-10 hours (Samsung claims 13.5h but I wouldn't trust them here ;)).

After it arrives and I decide I like it, I intend to replace its dipslay, which is a decent matte (Yes! Finally someone made a good design decision! Thank you!) LCD, with a Pixel Qi. This way I will be able to use the netbook even in direct sunlight and its battery life is expected to go further up by 20-25%!.

Another modification I think about is adding a touch-sensing layer in front of the Pixel Qi (matte - not the glossy abomination used in Adam!).

When everything is complete, I will have a device with the following characteristics:
  • much faster than iPad (even the old Atom N270s are faster than A4)
  • almost e-ink image quality in direct sunlight (but with the responsiveness of LCD (e.g. video playback etc.))
  • a decent LCD indoors
  • 10-12 hours actual battery life
  • a multi-touch touchpad and display
  • a decent keyboard (no Adam or iPad can compete here)
  • a full Debian GNU/Linux with KDE 4 - the best OS out there (the netbook comes with Microsoft Windows 7 so I could have a dual-boot but I don't need another gaming machine)
The only thing the above lacks is a trackpoint instead of a touchpad. Trackpoints are so much better. Invaluable to a touch-typist and they even allow people to play computer games which are impossible to play with a touchpad (e.g. FPSs). Still, Alienware (including the smallest model for mobile use) and other gaming laptops all ship with touchpads - how crazy is that?!

To wrap up, here are links to youtube videos watching which should make everyone understand why, after waiting for almost two years, I decided to give up on Adam and go for a pure Pixel Qi solution:
  • Adam vs. Kindle (e-ink) - after watching this, ask yourself if you would like to work with Adam in the sun for a few hours
  • Pixel Qi vs. iPad - not really relevant to this topic so posting it here just for the fun factor - "mobility according to Apple" or "be mobile but stay in your basement" (if you are wondering, iPad is turned on ;) ) !

Wednesday, 10 March 2010

VirtualBox - hibernation of a host system may cause problems

Your virtual machines may not resume properly after thawing (i.e. starting the system after hibernation) - problems with vboxdrv kernel module. Here is my script which solves this issue (most of you can just put it in /etc/pm/sleep.d/action_virtualbox). I use Debian GNU/Linux but the script should work perfectly with other distros as well (e.g. Ubuntu, Fedora or Suse). The script puts all VMs to sleep (saves their state) and stores information about the associated processes (X Window display, real uid) in a file and tries to resume all VMs upon thawing, running them with correct user/display combination.

Do not worry if you cannot see the whole script (i.e. it appears to be clipped) just select and copy it with your mouse (or make your browser window wider).

#!/bin/sh
# suspend virtual machines on hibernate and resume them on thaw

# a file for storing a list of running vms
RVF='/var/run/running_vms'

PATH=/sbin:/usr/sbin:/bin:/usr/bin

if [ ! -x $SCRIPT ]; then
      exit 0
fi

SELF=action_virtualbox
COMMAND=

# pm-action(8) -  
#
# On hibernate, suspend all running VMs to disk
# resume them on thaw.

case "${1}" in
      hibernate)
              # 1. get a list of processes for all running virtual machines
              # 2. for each list item extract a login name, vm uid and display and store them in $RVF file
              # 3. save state of each vm
              ps eax -o user,cmd|
              grep '\bVirtualBox\b.*--startvm\b'|
              grep -v '\bgrep\b'|
              sed 's/\(^\w*\b\).*--startvm\( [[:alnum:]-]*\b\).*\( DISPLAY=:[0-9.]*\).*\($\)/\1\2\3\4/'|
              awk -v rvf=$RVF '
                      BEGIN {system(">"rvf)}
                      {print "\nSuspending VM "$2" (user: "$1")";
                       system("su -c \47VBoxManage -q controlvm "$2" savestate\47 "$1);
                       print "Appending VM data to file "rvf".\n";
                       system("echo "$0">>"rvf)}'
              # \47 is the single quote (i.e. "'")
              ;;
      thaw)
              if [ ! -s $RVF ]
              then
                      echo "No virtual machines suspended at the last hibernate which haven't already been thawed, therefore nothing to thaw."
                      exit 0
              fi
              cat $RVF|awk '
                      {print "\nResuming VM "$2" (user: "$1"; "$3")";
                       system("su -c \47"$3" VBoxManage -q startvm "$2"\47 "$1)}'
              echo "\nAll thawed. Deleting $RVF."
              rm $RVF
              ;;
esac

Popular Posts