Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-28-2017, 01:07 PM   #301
sam.vanratt
Member
sam.vanratt began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2017
Device: Kindle DX (G)
Hi to everyone here
I tried to enable swap but after creating the swap and marking the swap I'm stuck at not being able to use it:
dd if=/dev/zero of=/mnt/us/swapfile.swap bs=1M count=64
/mnt/us/busybox mkswap /mnt/us/swapfile.swap
/mnt/us/busybox swapon -a
(a "/mnt/us/busybox swapon /mnt/us/swapfile.swap" is corrected with invalid argument)

dmesg "swapon: swapfile has holes"
free shows of course no swap used

(busybox is this one │ 25.016Bytes│19.08.15│ 0:16)

As the swapfile is freshly created i couldn't help wondering where the nonsequentiell blocks (holes) come from.

Apart from that way: my DXG uses 107MB RAM at boottime, so I understand the need for swap or even (guessed so far) out of memory crashes. Wouldn't it be practical to save nonessentiell RAM by deactivating some modules like the two Audio/Volume daemons as MP3/WMA playback is cracking, so unusable anyway.
Cheers
Sam

Last edited by sam.vanratt; 12-28-2017 at 01:13 PM.
sam.vanratt is offline   Reply With Quote
Old 12-28-2017, 01:13 PM   #302
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
You can't run swap on top of the FUSE filesystem.
Use /var/local to hold your swap file instead.
knc1 is offline   Reply With Quote
Advert
Old 12-29-2017, 11:41 AM   #303
sam.vanratt
Member
sam.vanratt began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2017
Device: Kindle DX (G)
Hello KNC1
that sounds mean and safe. But why does it work on updates in the same way (to get swap for updates)? Same "syntax" (OK, us instead of base-us) and location...

Any thought on not longer used services (audio/volume)? Funny thing is the nice to have tools are present (nano, rsync,....), while others (mkswap/swapon,...) are forgotten.

Cheers
Sam

Last edited by sam.vanratt; 12-29-2017 at 11:58 AM.
sam.vanratt is offline   Reply With Quote
Old 12-29-2017, 11:46 AM   #304
sam.vanratt
Member
sam.vanratt began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2017
Device: Kindle DX (G)
Wouldn't it be reasonable to create swap with fdisk (or as a file) and then enable swap via fstab instead of userland workarounds?

Last edited by sam.vanratt; 12-29-2017 at 11:48 AM.
sam.vanratt is offline   Reply With Quote
Old 12-29-2017, 12:04 PM   #305
sam.vanratt
Member
sam.vanratt began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2017
Device: Kindle DX (G)
Quote:
Originally Posted by sam.vanratt View Post
Hello KNC1
that sounds mean and safe. But why does it work on updates in the same way (to get swap for updates)? Same "syntax" (OK, us instead of base-us) and location...

Any thought on not longer used services (audio/volume)? Funny thing is the nice to have tools are present (nano, rsync,....), while others (mkswap/swapon,...) are forgotten.

Cheers
Sam
Hi KNC1
you already answered that the base question 1 on page 5 of this thread. Still what about the unused services? According to top the audioserver+volumed consumes about 6MB of crucial RAM.
sam.vanratt is offline   Reply With Quote
Advert
Old 12-29-2017, 01:12 PM   #306
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by sam.vanratt View Post
Wouldn't it be reasonable to create swap with fdisk (or as a file) and then enable swap via fstab instead of userland workarounds?
You are writing about one of the early generation (prior to touchscreen) Kindles.
Updates where incremental, there was (still is but unused) a system manifest with a list of the files and their md5sum.
If one of the update fragments found a file (such as fstab) different, the update would fail and most likely the device would brick.

That used to be 80% of the traffic on this site - how to un-brick a Kindle.

Ah, the post I replied to DID create the swap area as a file.

The mention of fdisk implies making the swap area as a partition.
There are other "sanity checks" during the boot-up process that would fail if the storage partitions where not as expected.
Just another way to brick the device.

SO:
Put the file (of all zeros) on /var/local (which is always available, unlike the fuse exported area),
run mkswap on it,
manually run the swapon/swapoff as required.
knc1 is offline   Reply With Quote
Old 12-29-2017, 05:11 PM   #307
sam.vanratt
Member
sam.vanratt began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2017
Device: Kindle DX (G)
Hi knc1
I'd do as advised, but my df shows:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mmcblk0p1 407661 396350 0 100% /
tmpfs 63584 28 63556 0% /dev
rwfs 32768 180 32588 1% /mnt/rwfs
shm 63584 0 63584 0% /dev/shm
rwfs 32768 180 32588 1% /var
/dev/mmcblk0p2 23797 1847 20722 8% /var/local
/dev/loop/0 3503372 751636 2751736 21% /mnt/base-us
fsp 3503372 751636 2751736 21% /mnt/us

so only 20MB on /var/local and additional 32MB on /var but the later is used for the /var/log as well so better to leave it alone.
the original advice with /mnt/base-us works so far (just doesn't seem right).
I implemented it into /opt/..../start.sh
/mnt/us/busybox mkswap /mnt/base-us/swapfile.swap
/mnt/us/busybox swapon /mnt/base-us/swapfile.swap
and it works.

Still: isn't it advised to deactivate unused services (audio) to save precious RAM as it doesn't seem possible to get it working as it was in V2.5.x (it crackles all the time even when the player is deactivated or the device in standby (the battery is drained after a day or so); only a reboot helps to cure the crackling.
sam.vanratt is offline   Reply With Quote
Old 12-29-2017, 06:43 PM   #308
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
When the fuse file system exports that partition as USB storage, it is no longer available on the system side.
And if you have swap on it, your access to swap is cut-off.
Not a good thing to happen to the system if swap is in active use.

Note:
You do not need much swap -
Just a few megabytes will do just fine.
This is an embedded system, not a network server.

/var is tmpfs
putting swap on tmpfs is a VERY BAD idea.
in fact, depending on the kernel version, it will deadlock.

think about it -
What is the backing store for tmpfs?
swap
and when you need more room in tmpfs, where do the in memory portions get written?
swap
now what happens when the memory management needs to write to a memory page (of the swap file) that isn't in memory?
it has to write to swap to make room to write to swap ...
deadlock.
knc1 is offline   Reply With Quote
Old 01-08-2018, 03:22 PM   #309
sam.vanratt
Member
sam.vanratt began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2017
Device: Kindle DX (G)
Hi knc1
I never looked into the mounting and the background (it always worked as it should with V2.5.x) until the upgrade. I never measured the RAM usage before, but I surely didn't expect it to go through the roof ;-).
I expected the browsing would consume a lot of RAM, not the simple pdf viewing. So I will take the advice to downsize the swap to 12-16MB in /var/local and see if the crashes happen again.
Unluckily the powerd is working completely different than before as the settings of the powerd.conf is ignored (I'd live with that), but the "~ds" is as well no longer working (in my DXG), so every 600sec my DXG goes to sleep, is awaken in a second (so no deep sleep) and I could not locate the setting (fgrep in /etc and /opt) for this 600sec timeout. Could it be that it's hardcoded in the binaries?
Cheers
Sam
sam.vanratt is offline   Reply With Quote
Old 01-08-2018, 04:25 PM   #310
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
The DX/K2 devices are old, long time ago that any work was done on them here.
I honestly don't know.

If you can't find it here with the prefix filter or the master index nor by searching here and in the wiki -
You will have to re-invent the knowledge.
knc1 is offline   Reply With Quote
Old 01-11-2018, 04:28 PM   #311
jipvankuijk
Junior Member
jipvankuijk began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2018
Device: Kindle DXG
Hello guys,

I have been trying to update my Kindle DXG from 3.2.1 to 3.3 which worked out fine, and now 3.3 to 3.4 to then do 3.4 to 3.4.2.

I need these last few steps because 3.3 can no longer connect with the Amazon store etc. due to the SSL 3.0 thing.

I am however stuck on the following part: I don't know where to get the /etc/fb.modes file from and how to do this patching it bla bla.

The guide is very clear and well written except for this part!

I hope someone can help me

Right now I'm stuck with a useless device since I can't access the Amazon store.

Quote:
Originally Posted by newman View Post
I had to copy out system /etc/fb.modes file, patch it with appropriate file from "update-adds.tar.gz", edit the result a bit to fit my Kindle's display resolution, create a proper patch (see man bsdiff), replace the old patch from "update-adds.tar.gz" by the new one, and finally change the expected MD5 in "611680021-1725970040.sh". Also MD5 hash of /etc/fb.modes should be changed in "rootfs_md5_list" file from "rootfs_md5_list.tar.gz". There are other ways to fix this problem (e.g. local patching and transfer of the file, see how libwebkit{,gtk} was handled, but I did not know it was possible back then).
jipvankuijk is offline   Reply With Quote
Old 01-12-2018, 05:17 PM   #312
newman
homo viator
newman ought to be getting tired of karma fortunes by now.newman ought to be getting tired of karma fortunes by now.newman ought to be getting tired of karma fortunes by now.newman ought to be getting tired of karma fortunes by now.newman ought to be getting tired of karma fortunes by now.newman ought to be getting tired of karma fortunes by now.newman ought to be getting tired of karma fortunes by now.newman ought to be getting tired of karma fortunes by now.newman ought to be getting tired of karma fortunes by now.newman ought to be getting tired of karma fortunes by now.newman ought to be getting tired of karma fortunes by now.
 
newman's Avatar
 
Posts: 78
Karma: 252594
Join Date: May 2010
Device: Kindle DXi with 3.4.2 firmware, Kobo Glo HD
Well, frankly even for me it's hard to be sure what I've meant back than .

The point is to have proper /etc/fb.modes either by changing the one on Kindle so it's patchable by the patches in the firmware, or merging the patch and /etc/fb.modes on the Kindle manually and removing the fb.modes patch from the firmware update. I guess .
newman is offline   Reply With Quote
Old 01-24-2018, 02:16 AM   #313
sam.vanratt
Member
sam.vanratt began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2017
Device: Kindle DX (G)
Hi jipvankuijk
afaik the Amazon Store is more a problem of the missing TLS support bevore 3.4.2, but that's not the point here.
What fb.modes file do you have now?
You could use the old one (about 1,5kB in size), patch the right MD5 code into the inventory file of the updater (so he belives everything is fine, else it fails).
Updateing from 3.3 to 3.4 was the most work to patch it. You might have read some of my posts of the last month, but while you gain the TLS function (and therefor a working internet access you probably have to fix the higher RAM usage (via swap file) and in my case a crackling audio device and a fixed standby time (600secs). The registration at amazon could be regained by calling them and ask them to reintegrate it. They see your S/N and can add your device that from their site.
Cheers
Sam


Quote:
Originally Posted by jipvankuijk View Post
Hello guys,

I have been trying to update my Kindle DXG from 3.2.1 to 3.3 which worked out fine, and now 3.3 to 3.4 to then do 3.4 to 3.4.2.

I need these last few steps because 3.3 can no longer connect with the Amazon store etc. due to the SSL 3.0 thing.

I am however stuck on the following part: I don't know where to get the /etc/fb.modes file from and how to do this patching it bla bla.

The guide is very clear and well written except for this part!

I hope someone can help me

Right now I'm stuck with a useless device since I can't access the Amazon store.
sam.vanratt is offline   Reply With Quote
Old 02-02-2018, 01:16 AM   #314
e-ghost
Member
e-ghost began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Nov 2015
Device: Kindle DXF
I was using 3.2.1 and then fall back to official 2.5.8 before because I heard someone mentioned that using non-official higher version software may lose the ability to buy book from amazon. It has been year after that. may I ask if there is any affect to buy official ebook from amazon if the DXG is using 3.2.1 or 3.4.2 ?
e-ghost is offline   Reply With Quote
Old 02-02-2018, 06:26 AM   #315
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,894
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by e-ghost View Post
I was using 3.2.1 and then fall back to official 2.5.8 before because I heard someone mentioned that using non-official higher version software may lose the ability to buy book from amazon. It has been year after that. may I ask if there is any affect to buy official ebook from amazon if the DXG is using 3.2.1 or 3.4.2 ?
Amazon has updated older firmware because of a change to the security certificate. So it's very possible that you would lose the ability to buy eBooks using the DX. But you can still side load.

If you do go back, you'll lose the ability to read KF8 and have to go back to Mobi.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle DXG - firmware 3.3 resolution? SoNic67 Kindle Developer's Corner 9 12-23-2015 09:50 AM
Firmware Update Can't update my Kindle DXG to 2.5.8 pavlingm Amazon Kindle 1 02-18-2014 03:25 PM
Firmware Update Kindle DXg firmware 3.x aliabbasjp Amazon Kindle 3 04-09-2012 02:02 PM
is it possible to update the available RAM on the Kindle-DXG? max99 Amazon Kindle 2 09-01-2011 11:59 AM
Firmware Update DXG Firmware update? polbit Amazon Kindle 5 08-26-2010 06:45 PM


All times are GMT -4. The time now is 07:01 AM.


MobileRead.com is a privately owned, operated and funded community.