Puppylinux for the OLPC laptops: XOpup

For talk and support relating specifically to Puppy derivatives
Post Reply
Message
Author
User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

RC3

#16 Post by mavrothal »

XOpup-1.0_RC2 had a 2 copies of iwpriv :oops:
Nothing dramatic, but the file was eliminated and the build became RC3. Check the top post
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

Lerc
Posts: 4
Joined: Wed 29 Sep 2010, 10:39

#17 Post by Lerc »

Great Work in getting this going.

I've installed it on sd card and I'm already pulling it to bits and breaking it :-)

The load to ram is a bit of a killer on an XO-1. You run out quickly and swapping on SD is not so nice. I bumped the size check up in init, which worked nicely except if you do the merge store rather than lupusave.2fs it forces a load to ram of lupu-511.sfs. (lines 1120-1126) of init.

there's a comment of.
#100406 this came about because aufs did not work if an sfs mounted via loop device as one layer
#was actually resident on another layer. however latest patched aufs may allow this...
If you're doing a patched kernel anyway, you may want to look at having that to allow merge without load to ram.

I've got a save-file running at the moment. I was hoping to have the home directory on mmcblk0p2 (and swap on mmcblk0p3 (btw, there's no node for this if you have three partitions on your sd, I have to mknod /dev/mmcblk0p3 b 179 3)) but a boot parameter of PHOME=mmcblk0p2 doesn't appear to be doing anything for me.

Lots of good stuff though. I'll see if I can get some of my XO bits running on it to contribute to the setup. Playing with it made me finally get off my butt and dive into the ROX-Filer source. I've suppressed Open while icons are winking so you don't accidentally launch two copies of things if you double click.

More when I've broken it some more.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#18 Post by mavrothal »

Lerc wrote:The load to ram is a bit of a killer on an XO-1. You run out quickly and swapping on SD is not so nice.
When I originally tried puppy on the XO all I had to do (besides the kernel) was to copy the content of the FSF in the partition and run it "normally" (not in RAM) eg in the "full install" version. (loop mount to a folder and copy in /)
I have not tried it with XOpup but I do not see why it wouldn't work. Then you can have you home file anywhere you want. Just adjust fstab.

Regarding Swap on SDcard I run the same card with swap 2 years now for all the builds I tried on the XO (Fedora/Ubuntu/Puppy etc) and has 0 bad blocks! It also holds teapots Ubuntu! I'm clearly lucky with this card (A 4GB class 6 Transend) but I had no problems with Swap and OS on the same card (yet :twisted: )
Lerc wrote:More when I've broken it some more
..and fix it :wink:
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

Lerc
Posts: 4
Joined: Wed 29 Sep 2010, 10:39

#19 Post by Lerc »

mavrothal wrote: Regarding Swap on SDcard I run the same card with swap 2 years now for all the builds I tried on the XO (Fedora/Ubuntu/Puppy etc) and has 0 bad blocks! It also holds teapots Ubuntu! I'm clearly lucky with this card (A 4GB class 6 Transend) but I had no problems with Swap and OS on the same card (yet :twisted: )
I think the notion of bad blocks from swapping is largely a myth, The write speed of the devices combined with the wear levelling standard on SD would mean you'd need to be thrashing for quite a few years before you hit something like 100k writes on a spot.

I was mostly referring to the slowdown to swapping, I've done some speed tests on the SD in my machine and it reads at 9MB/sec. I suspect writes are slower. I'll do some write tests when I next trash a partition.

Interestingly I can read from USB at 12MB/sec without slowing SD reads for a combined 21MB/sec. (That particular thumbdrive managing 17MB/sec without SD access). Swap is supposed to load balance on even priority drives so perhaps the ideal setup is 3 thumbdrives+SD :-)

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#20 Post by 01micko »

mavrothal and others who want to try

I have vastly simplified the 'airplane mode' to just 1 script, it works fine on xo-1 and no reason it wont on xo-1.5. It is based on tempestuous' and jemimah's work just flipping the switch in /sys/class/rfkill/rfkill0/state

Here it is..

Code: Select all

#!/bin/sh
#olpc rfkill script 
#turns off wifi so you can use in a plane or use a 3G modem
#20101003 gpl 01mick@gmail.com
WIFISTATE=`cat /sys/class/rfkill/rfkill0/state`
killwifi (){
WIFISTATE=`cat /sys/class/rfkill/rfkill0/state`
if [[ $WIFISTATE = 1 ]];then 
	ifconfig eth0 down
	echo 0 > /sys/class/rfkill/rfkill0/state
	Xdialog --timeout 5 --msgbox "Wireless conectivity is off" 0 0 0
		else Xdialog --timeout 5 --msgbox "Your wireless conectivity is already off"  0 0 0
fi
}
export -f killwifi
startwifi (){
WIFISTATE=`cat /sys/class/rfkill/rfkill0/state`
if [[ $WIFISTATE = 0 ]];then 
	echo 1 > /sys/class/rfkill/rfkill0/state
	sleep 1
	ifconfig eth0 up 2>/dev/null
	sleep 1
	/usr/local/apps/Connect/AppRun --connect &
	Xdialog --timeout 5 --msgbox "Wireless conectivity is on \n If your connection failed \nright click the network tray icon \n and select \"Reconnect to Network\"" 0 0 0
		else Xdialog --timeout 5 --msgbox "Your wireless conectivity is already on" 0 0 0
fi
}
export -f startwifi
if [[ $WIFISTATE = 1 ]];then TEXT1="Click the button to turn 
off your wireless device."
		TEXT2="<text><label>Turn Off</label></text>"
		BUTTON="<button><input file>/usr/local/lib/X11/mini-icons/networkdead.xpm</input><action>killwifi &</action><action>EXIT:wifioff</action></button>"
	else TEXT1="Click the button to turn 
on your wireless device."
			TEXT2="<text><label>Turn On</label></text>"
			BUTTON="<button><input file>/usr/local/lib/X11/mini-icons/networkboth.xpm</input><action>startwifi &</action><action>EXIT:wifion</action></button>"
fi
export TEXT1
export TEXT2
export BUTTON
export RFKILLSCRIPT="
<window title=\"Toggle Wifi\">
 <vbox>
  <frame>
  <hbox homogeneous=\"true\">
   <pixmap>
    <input file>/usr/share/icons/xo.png</input>
   </pixmap>
  </hbox>
  <hbox homogeneous=\"true\">
  <text use-markup=\"true\"><label>\"<b>$TEXT1</b>\"</label></text>
  </hbox>
  <hbox homogeneous=\"true\">
   $TEXT2
   $BUTTON
  </hbox>
  </frame>
  <hbox homogeneous=\"true\">
   <button ok></button>
  </hbox>
 </vbox>
</window>"
gtkdialog3 -p RFKILLSCRIPT
unset RFKILLSCRIPT
__________________________________

Have been experimenting with flashplayer and swfdec with no results of value :(

Cheers
Puppy Linux Blog - contact me for access

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#21 Post by mavrothal »

01micko wrote:mavrothal and others who want to try

I have vastly simplified the 'airplane mode' to just 1 script, it works fine on xo-1 and no reason it wont on xo-1.5. It is based on tempestuous' and jemimah's work just flipping the switch in /sys/class/rfkill/rfkill0/state
Works fine on the XO-1.5 too :D
However, you need to incorporate the trick with moving /etc/powerd/postresume.d/reconnect.sh out and in of postresume.d folder because otherwise the XO will reconnect after a suspend cycle (rather common in an airplane :D ) and will not reconnect after suspend if you leave it out when exiting airplane mode.
eg

Code: Select all

if [[ $WIFISTATE = 1 ]];then 
   ifconfig eth0 down 
   echo 0 > /sys/class/rfkill/rfkill0/state 
   mv /etc/powerd/postresumse.d/reconnect.sh /etc/powerd
   Xdialog --timeout 5 --msgbox "Wireless conectivity is off" 0 0 0 
      else Xdialog --timeout 5 --msgbox "Your wireless conectivity is already off"  0 0 0 
fi
and

Code: Select all

if [[ $WIFISTATE = 0 ]];then 
   echo 1 > /sys/class/rfkill/rfkill0/state 
   mv /etc/powerd/reconnect.sh /etc/powerd/postresume.d
   sleep 1 
   ifconfig eth0 up 2>/dev/null 
   sleep 1 
   /usr/local/apps/Connect/AppRun --connect &
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

New power applet

#22 Post by mavrothal »

01micko made a new tray battery monitor for the XO that accurately (and colorfully :D ) reports XO battery level, while clicking on the tray icon gives you a full battery report.
But then went to sleep.... :D

So here is a pet (and its source code) that will remove the old battery monitor and start the new one. The last (stale) icon of the old battery monitor will stay there till reboot or till you right-click on it and quit it.

If you want the old monitor back remove /root/Startup/powerapplet_xo and install the bat_widget-0.2.pet

Please test and report what you think about it.
Attachments
powerapplet_xo-0.1src.tar.gz
(5.34 KiB) Downloaded 1420 times
powerapplet_xo-0.1.pet
(3.71 KiB) Downloaded 1427 times
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#23 Post by 01micko »

mavrothal wrote:01micko made a new tray battery monitor for the XO that accurately (and colorfully :D ) reports XO battery level, while clicking on the tray icon gives you a full battery report.
But then went to sleep.... :D
Erm.. are you referring to me or the battery monitor ??? ( :wink: :lol: )

I am assuming me!

____________________________________

One problem, may or may not be due to the new battery widget.. retrovol is not loading :( ... there is an error in /tmp/xerrs.log ..

Code: Select all

retrovol: hcontrol.c:573: snd_snd_hctl_load: Assertion 'hctl->count  ==  0' failed. 
Cannot read file: /root/retrovolrc 
Using defaults...
/usr/sbin/delayedrun: line 160: 3086 Aborted  retrovol -hide ${BGOPT} 
Good thing though, not much else in /tmp/xerrs.log
Cheers
Puppy Linux Blog - contact me for access

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#24 Post by mavrothal »

01micko wrote:
One problem, may or may not be due to the new battery widget.. retrovol is not loading :( ... there is an error in /tmp/xerrs.log ..

Code: Select all

retrovol: hcontrol.c:573: snd_snd_hctl_load: Assertion 'hctl->count  ==  0' failed. 
Cannot read file: /root/retrovolrc 
Using defaults...
/usr/sbin/delayedrun: line 160: 3086 Aborted  retrovol -hide ${BGOPT} 
Good thing though, not much else in /tmp/xerrs.log
Cheers
Retrovol looks fine on my end.
I'll try few more installations in different setups to see if I get any problems.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

rrolsbe
Posts: 185
Joined: Wed 15 Nov 2006, 21:53

Looks like powerapp pet broke my sound also

#25 Post by rrolsbe »

Looks like my sound is broke after installing the powerapp pet. I removed the pet package but the sound did NOT return.

I might have to remove my pupsave and start over to undo the sound problem?

Regards, Ron

01micko wrote:
mavrothal wrote:01micko made a new tray battery monitor for the XO that accurately (and colorfully :D ) reports XO battery level, while clicking on the tray icon gives you a full battery report.
But then went to sleep.... :D
Erm.. are you referring to me or the battery monitor ??? ( :wink: :lol: )

I am assuming me!

____________________________________

One problem, may or may not be due to the new battery widget.. retrovol is not loading :( ... there is an error in /tmp/xerrs.log ..

Code: Select all

retrovol: hcontrol.c:573: snd_snd_hctl_load: Assertion 'hctl->count  ==  0' failed. 
Cannot read file: /root/retrovolrc 
Using defaults...
/usr/sbin/delayedrun: line 160: 3086 Aborted  retrovol -hide ${BGOPT} 
Good thing though, not much else in /tmp/xerrs.log
Cheers

rrolsbe
Posts: 185
Joined: Wed 15 Nov 2006, 21:53

USB interface bit rate appears to be to SLOW for some videos

#26 Post by rrolsbe »

I put the same videos on an SDHC card and they play fine using mplayer with the recommended commands for low end hardware shown in the mplayer terminal. I did NOT have to use the skip frame option.

Seems like the USB data rate should be fast enough but maybe it is an issue of the processor working harder/getting interupted and not the data rate? Maybe SDHC uses DMA?

The MP4 video is 50 Min long and is around 350MB in size.
Giving 7MB/Min or 116KBytes/sec (Way slower than 6MB/sec)


Now if I could find a way to interface my SATA II SSD to the faster SDHC interface or find an SDHC/USB interface (the reverse of the normal USB/SDHC)? <- I know fat chance... Guess I will need to look for a compatible 32GB SDHC card. I am open to recommended brands to purchase.

Regards, Ron

http://wiki.laptop.org/go/SD_and_USB_FL ... erformance

I am surprised at the write speeds for the SDHC cards at the above link. My guess is, after the device fills all the available NAND pages, the write speed will be MUCH slower (about 10X slower)? Of course, the read speeds should not degrade much and that what counts for video playback.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

Re: Looks like powerapp pet broke my sound also

#27 Post by mavrothal »

rrolsbe wrote:Looks like my sound is broke after installing the powerapp pet. I removed the pet package but the sound did NOT return.
Ron, Mick
I can not reproduce this problem.
I have tried etx3 formatted SDcard and USB and saving to the entire partition and an ext3 formatted USB with saving to an etx2 formatted lupusave file (this was done from scratch). Presence or absence of swap tested too.
Sound/retrovol was always fine.

Anything special about your setup? Any other modifications to the tray?

What "alsa reload" and "alsactl init" report if issued in terminal?
How does your /etc/asound.state file looks like?
Is it a retrovol or an alsa issue?

-----------------------------------------------------
rrolsbe wrote:I am surprised at the write speeds for the SDHC cards at the above link. My guess is, after the device fills all the available NAND pages, the write speed will be MUCH slower (about 10X slower)?
Ron,
The numbers given there are real! but they are for the XO-1.5...
Unfortunately the "good SDcard" is a total russian roulette on the XO. Brand or product number does not mean much either! Is mostly how the card controller cooperates with the XO and these are changed without much info

I had luck with Transcend crads. A-data was a disaster and Kingston was almost OK on the XO-1.5 but gave me something like 0.5MB/sec write speeds on the XO-1. :evil:
However a previous Kingston, same card theoretically, was superb on the XO-1.
OLPC recommends SunDisk cards. I only had an old 1GB class 2 from a camera and was no good.

If you really wand to put down the money for a 32MB card a) make sure you have an alternative use for it :wink: b) try a SunDisk class 6 or a transcend

However, my best recomendation is try some from your friends, you find a good one keep it and buy them a new one :D

Unfortunately the very handy card test of the OFW - the one used for the tests in your link - is currently available only for the XO-1.5 firmware (should be in the next XO-1 firmware release)
But you can use "iozone" to test read/write speeds. There is an rpm for it, that works on Fedora but also on XOpup.
Incidentally, the iozone test gave me the same results as the OFW test within a 10% difference.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

rrolsbe
Posts: 185
Joined: Wed 15 Nov 2006, 21:53

Sound problem

#28 Post by rrolsbe »

Ron, Mick
I can not reproduce this problem.
I have tried etx3 formatted SDcard and USB and saving to the entire partition and an ext3 formatted USB with saving to an etx2 formatted lupusave file (this was done from scratch). Presence or absence of swap tested too.
Sound/retrovol was always fine.
You have already tried my setup -- booting from USB ext2 RC3 with ext2 lupusave.2fs file using pup.swp file.

When I went from RC1 to RC3, I tried to use my pupsave.2fs from RC1. Everything worked except the sound. (Not knowing what caused the loss of sound) I recreated a new pupsave.2fs to fix the sound. Any reason why the pupsave.2fs from RC1 would not work with RC3 (Same kernel,correct)? NOTE: I had this issue prior to installing the powerapp.pet and loosing the sound.
Anything special about your setup? Any other modifications to the tray?
Nothing else modified in the tray.
What "alsa reload" and "alsactl init" report if issued in terminal?
How does your /etc/asound.state file looks like?
Is it a retrovol or an alsa issue?


Might not get a chance to try the above until Saturday.

Regards, Ron

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#29 Post by mavrothal »

Ron,
sound is probably the most unstable part of XOpup. Even in Fedora needs some workaround to work properly.
My best guess is that has to do with device configuration, but is not clear to me how they get messed up at times.

I would suggest to just try (re)installing udev from the ubuntu main repository through the puppy package manager. Just udev151(+), not any dependencies. Reboot and see if this brings sound back.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#30 Post by 01micko »

:D Some good news ..

The new powerapplet_xo ssems to work just fine if it is incorporated in the lupu-511.sfs, I respun the sfs, deleting all the old stuff in ~/Startup and /usr/local/bat_widget (um, sorry if dir is wrong, I'm kind of like Jeff out of the Wiggles :wink: ) and adding ONLY the powerapplet_xo exec to ~/Startup. No alsa problems :D (oh, yes it was alsa :lol: :roll: ).
NOTE: I tested with loading an sfs after creating the save file, and also with connecting my 3G modem, (which was a cinch by the way :wink: , although, 'arplane' mode needs to be on or else mesh wants to take control of the wifi device, not a problem on xo-1.5)

If anyone wants I can upload the sfs.

However, there is still some kind of problem.. installing dotpets and even sfs can cause issues (in xo-1), which I can work around but the average kid will have no idea. I need to dig a bit deeper into that one :wink: . Unfortunately, they are those stupid 'intermittent' problems.. sometimes they occur, sometimes not.. the hardest ones to debug :cry: . Oh, well, we try anyway. 8) .

Cheers
Puppy Linux Blog - contact me for access

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#31 Post by mavrothal »

01micko wrote:and also with connecting my 3G modem, (which was a cinch by the way :wink:
Anything more on that "cinch" ? May not be so trivial to everyone :shock: :D
01micko wrote:However, there is still some kind of problem.. installing dotpets and even sfs can cause issues (in xo-1)
That would be with your custom sfs or the original?
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#32 Post by 01micko »

Anything more on that "cinch" ? May not be so trivial to everyone
Ah yes, a 'howto' help file is needed, and not just for the olpc. There needs to be a a database in place with instructions for certain modems. While some like mine are very easy to set up, others can be a little more difficult.
That would be with your custom sfs or the original?
Both the same, seems it may be related to which usb dongle I use, so not really a 'bug', will know more on the week end, less sleepy then :D

Cheers
Puppy Linux Blog - contact me for access

rrolsbe
Posts: 185
Joined: Wed 15 Nov 2006, 21:53

Report back on sound

#33 Post by rrolsbe »

I would suggest to just try (re)installing udev from the ubuntu main repository through the puppy package manager. Just udev151(+), not any dependencies. Reboot and see if this brings sound back.
Tried did not work. Though I had power pet removed. I had to remove the power pet several times before the package manager did not list it as installed; likewise, had to install the udev151-12 several time before it was shown as installed. I rebooted each time after adding or removing but the packages did not install/uninstall properly?


BTW, "alsactl init" -- Reported no sound device

Regards, Ron

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

powerapplet

#34 Post by mavrothal »

Ron, Mick
do you by any chance installed a package after you installed the powerapplet pet, and then the sound disappeared on next reboot??? Did you see 2 battery monitors at any point???

I think that the problem is that the pinstall.sh script re-runs every time you install a package. Since the the commands now spit errors (no files to remove no processes to kill) it hangs and on reboot the hanged processes corrupt the file system!!!

Is a wild guess but is this the case? Did you install another package after the powerapplet and before the sound issue?

BTW how do you remove (automatically) the pinstall.sh after installation
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#35 Post by 01micko »

I didn't install the pet at all, I had it installed manually.

Also what rrslobe describes is similar behaviour to what I have seen with installing/uninstalling pets, even before powerapplet_xo existed, and yes, pinstalls seem to be the culprit.

Cheers
Puppy Linux Blog - contact me for access

Post Reply