Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
Hi, sorry for this problem. I will integrate your patch asap and build a new package. Thanks! Armin. On Monday 27 February 2006 23:20, you wrote: Hi, I tried your version of the Load-Plugin applet. Unfortunately it makes de device reboot everytime I click on the applet. I could repeat the problem inside scratchbox. After going through the source, I found out that the problem is swapname not being initialized the first time. Here's a small patch to make it work. diff -Naur loadapplet-aw/load-plugin.c loadapplet-henry/load-plugin.c --- loadapplet-aw/load-plugin.c 2006-02-28 00:32:41.0 +0100 +++ loadapplet-henry/load-plugin.c 2006-02-27 22:50:01.0 +0100 @@ -536,7 +536,7 @@ gtk_menu_shell_append(GTK_MENU_SHELL(info-menu), info-menu_separator); /* Swap */ - if (strncmp(swapname, , 1) != 0) { + if (swapname strncmp(swapname, , 1) != 0) { if (swapisactive()) sprintf(label, swapoff %s (%d MB used), swapname, (swapused+512)/1024); else Regards, Henry -- --- May the Source be with you! Linux. --- --- http://www.arminwarda.mynetcologne.de/ --- secure eMail: http://www.gnupg.de/ --- pgpHXUzfx2V36.pgp Description: PGP signature ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
hi, instead of if (swapname strncmp(swapname, , 1) != 0) { just write if (swapname *swapname) { Stefan Henry Tan1g wrote: Hi, I tried your version of the Load-Plugin applet. Unfortunately it makes de device reboot everytime I click on the applet. I could repeat the problem inside scratchbox. After going through the source, I found out that the problem is swapname not being initialized the first time. Here's a small patch to make it work. diff -Naur loadapplet-aw/load-plugin.c loadapplet-henry/load-plugin.c --- loadapplet-aw/load-plugin.c 2006-02-28 00:32:41.0 +0100 +++ loadapplet-henry/load-plugin.c 2006-02-27 22:50: 01.0 +0100 @@ -536,7 +536,7 @@ gtk_menu_shell_append(GTK_MENU_SHELL(info-menu), info-menu_separator); /* Swap */ - if (strncmp(swapname, , 1) != 0) { + if (swapname strncmp(swapname, , 1) != 0) { if (swapisactive()) sprintf(label, swapoff %s (%d MB used), swapname, (swapused+512)/1024); else Regards, Henry ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
Hi, I fixed the stupid 'swapname == NULL' bug of 0.2.7-1, that happened when the icon was clicked the 1st time on any device, which did not have 0.2.6-1 installed previously: http://www.arminwarda.mynetcologne.de/load-plugin-aw_0.2.7-2_arm.deb http://www.arminwarda.mynetcologne.de/load-plugin-aw_0.2.7-2.tar.gz http://www.arminwarda.mynetcologne.de/patch5 Armin. On Tuesday 28 February 2006 10:48, Armin M. Warda wrote: Hi, sorry for this problem. I will integrate your patch asap and build a new package. Thanks! Armin. On Monday 27 February 2006 23:20, you wrote: Hi, I tried your version of the Load-Plugin applet. Unfortunately it makes de device reboot everytime I click on the applet. I could repeat the problem inside scratchbox. After going through the source, I found out that the problem is swapname not being initialized the first time. Here's a small patch to make it work. diff -Naur loadapplet-aw/load-plugin.c loadapplet-henry/load-plugin.c --- loadapplet-aw/load-plugin.c 2006-02-28 00:32:41.0 +0100 +++ loadapplet-henry/load-plugin.c 2006-02-27 22:50:01.0 +0100 @@ -536,7 +536,7 @@ gtk_menu_shell_append(GTK_MENU_SHELL(info-menu), info-menu_separator); /* Swap */ - if (strncmp(swapname, , 1) != 0) { + if (swapname strncmp(swapname, , 1) != 0) { if (swapisactive()) sprintf(label, swapoff %s (%d MB used), swapname, (swapused+512)/1024); else Regards, Henry On Tuesday 28 February 2006 11:11, Stefan Kost wrote: hi, instead of if (swapname strncmp(swapname, , 1) != 0) { just write if (swapname *swapname) { Stefan -- --- May the Source be with you! Linux. --- --- http://www.arminwarda.mynetcologne.de/ --- secure eMail: http://www.gnupg.de/ --- pgpwxNTWk0Hpz.pgp Description: PGP signature ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
Hi,I tried your version of the Load-Plugin applet. Unfortunately it makes de device reboot everytime I click on the applet. I could repeat the problem inside scratchbox. After going through the source, I found out that the problem is swapname not being initialized the first time. Here's a small patch to make it work. diff -Naur loadapplet-aw/load-plugin.c loadapplet-henry/load-plugin.c --- loadapplet-aw/load-plugin.c 2006-02-28 00:32:41.0 +0100+++ loadapplet-henry/load-plugin.c 2006-02-27 22:50: 01.0 +0100@@ -536,7 +536,7 @@ gtk_menu_shell_append(GTK_MENU_SHELL(info-menu), info-menu_separator); /* Swap */ - if (strncmp(swapname, , 1) != 0) {+ if (swapname strncmp(swapname, , 1) != 0) { if (swapisactive()) sprintf(label, swapoff %s (%d MB used), swapname, (swapused+512)/1024); else Regards,Henry ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
Hi, some minor enhancements to my version of Jakub's Load-Plugin applet: http://www.arminwarda.mynetcologne.de/load-plugin-aw_0.2.7-1_arm.deb http://www.arminwarda.mynetcologne.de/load-plugin-aw_0.2.7-1.tar.gz http://www.arminwarda.mynetcologne.de/patch4 Changes in the new version: - no swapon/off menu-entry if no swap configured (swapname is empty) - OK/Cancel confirmation-box after swapon/off menu-entry is selected Remember, you have to add the following line to /etc/sudoers manually: user ALL = NOPASSWD: /sbin/swapon *, /sbin/swapoff * Do you think the Load-Plugin applet with swapon/off is now end-user-ready and should be linked to from the Maemo ApplicationCatalog Wiki? regards, Armin. -- --- May the Source be with you! Linux. --- --- http://www.arminwarda.mynetcologne.de/ --- secure eMail: http://www.gnupg.de/ --- pgpeHJbB0so6A.pgp Description: PGP signature ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
David D. Hagood [EMAIL PROTECTED] writes: Koen Kooi wrote: Please tell me I'm reading this wrong: 'swap file on the internal flash'. You do know that flash is broken after ~100k writes/cell, right? And you know that will break your 770, right? I think you are living in the past. Modern flash chips have a write endurance of greater than a million cycles. You're sure? Maybe I'm not up to date, but I remember figures in the order of typically around 100,000 or even as low as 10,000, depending of the kind of write cycle (like MLC) for today's standard devices. A pointer to the data of the device actually used by the 770 would be much appreciated. Also, wear leveling means that even if you repeatedly write to the same logical sector number a million times, you will NOT have written to any one flash location over a million times. Life cycle endurance is not a reason not to use internal flash as swap. Again, maybe I'm not up to date: isn't wear leveling only effective if there's enough room left on your flash which gets freed from time to time? IOW, the more static data there is on a flash (like programs and fixed data), the less is gained from any leveling algorithm? - hcz ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet - deb-package
Hi, if you are crazy enough to try my changes, that nobody besides me has tested yet, and that could ruin your device, you can download and install the modified Load-Plugin applet her: http://www.arminwarda.mynetcologne.de/load-plugin_0.2.5-1_arm.deb You have been warned! Armin. On Thursday 23 February 2006 23:00, Armin M. Warda wrote: Hi, attached you find three patches for Jakub's Load-Plugin applet. I applied these changes to the source code downloaded from: http://koti.welho.com/jpavelek/tmp/770/load-plugin_0.2.5-1.tar.gz My code-changes are split into three incremental steps to make it easier to understand (and improve ;-) them: - patch1 adds a 'swapfile' configuration string to the settings menu. - patch2 makes all configuration settings persistent via gconf. - patch3 adds the swapon/off menu-entry and logic. The Load-Plugin runs as 'user', swapon and swapoff need 'root', thus you have to add the following line to /etc/sudoers manually: user ALL = NOPASSWD: /sbin/swapon *, /sbin/swapoff * Hopefully my changes are picked up, cleaned up, tested, and make it into the next main release. (Btw., I dropped auto-discovery of active swaps, because I think there is no need to auto-activate a swap on reboot via /etc/rc2.d/ anymore, when swapon/off is just one click away...) Armin. P.S.: With 'dpkg-buildpackage -rfakeroot' - how can I make sure the produced shared object is 'stripped' before packaging occurs? -- --- May the Source be with you! Linux. --- --- http://www.arminwarda.mynetcologne.de/ --- secure eMail: http://www.gnupg.de/ --- pgpDiZaug5z3A.pgp Description: PGP signature ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet - deb-package
ext Armin M. Warda wrote: Hi, if you are crazy enough to try my changes, that nobody besides me has tested yet, and that could ruin your device, you can download and install the modified Load-Plugin applet her: http://www.arminwarda.mynetcologne.de/load-plugin_0.2.5-1_arm.deb Please modify your version to something else because the package differs from original 0.2.5-1 .. You have been warned! You too :-) Armin. // Tapani On Thursday 23 February 2006 23:00, Armin M. Warda wrote: Hi, attached you find three patches for Jakub's Load-Plugin applet. I applied these changes to the source code downloaded from: http://koti.welho.com/jpavelek/tmp/770/load-plugin_0.2.5-1.tar.gz My code-changes are split into three incremental steps to make it easier to understand (and improve ;-) them: - patch1 adds a 'swapfile' configuration string to the settings menu. - patch2 makes all configuration settings persistent via gconf. - patch3 adds the swapon/off menu-entry and logic. The Load-Plugin runs as 'user', swapon and swapoff need 'root', thus you have to add the following line to /etc/sudoers manually: user ALL = NOPASSWD: /sbin/swapon *, /sbin/swapoff * Hopefully my changes are picked up, cleaned up, tested, and make it into the next main release. (Btw., I dropped auto-discovery of active swaps, because I think there is no need to auto-activate a swap on reboot via /etc/rc2.d/ anymore, when swapon/off is just one click away...) Armin. P.S.: With 'dpkg-buildpackage -rfakeroot' - how can I make sure the produced shared object is 'stripped' before packaging occurs? ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
On 2/23/06, David D. Hagood [EMAIL PROTECTED] wrote: Koen Kooi wrote: Please tell me I'm reading this wrong: 'swap file on the internal flash'. You do know that flash is broken after ~100k writes/cell, right? And you know that will break your 770, right? I think you are living in the past. Modern flash chips have a write endurance of greater than a million cycles. Also, wear leveling means that even if you repeatedly write to the same logical sector number a million times, you will NOT have written to any one flash location over a million times. Life cycle endurance is not a reason not to use internal flash as swap. Now, the fact that internal flash is a very limited resource and is not expandable, as is external flash - that is a reason not to use internal flash for swap. Wear leveling on the internal flash depends on FS (i.e., software) support, doesn't it? I wonder what the performance overhead of that is, and also the stability of the swap + JFFS2 path vs. the swap + swap partition path (of course, my ignorance of the swap code shows here; my big assumption is that in the case of a swap partition, the swap code goes straight from memory to blocks on a block device, skipping the FS layer altogether). Wear leveling on MMC is done by the hardware, isn't it? So we're really talking about the difference between swapping to a file on a JFFS2 fs on internal flash vs. swapping to a swap partition on MMC? I really think for most people, the decision is really more of a commodity hardware vs. non-commodity hardware one. I.e., can you more afford to replace a non-standard part (the 770, or the internal flash of the 770) or a standard part (mmc card) in the event that something goes wrong. Dave ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet - deb-package
On Friday 24 February 2006 11:33, Tapani Pälli wrote: Please modify your version to something else because the package differs from original 0.2.5-1 .. Can you tell me how I can do it? I would like to rename it to 'load-plugin-aw-0.2.6-1'. Armin. -- --- May the Source be with you! Linux. --- --- http://www.arminwarda.mynetcologne.de/ --- secure eMail: http://www.gnupg.de/ --- pgpSBPlYogJ1P.pgp Description: PGP signature ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet - deb-package
On 2/24/06, Armin M. Warda [EMAIL PROTECTED] wrote: Can you tell me how I can do it? I would like to rename it to 'load-plugin-aw-0.2.6-1'. Just edit your changelog file located inside the 'debian' directory. -- Eduardo de Barros Lima INdT - Instituto Nokia de Tecnologia [EMAIL PROTECTED] ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet - deb-package
Hi, it took some more files to modify besides the changelog, but I think I finally succeeded to fork Jakub's release: http://www.arminwarda.mynetcologne.de/load-plugin-aw_0.2.6-1_arm.deb http://www.arminwarda.mynetcologne.de/load-plugin-aw_0.2.6-1.tar.gz I posted the patches earlier on this list, still hope that Jakub will pick clean them up and continue to maintain the package. Please remember, this modified Load-Plugin applet has only been tested by me and could ruin your device. Be careful. I will not add the modified Load-Plugin applet to the Maemo ApplicationCatalog Wiki until at least some positive test reports have been posted here. Armin. On Friday 24 February 2006 16:43, I wrote: On Friday 24 February 2006 11:33, Tapani Pälli wrote: Please modify your version to something else because the package differs from original 0.2.5-1 .. Can you tell me how I can do it? I would like to rename it to 'load-plugin-aw-0.2.6-1'. On Friday 24 February 2006 17:34, Eduardo de Barros Lima wrote: Just edit your changelog file located inside the 'debian' directory. -- --- May the Source be with you! Linux. --- --- http://www.arminwarda.mynetcologne.de/ --- secure eMail: http://www.gnupg.de/ --- pgpBG33PicAZf.pgp Description: PGP signature ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
On Thursday 23 February 2006 01:34, David D. Hagood wrote: [EMAIL PROTECTED] wrote: Any suggestions? How about hooking swapoff to the hotplug event for the MMC card cover opening? Maybe even insertion also. Yes, I really would like to try this, but I do not know how this has to be done. Can anybody lend me a hand? (Of cause I would make this feature optional, with an enable/disable checkbox in the settings.) Yes, *please* hook the cover open/cover close events and enable/disable swap as appropriate. But this will only make sense for a swap living on the RS-MMC. If you are running with a swap file on the internal flash, you would not want to swapoff when the RS-MMC lid is opened... Do you think, detection of the prefix /dev/mmcblk0 for a swap device - or /media/mmc1/ for a swap file - in /proc/swaps, is good enough to conclude, that the swap lives on the RS-MMC? Is absense of these prefixes good enough to conclude, that the swap down _not_ live on the RS-MMC? Also, please scan not just for swap files, but also for swap partitions - Yes, via /proc/swaps I autodetect an active swap-file or -device, if none has been configured in the Load-Plugin applet settings. I prefer to have a swap partition Me too, I use /dev/mmcblk0p2 - I repartitioned the RS-MMC with two partitions: mmcblk0p1 with 480MB FAT and mmcblk0p2 with 30 MB swap. USB-plugging the N770 to the PC only umounts the 1st partition, the swap on the seconds remains available. Armin. -- --- May the Source be with you! Linux. --- --- http://www.arminwarda.mynetcologne.de/ --- secure eMail: http://www.gnupg.de/ --- pgp0NkjAaLOm3.pgp Description: PGP signature ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
On Thu, 2006-02-23 at 15:01, ext Armin M. Warda wrote: On Thursday 23 February 2006 01:34, David D. Hagood wrote: [EMAIL PROTECTED] wrote: Any suggestions? How about hooking swapoff to the hotplug event for the MMC card cover opening? Maybe even insertion also. Yes, I really would like to try this, but I do not know how this has to be done. Can anybody lend me a hand? (Of cause I would make this feature optional, with an enable/disable checkbox in the settings.) The easiest way is probably to use the GConf key /system/osso/af/mmc-cover-open that is updated then the MMC cover is opened and closed. GConf allows you to be notified when the value of the key changes. BR; Kimmo ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Armin M. Warda wrote: On Thursday 23 February 2006 01:34, David D. Hagood wrote: [EMAIL PROTECTED] wrote: Any suggestions? How about hooking swapoff to the hotplug event for the MMC card cover opening? Maybe even insertion also. Yes, I really would like to try this, but I do not know how this has to be done. Can anybody lend me a hand? (Of cause I would make this feature optional, with an enable/disable checkbox in the settings.) Yes, *please* hook the cover open/cover close events and enable/disable swap as appropriate. But this will only make sense for a swap living on the RS-MMC. If you are running with a swap file on the internal flash, you would not want to swapoff when the RS-MMC lid is opened... Please tell me I'm reading this wrong: 'swap file on the internal flash'. You do know that flash is broken after ~100k writes/cell, right? And you know that will break your 770, right? regards, Koen -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFD/bTGMkyGM64RGpERAsnLAKC3ev+fcJMjURrWC2QVedBpsp6JIgCdErIw ufGwdwWFKeF3mxnPynWywHc= =GXOS -END PGP SIGNATURE- ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
On Thu, 2006-02-23 at 15:51, ext Jonathan Matthews-Levine wrote: On 2/23/06, Kimmo Hämäläinen [EMAIL PROTECTED] wrote: On Thu, 2006-02-23 at 15:01, ext Armin M. Warda wrote: On Thursday 23 February 2006 01:34, David D. Hagood wrote: [EMAIL PROTECTED] wrote: Any suggestions? How about hooking swapoff to the hotplug event for the MMC card cover opening? Maybe even insertion also. Yes, I really would like to try this, but I do not know how this has to be done. Can anybody lend me a hand? (Of cause I would make this feature optional, with an enable/disable checkbox in the settings.) The easiest way is probably to use the GConf key /system/osso/af/mmc-cover-open that is updated then the MMC cover is opened and closed. GConf allows you to be notified when the value of the key changes. Shirley there's an issue where the swapoff operation takes longer than the physical open cover // remove MMC operation? Yes, and if there is not enough RAM to swapoff, it will probably crash some applications and daemons (even the kernel?), causing a reboot... BR, Kimmo With an explicit toolbar click, at least you can put up an immediate prompt saying don't remove the MMC! and replace it with Finished! when the swapoff has completed ... Cheers, Jonathan -- Don't anthropomorphize computers. They don't like it. ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
Any suggestions? How about hooking swapoff to the hotplug event for the MMC card cover opening? Maybe even insertion also. - Thomas Swindell ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
[EMAIL PROTECTED] wrote: Any suggestions? How about hooking swapoff to the hotplug event for the MMC card cover opening? Maybe even insertion also. Yes, *please* hook the cover open/cover close events and enable/disable swap as appropriate. Also, please scan not just for swap files, but also for swap partitions - I prefer to have a swap partition since the time the FAT file system on the card got corrupted and trying to swap to the swap file was, let us say, rather ugly. ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers