yashsingh1/xdaforums huggingface dataset:
[Motorola Milestone Android Development] heavony.ivory:
I have just update my phone (no nandroid & no wipes, I have full fate in kabaldan).

After reboot i set ZRAM to 26% (26% of what ? is it from the swap partition ?) then I reboot again (must say that 2nd reboot was very fast).

Must i have third party swap manager (like swapper 2) to benefit ZRAM ? or the new rom can manage the the swap memory on it's own ?

How long it's take till the phone enter to deep sleep ?

How can I see the actual size of ZRAM ?

Is fiscal ram always being use first ?

I bet this breakthrough extend our MS life cycle [thanks to kabaldan]
[Motorola Milestone Android Development] afadel:
26% of the RAM will be reserved for swap. The swapped data is first compressed and then allocated in the reserved RAM. So you have less "usable" RAM for applications, but higher total RAM considered the compressed data on the swap.

Compache (zram) works only by configuring in the Cyanogenmod configuration. Kernel will do the work on its own.

I guess this depends on apps running on startup. Mine didn't take more than 2min.

Open Terminal Emulator and type "free". The size in the "swap" line is the zram.

Yes. Only after available memory runs out it will start clearing stuff and sending to swap.
[Motorola Milestone Android Development] Eiertschik:
Just tried Swapper2 + 512MB swap partition (total overkill, I know) + zRAM OFF and it even runs Bad Piggies and Angry Birds Space now - and the launcher doesn't even die!

That's incredible.

I can't imagine how this kernel will boost up CM10 :fingers-crossed:
[Motorola Milestone Android Development] genziutek:
256MB SWAP and lot of games is now fine on our "stone" :p kabaldan.... god of Milestone :o Thanks a lot man!!!
[Motorola Milestone Android Development] Babis_ECE:
Guys a little help here if you can..! I fixed Google Play problem and tried to use swap.

I made a 512MB Linux Swap partition on my SD Card, how do I "enable" it so new CM7 can see it? I mean, what I should do now?

Thanks
[Motorola Milestone Android Development] Eiertschik:
Install Swapper2 from Play Store, start it, go to settings, advanced settings, check "use swap partition", leave settings, touch "ON", wait, ... SUCCESS
[Motorola Milestone Android Development] CeBits:
I never thought i'd see the day...

Well done. Kabaldan for chief of Motorola mobility.
[Motorola Milestone Android Development] enrsil1983:
What a nice surprise... today I'll update my stone.
[Motorola Milestone Android Development] Quentin himself:
Hi all,

As it's not mentioned that it's specific to CM7, but only discussed on this topic and as I know that OR isn't related in any way to the ROM, may we use SWAP for CM10?

Anyone try this?

Thanks in advance :)
[Motorola Milestone Android Development] mrvek:
Probably but you'll have to wait for a cm10 build with kabaldan's and Skrilax_CZ's (I think they are the only developers involved in making that kernel) custom kernel.
[Motorola Milestone Android Development] Erovia:
From the irc log:

[0:31] <nadlabak> I'm about to move with 2ndboot from CM7 to CM10 soon

kabaldan (nadlabak) said it 2 days ago.
[Motorola Milestone Android Development] _crAss_:
Patience...I believe it will be achieved very soon. I think that the only difficult thing currently is that the size of the update (CM10) is over the phone's limits and we have to delete stuff, so probably to save space for the second kernel etc more things will have to be deleted initially...Of course I may be wrong :)
[Motorola Milestone Android Development] Quentin himself:
Thanks for all your answer. Thought there is no difference between kernels because we couldn't change it between CM7 and CM10 (before 2nd-boot OR) or maybe was it a trick?

I'm not insane, I'm not asking Kabaldan to do it! But the fact is here: OR isn't linked to any ROM and we are actually just talking about 2nd boot on CM7 so I wonder if it's compatible. Anyway, I've my answer now :)

@_crAss_

I red somewhere that it's stored in data (I'm surely... not sure ^^), I will try to find this post ;)
[Motorola Milestone Android Development] m0jo:
I guess you didn't read the last few pages. The current CM7 (dev-) build already has 2nd Boot and a custom kernel.
[Motorola Milestone Android Development] Quentin himself:
I guess you didn't understand me, surely due to my bad english.

To sum up: I thought it was just an option in OR (2nd Boot + custom Kernel) and then, not linked to CM7 (like any other ROM). So I asked if it's compatible with CM10, and it seems to be NO because each ROM needs its own kernel (never thought that because we didn't change kernel (couldn't) when upgrading from CM7 to CM10).

EDIT: You were right, I just missed that Kabaldan release a special ROM (CM7 dev- build) with specific kernel. My bad.
[Motorola Milestone Android Development] CeBits:
Anyone experiencing choppy animations? Want to know if its just me or not. Its most noticeable on Screen On and Screen Off animations.
[Motorola Milestone Android Development] akantoch:
Yeah, i have noticed that, i thought that is because of my sd, it's 2 class
[Motorola Milestone Android Development] Quentin himself:
@_crAss_

Kabaldan said few days ago:

Please note that the kernel and other files are stored in /data/2ndboot, so you will need to reinstall the ROM if you do data wipe or it won't be able to boot.

SO I think it will not deal with the acceptable weight of CM10 nighlty.zip to boot.
[Motorola Milestone Android Development] enrsil1983:
Testing from some hours:

Phone is slower: animations and scrolling are choppier (in particular screen off), but it was expected. But launcher is harder to kill and huge apps works better now, expecially Amazon Apps, that load in less than half time.

I've found a bug that should be corrected: I've connected wall charger with phone turned off and the big battery charging icon doesn't appear anymore, instead runs the 2nd boot and automatically turned on, but without signal. Fly Mode icon was disabled.

After a reboot, no change.

Then I removed charger and turned off, then power on, at startup the signal was restored. Now my phone is charging, and is really choppy because it doesn't enter in sleep mode (checked with Spare Parts). I haven't background apps or services (facebook, whatsapp, gmail, gmaps ecc. are not even installed, data sync off, wifi off, no mobile data connection). I'm pretty sure that when I'll unplug the charger it will be OK.

Note that the charger I use (from more than a year) is a Samsung one, with direct MicroUSB output.

At next reboot logs will be enabled, I'll try to reproduce the issue and post them.
[Motorola Milestone Android Development] _crAss_:
I would say slower not choppy...I have only compcache enabled at 18%.
[Motorola Milestone Android Development] CeBits:
It turns out the problem was in the CPU governor. As soon as I changed it to performance it flies. Then i changed it back to interactive and its still good. Maybe a glitch.

EDit- Does anyone have recent quadrant screenshot? I need to compare something I am suspecting.
[Motorola Milestone Android Development] Eiertschik:
Choppy screen on/off animation here too.

But I doubt it's related to the sd card (mine's class 10).

Home screen transitions are a little choppy too...

I described this behaviour one or two pages ago - good to see it's reproduceable.

Not exactly a huge problem - but nasty (especially when the phone ran out of battery charge).

I replied to your post.

Did your phone enter deep sleep before testing?

That would explain your low CPU score.

... but not my low I/O... although... maybe swap is interfering... gotta test that.
[Motorola Milestone Android Development] -FuFu-:
1 more think is, that the "Time in State" is not working in SetCPU and the App CPU Spy also not working, i think the kernel dont create the Time In State file that needed for this apps...

but all other works fine here, at the moment i use a 128mb swap partition with vm.swappiness=15 (at the moment max used swap was 55mb)
[Motorola Milestone Android Development] MotoMileCm7:
I need to apply 2ndboot or just flash the rom?
[Motorola Milestone Android Development] mrvek:
That mentioned choppines and low performance might have something to do with "main issues" explained by kabaldan in his post
[Motorola Milestone Android Development] afadel:
Just flash it. If you're already running CM7 just wipe dalvik and cache. If not, wipe data also BEFORE applying the ROM.

Enviado de meu Milestone usando o Tapatalk 2
[Motorola Milestone Android Development] Eiertschik:
No special steps necessary.

Just apply the new .zip like any ROM-update.

You wouldn't even need to do any wipes, according to kabaldan.

Low (CPU) performance is most likely related to this "main issue".

Someone found out that switching CPU governors cures it without waiting for the device to enter deep sleep.

But the choppy transitions won't go away...

I just disabled screen on/off animation - ordinary fade in/out is as smooth as ever.
[Motorola Milestone Android Development] mrvek:
Switching governors didn't help in my case.
[Motorola Milestone Android Development] scoutme:
Did you let the phone enter deep suspend and switch back after boot? There's an explicit note by Kabaldan.
[Motorola Milestone Android Development] mrvek:
Yes ;) I was merely saying that swithing governors did not help to get rid of that sluggishnes.
[Motorola Milestone Android Development] CeBits:
Yes, in fact it was sleeping for 6 hours. When I switched to performance governor the choppines was gone, however its still there if i select Interactive.
[Motorola Milestone Android Development] Eiertschik:
I might have misinterpreted this :silly:
[Motorola Milestone Android Development] CeBits:
Yeah I was wrong. On performance its ok, on interactive its choppy.
[Motorola Milestone Android Development] mrvek:
Performance governor keeps your cpu at max frequency all the time. Generaly, it is not the best choice as it kill the battery and heats the cpu more.

Try to leave the phone unplugged (charger and usb), turn of the screen and wait for the phone to enter deep sleep state (after every boot, for now). That should help to get rid of it. When does the phone enter that state and how to verifiy it yourself I honestly do not know.
[Motorola Milestone Android Development] lucianoklos:
Battery problems

Dear heroes in using this phone,

Since when I flash 7.2.2 I'm noticing battery problemas.

This is not my main phone. I only use at work, without 3g.

In 7.2.1 the battery I was able to get 7 days with a single charge.

Now I'm only 1 day or less.

I check in better battery stats and I saw this:

No or unknown signal - all the time;

The phone go to deep sleep but it appears that this is consuming more battery.

Anyone have a clue how to solve this?

Thanks in advance.
[Motorola Milestone Android Development] afadel:
Check if the correct band is selected for the radio. Mine was reset after I updated to latest test version with custom kernel. Go to Settings->Device Settings->Baseband selection.

Enviado de meu Milestone usando o Tapatalk 2
[Motorola Milestone Android Development] lucianoklos:
I check that. By default its saying EMEA/APAC 2100/900.

I switched to Brazil (retail) 2100/1900/850 but the problem continue.

I'll wait another half a day to see the results...

Thanks for the answer.
[Motorola Milestone Android Development] LuigiC6:
I know this is probably useless without logs, but I'm running the latest unofficial with 2ndboot, and I usually charge my phone overnight. Last night I plugged it in, it was charged to 100% by the time I went to sleep. Woke up this morning and it was at 78% with no radio signal and my alarm didn't go off.

Excellent work with 2ndboot though, I'm very impressed that this was finally achieved and excited for whats to come. :)
[Motorola Milestone Android Development] Eiertschik:
Well... 512MB swap seems to be way too big... OOM doesn't kill anything anymore.

Swap usage topped 100MB and slowed everything down beyond usefullness.

I reduced swap partition size to 64MB - let's see...
[Motorola Milestone Android Development] scoutme:
OK.

Wait a secon... 7 days? What sort of use were you making of it? Airplane mode and black screen all the way? Describe it, just to let us figure it out what actually did change
[Motorola Milestone Android Development] oVeRdOsE.:
My mom has my old milestone with stock rom on it. The last time I checked the phone for market updates, it says 275 hours on battery and it was around 15%. (11 days).

The phone was ON, and on service ( no 3g) on bell network. She just leave it in her purse and makes/recieve no calls.

Then I put froyomod, it drops to 100 hours max, she was pissed. Then I put 7.2.1, and its back to normal. :)
[Motorola Milestone Android Development] scoutme:
Ok.. maybe new kernel at the moment doesn't let unused radio components shut down. That is expectable, since the main problem with second kernel boot is keeping radio modules working. Obviously this is pure speculation... Kabaldan will know better.

You should activate and post system log
[Motorola Milestone Android Development] Strokesws:
I'm with you, changed from 256MB Swap to 64MB. Seems to be faster.
[Motorola Milestone Android Development] alicheusz:
or you can simply change swappiness from default 60 to around 20 to reduce dumping memory to swap. Anything beyond 256 MB swap is useless
[Motorola Milestone Android Development] MotoMileCm7:
How can i get to 2ndboot menu ? or change the swap?
[Motorola Milestone Android Development] _crAss_:
I think that enabling scrolling cache seems to help with the slow animations.
[Motorola Milestone Android Development] Eiertschik:
Swappiness has been at 10 (default value) all the time - it worked for about a day - then it went nuts and didn't kill anything anymore.

Install Swapper2 from Play Store

I'm gonna try that
[Motorola Milestone Android Development] arttree:
total used free shared buffers
mem: 231168 222930 8208 0 340
-/+ 222620 8548
Swap: 23108 23108 0

this is what i get when i use "free" cmd in terminal. question,

what is this "231168" mean in size? 231168 byte? 231168 kb? or MB?
[Motorola Milestone Android Development] CeBits:
Its Kilo Bytes. You have a swap size of 23 megabytes (used).
[Motorola Milestone Android Development] Eiertschik:
This doesn't seem right...

No value under "total" and exactly the same number of kb in "used" AND "free"?
[Motorola Milestone Android Development] mrvek:
mem: 231168kB is your total available RAM. 222930kB is the amount of RAM used. 8208kB is free ram (8MB)

There is probably formatting issue with Swap row as it should display these values in total, used and free columns, respectively.

Swap: 23108kB is your total available swap (zRam) and is completely used. (You have set zRam to 10% in settings?)
[Motorola Milestone Android Development] arttree:
sorry guys, my bad. missed type.

actual result as below,

total used free shared buffers
mem: 231168 222930 8208 0 340
-/+ 222620 8548
Swap: 23108 23108 0

yup, i have set zRam to 10% in settings. Thank you guys! :good:

---------- Post added at 10:07 AM ---------- Previous post was at 10:01 AM ----------

zRam will eat into RAM. Is it better if we create a swap partition on microSD card and use Swapper2 to point the swap to that swap partition?

this free up RAM, but will bw slower as swap is on microSD card, right?
[Motorola Milestone Android Development] mrvek:
Maybe I misunderstood you but you typed manually? No need. Simply redirect output

command > /sdcard/file_name.txt

eg.

free > /sdcard/free.txt

free.txt will be in the root of your sdcard with the output of a given command
[Motorola Milestone Android Development] enrsil1983:
I've tried to create a 64MB swap file with Swapper2 in sdext partition (in app settings I put /sd-ext/swap.swp), but app is unable to create it.

Do I need a swap partition or I should change path? I don't want to use FAT32 or create another partition, if possible.

And must swapper2 remain open or is it killable after swap creation at boot? Because if I play "Bad Piggies" (for example) phone kills it
[Motorola Milestone Android Development] lucianoklos:
Yes. Its not my main phone. So its only 2g with no mobile data. A few wifi, and about 30 - 45 min of screen usage. So its no that big deal.

I switch back to 7.2.1 and battery its fine for now.

I think its a problem with radio, like someone said here. Thanks for making milestone usable until now. Motorola stock in this phone was awful.

Now that motorola is a new company i really like razr HD and razr i.
[Motorola Milestone Android Development] Strokesws:
It happens with me too.
[Motorola Milestone Android Development] Eiertschik:
My radio just locked up:

Still claiming to be in network (provider name visible) but no data throughput and after trying to enter flymode I wasn't able to leave it anymore due to inactive (grey) flymode menu entry.

I fetched these lines off dmesg - but I doubt they're of any use :(

<3>[82972.438781] ehci: suspend failed!
<6>[82972.454589] usb 1-3: new high speed USB device using ehci-omap and address 97
<3>[82972.470794] usb 1-3: device descriptor read/64, error -71
<3>[82972.596679] usb 1-3: device descriptor read/64, error -71
<6>[82972.704376] usb 1-3: new high speed USB device using ehci-omap and address 98
<3>[82972.725860] usb 1-3: device descriptor read/64, error -71
<3>[82972.852722] usb 1-3: device descriptor read/64, error -71
<6>[82972.961975] usb 1-3: new high speed USB device using ehci-omap and address 99
<3>[82973.008972] usb 1-3: device descriptor read/8, error -71
<3>[82973.154632] usb 1-3: device descriptor read/8, error -71

I'll turn on logger, in case it happens again
[Motorola Milestone Android Development] afadel:
I've being using Swapper with 128mb swap file on sdcard (no dedicated swap partition) on my Class 4 SD.

Now I switched to 18% Compcache and my impression is that it is faster. With swap I had multitasking working perfectly but sometimes the apps would hang for few seconds (from 2 to 15 seconds) I guess due to memory swapping.

I'll try some more with Compcache and then I'll try swap again with 32Mb of swap file which is the recommended size and closest match to the 41Mb of Compcache.

Did you guys try both methods? Which one do you prefer?
[Motorola Milestone Android Development] papadawgg:
I prefer the Swap method because it safes a lot of memory and if the partition is sized right (about 30mb, but depends of the random speed of the sd card) the system wont get that instable as you described. Zram has its advantages but compared to Swap, but my SD is fast enough to handle it. Zram creates a virtual and compressed Swap "partition" on your ramdisk and everytime the RAM is almost full, the system swapps the processes just as with normal Swap.

The advantage of this method is that the virtual Swap is a bit faster than the one in the SD card but its still slower than real RAM. What I dont like is that if the system has less real RAM, it gets full much faster so it leads it to swap more often, which has a negative influence on performance. With Swap on SD, RAM keeps its full capacity and gets extra memory because of the Swap partition.

But if you have a really slow SD card, like the standard one you got with the Milestone and as long as you dont set the value on 26% (my recommendation is 10%), it could be a more effective way to get a performance and overall memory increase.
[Motorola Milestone Android Development] LuigiC6:
Forgive my noob-ness with using swap, but how did you get swapper to work? Everytime I try to run it, it fails cause it can't create the file in my sd card (32gb class 10). Thanks!
[Motorola Milestone Android Development] Strokesws:
Then if you don't have a fast SD card the best choice is to disable swap and let just Zram in 10%?
[Motorola Milestone Android Development] kabaldan:
Saying "a bit faster" is misleading. RAM operations are several orders faster than SD card operations.

And LZO compression doesn't need much CPU power => time.

The compression ratio is usually between 2x to 3x, so when you create 60MB zram swap in memory, you're effectively expanding the ram by more than 60mb of additional space.
[Motorola Milestone Android Development] papadawgg:
@strokes

Well, I would create a small Swap partition, about 20 mb so that there couldnt be bigger processes stored in Swap. Only cache and smaller processes would be stored and your SD has less to do, so the system wouldnt be that laggy. In my opinion that would be more effective than Zram because youd have all your real RAM by yourself and the system wouldnt swap as often as with this method.

Which SD card do you have? Here you can see which card has the best random speed: forums.whirlpool.net.au/forum-replies.cfm?t=1582172

If you have the standard one that was with the phone, writing speed is propably about 0.1-0.4 mb/s. I tried to use swap (30-70 mb) on this SD and my phone got noticable slower. Good cards for Swap are e.g. from Sandisk 16 gb class 4, 6 and 32 gb class 2 whereas the last one is with almost 3mb/s the fastest one and about 25x faster than the standard SD.

@kabaldan

theoretically you might be right and the zRAM space might be a lot faster than a partition but its still much slower than real RAM and because of the loss of that real RAM the system swaps that often that its noticable for me, which is why I like Swap on SD more but at the end everyone has to find his own settings to achieve the best individual performance.

Good job with 2ndboot btw :D
[Motorola Milestone Android Development] afadel:
I'm using Swapper 2. I click the ON button and wait until it says All Done. Sometimes it says it failed to delete and create the swap file, but after it gets to All Done I go to Terminal and type free and the swap partition is always created. Did you check if it worked in terminal?

---------- Post added at 08:05 PM ---------- Previous post was at 07:59 PM ----------

Kabaldan, so I understand using Compcache would give better results. That's also what I saw in my case at least (with a slower SD card). I guess you're using zRam then, right? hehe

How would one decide how much zRam to allocate between 10%, 18% and 26%? What are the actual trade-off between the minimum and maximum. From your explanation I got the feeling that 26% would be the way to go.

Thanks for all your work! It's really exciting to still use our Milestones with all these improvements!

And yes, beer is on the way! ;) Cheers!
[Motorola Milestone Android Development] Strokesws:
@papadawgg

My SD card came with Milestone.

I agree that a large swap can cause performance problems, but I still confuse about zram. I can I turn on swap and zram?

Ex. : swap 20mb and zram 26%?
[Motorola Milestone Android Development] _crAss_:
The link is very good...I was looking to get a new card, but did not know which one to buy since the 4k mark is almost never published. The card I have now can easily do 21 MB/s read / 11 MB/s write (old toshiba 8 GB class 4) on the pc and those numbers are class 10 with today's standards , the 4k read is also very good at 3.5 MB/s but the 4k write is awfully slow at 0.018 MB/s.

---------- Post added at 08:16 PM ---------- Previous post was at 07:44 PM ----------

I have also read a lot of posts and articles on the net, which made me feel even more confused.

If you enable both, you can see a total number of swap memory. I could not find any information on the priority? Is zram getting filled up first and then the card swap? Is zram decompressed to the card and then back to the uncompressed ram when needed?

Well as far as CM7 is concerned compcache at 18% percent is more than enough.

We will have to see what happens when swap is enabled for CM10 where things are very tight concerning memory. There compcache might not be enough and swap on card might be needed. We will certainly experiment with combinations of compcache and card swap.
[Motorola Milestone Android Development] Eiertschik:
Well, compcache alone isn't enough to play Bad Piggies - so I'll stick with compcache off and 64MB swap partition :)