Archive

Archive for October, 2008

Hibernate on EeePC 900A

Written on October 18th 2008, 00:10 by sYnie

Before I start to talk about hibernate, I want to mention a very strange behavior of the 900A. The internal SSD is named sda OR sdb, depending on whether there is a card in the card reader at the system startup. So if there is a card plugged in, the internal SSD will be flagged as sdb. If there is no card, it will be sda. WTF? I really have no idea what this is caused by. But I think this causes a problem with hibernation.

At first, I didn’t even realize, that the internal SSD changes its device name. I use Ubuntu eee and during the installation, the fstab and menu.lst were filled with UUID’s instead of the device names – So there is no problem with booting and mounting them.

Anyway, I tried to get hibernation aka suspend to disk to work using this tutorial:
http://www.ubuntu-eee.com/wiki/index.php5?title=Fix:_hibernate

Everything seemed to work. s2disk caused the notebook to hibernate (as long as i didn’t insert/remove a card), but the wakeup ended in a ordinary boot, without resuming the written image. After hours, I got it work. Just do exactly the same, as it’s described in the tutorial, except for one step.
When you’re asked to change the /etc/uswsusp.conf, don’t use any device names in it. Do it, as Ubuntu did it during the installation: Use UUID’s.
To get to know the UUID of the internal SSD, we have to find out, how it’s labeled:

mount

This will return something like this:

/dev/sdb1 on / type ext3 (rw,noatime,errors=remount-ro)
proc on /pro....

Now, we know our SSD is /dev/sdXX (sdb1 in my case), because it’s mounted to /. In the next step, we’ll get to know the UUID:

sudo vol_id /dev/sdXX |grep UUID=

This will return the UUID. In my case:

ID_FS_UUID=16fa07c8-8416-5f10-85c6-a8410fad510

And now we’ll use this UUID instead of the device name in /etc/uswsusp.conf:

# /etc/uswsusp.conf(8) -- Configuration file for s2disk/s2both
resume device = /dev/disk/by-uuid/16fa07c8-8416-5f10-85c6-a8410fad510
compress = y
early writeout = y
image size = 0
RSA key file = /etc/uswsusp.key
shutdown method = platform
resume offset = XXX

If you’ve found this site after you already tried the tutorial mentioned above, then just do the changes and run this at the end:

sudo update-initramfs -k `uname -r` -u

Otherwise hibernate will create the image but it won’t be booted.

And now, for me, it works *woohoo*
I hope this will help ;-)

Slideshow with OpenLaszlo as a “Widget”

Written on October 8th 2008, 20:10 by sYnie

Hey,

I want to introduce you the previous posted Slideshow created with OpenLaszlo, but this time, you can use it without any knowledge of OpenLaszlo. Just download it and use a simple HTML-embed object, to tell the SWF, which pictures you want to use. This is an Example:


(enlarge)

You can also use your mouse to navigate between the pictures and to start/stop the autmatical slide show.

The code which I used to embed it is:

<object width="400" height="300">
<param name="movie" value="visualslider/visualslider.swf">
<embed src="visualslider/visualslider.swf?vspic1=res/1.jpg&vspic1w=300&vspic1h=200&vspic2=res/2.jpg&vspic2w=300&vspic2h=200&vspic3=res/3.jpg&vspic3w=300&vspic3h=200&vspic4=res/4.jpg&vspic4w=300&vspic4h=200&vspic5=res/5.jpg&vspic5w=300&vspic5h=200&vspic6=res/6.jpg&vspic6w=300&vspic6h=200&vspic7=res/7.jpg&vspic7w=300&vspic7h=200" width="500" height="300">
</embed>
</object>

It’s quite simple. You just have to include the SWF file into your HTML document and give it some parameters about which pictures you want to use in the slideshow.
This is the URL to the SWF file I used:

visualslider/visualslider.swf?vspic1=res/1.jpg&vspic1w=300&vspic1h=200&vspic2=res/2.jpg&vspic2w=300&vspic2h=200&vspic3=res/3.jpg&vspic3w=300&vspic3h=200&vspic4=res/4.jpg&vspic4w=300&vspic4h=200&vspic5=res/5.jpg&vspic5w=300&vspic5h=200&vspic6=res/6.jpg&vspic6w=300&vspic6h=200&vspic7=res/7.jpg&vspic7w=300&vspic7h=200

  • “visualslider/visualslider.swf” is the place, where visualslider.swf is located.
  • “?vspic1=” is the parameter to tell the SWF, which picture (”res/1.jpg”) to use.
  • “&vspic1w=” to define the width (”300″).
  • “&vspic1h=” to define the height (”200″).
  • After that, I pass the next parameter for the second picture (”&vspic2=”), and so on.
  • You can also define “&vsms=” to tell the SWF, how fast it should change the picture. Default is set to 5000.

The SWF: visualslider.tar (2009-07-06)
The sourcecode: main.lzx (2009-07-06), visualslider.lzx (2009-07-06) (GPL’ed)
Click here to see the fully documented Visualslider component.
I hope it’s useful for you.