[ROM][28 August] Virtuous Infinity 1.35.0 Is Out! [FULL Sense 4+Working Camera!] - G2 and Desire Z Android Development

Note: I am not a developer. I am merely informing the community about this rom. I take no credit for this rom. All credits for this rom go to the Virtuous Team for such an amazing rom I will post updates as the rom gets updated
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Virtuous Infinity
We are pleased to announce the first release of Virtuous Infinity.This ROM is the first ever which brings the full Sense 4 experience to your favorite WVGA device.Thanks to great effort of our M10 team (including Cypis, Diamondback and Flemmard) we finally cracked the new m10 format to bring you the lastest HTC software!It is based on the 1.11.401.110 release RUU of VilleC2. We would like to give special thanks to Football for the RUU.This build currently is a X-Series release, however, it is suitable for use as a daily driver if you can live with a few minor bugs.We hope to have the ROM feature complete as soon possible. Check bellow for a full list of what is working and what is not.
Primo is the result of a collaborative, team effort by the following developers:
Flemmard
Diamondback
rmk
chrisch
mdj
seo
eViL_Dee
cypis
cjward
tbalden
Features
Based on the VilleC2 ROM (1.11.401.110).
"Full" Sense 4 resized for WVGA resolution
Tweaks app build with latest HTC SDK 15
Fully Deodexed
Ported for almost full functionality on all of supported devices
Heavily optimized for fluid performance and usability.
Market-sourced applications (Gmail, Maps, Voice, etc) automatically installed on first boot into /data/app for easy removal.
Bloatware and unnecessary applications removed.
Working
Camera
HW Acceleration
WiFi
Bluetooth
Mobile Data, SMS, MMS & Voice Calls
GPS
Sensors
Audio
USB Storgage (No 3rd Party App Required)
FM Radio
Not Working
Rosie: Folder isn't perfectly resized in landscape
Rosie: Mail widget is force closing
Weather: Weather animation in landscape mode broken
Weather :Full screen weather animation broken
Camera: Not all effects are working
You tell us
Screenshots:
Devices Supported:
Desire Z / G2
Desire HD
Inspire 4G
My Touch 4G
Desire S
Incredible S
My Touch 4G Slide
Incredible 2
Credits and Acknowledgements
Virtuous Team - For an amazing rom
Bangincrazy – For testing on MT4G
lowveld – For pointing us in the right direction to fix WiFi
Football – For the RUU
xvicdice – For music playback fix
Download Link:Bug Tracker​

Since you made a link here I'll go ahead and attach some stuff.
Wifi, Data, Music Player working.
Camera works rather nicely in both default app and third party apps (instagram etc)
Attached are some screen shot with the default camera app, actually doing special effects smoothly in live preview.
It's a bit slow, especially if you're multitasking, but I'm impressed with how far they got with the camera.
When initially setting up, the setup stage can seem painfully slow (i.e.: on screen keyboard taking a sec or two to register a key, or the next/confirm dialog taking just as long).
Also wake by trackpad doesn't work even though the option is there.
The power menu requires a longer than normal long-press to activate (noticed this when getting the screenshots).
Also Infinity appears to install some apps to the SD Card via it's own custom folder (screen shot also attached).
by the way in terms of 'not all effects', I haven't come across a single effect on the list of effects that didn't seem to crash (maybe not rendered, but didn't die either).

I've switched back to EliteMod in the meantime (normal working hours have approached), I haven't had much time to test extensively how multitasking behaves (i.e.: Facebook, twitter, etc) or any graphical type of games etc.
The free ram at just bout any time is around 10MB, and uptime showing loads around 5.0 on average. The launcher can lag a bit on redraw even if you got the device clocked to 1400mhz (I believe it's more a ram issue than anything, so between supercharger V6 and swap, it might be bearable.)
---------- Post added at 08:07 AM ---------- Previous post was at 08:05 AM ----------
Oh also adb connectivity is somewhat glitchy. Devices never showed up during the initial boot, and had to mess with the power menu a couple of times (between charge only, HTC sync, and disk) to get it to show up and be able to do stuff with adb shell. Switching between various USB modes tends to be laggy.
Though one nice thing about the preview is that I did not receive a single force close or crash, just lags, and some functionality not occurring at all (i.e.: trackpad wake, FM radio).

Desire HD (ace), Desire Z (vision), Inspire 4G bugs
When phone goes into sleep you need to make a long press of the power button to wake it up
Mic doesn't work in some apps like Voice Search, Soundhound, ...
Camera isn't working on some phones
Camcorder only works with disabling sound in the video settings

I have a funny feeling it's going to turn into a bit of a 'can you port Sense Camera to XXX ICS Rom?', when it was the other way around.

FM Radio appears to be broken on both the included FM app, and the FM Radio Widget.
Though fine with SpiritFM Free Edition (which of course requests root permission).
Also the stock FM Radio app, seems to never turn off, it's always "Turning Off", and when the dialog does go away, it's still "On" (showing the icon in the status bar)

How's video recording, 720p?
The above mention of 10MB of free RAM is scaring me away from trying it though. Hell with CM7 as soon as it hits 70MB's, I feel like its lagging too much.

Tried some games with this, with supercharger, swap and 1.4ghz o/c:
Temple Run: Without swap it closes immediately, with swap its getting huge lags while playing, but when theres no lags its smoother then previous kernels.
Death Rally: Smooth as s..t.
Helicopter 3D: Smooth as f..k.
these games rather heavy considering their 3d natures. so its a good thing that this rom can run them smoothly.
generally speaking, if you make this your dd, it will drive you crazy time to time because the interface is slower then most of the roms out there. hope it will get better tho.
edit: with swap and supercharge i get 100-120 mb free ram ( at least it shows that way on the task manager)

boost3d23 said:
How's video recording, 720p?
The above mention of 10MB of free RAM is scaring me away from trying it though. Hell with CM7 as soon as it hits 70MB's, I feel like its lagging too much.
Click to expand...
Click to collapse
I find this pretty common of just about every ICS rom though (mostly cached it would seem). i.e.: free ram is wasted ram.
I'll try out the video soon as TiB does some app restores (I kind of doubt it's full 720, but maybe it'll surprise me).
---------- Post added at 10:15 AM ---------- Previous post was at 10:13 AM ----------
By the way home screen lag ain't so bad once you replace HTC Sense with the Apex Launcher (though I guess some people want the whole experience )
---------- Post added at 10:24 AM ---------- Previous post was at 10:15 AM ----------
720p is Selectable (though 1080p is also shown, obviously won't record at that though), however when you finish recording and had audio turned on, it's the forever-saving-video issue.
With audio off... did saving video for a while, and then force closed, and also a very funky buffer issue (like the screen split in half and scrolled up while recording.
The result from both are files with thumbnails with exclamation marks.
Now if I set the Video quality to 800x480 Wide (default), and audio off, it saves fine.

I respect your work.I'm about to try.

Can't even get it working it lag badly after the setup and hot reboot more than 6 times =\ anyway,good job to them as they get the camera working make me looking forward for updates XD
Sent from my Desire Z using xda app-developers app

Steven How said:
Can't even get it working it lag badly after the setup and hot reboot more than 6 times =\
Sent from my Desire Z using xda app-developers app
Click to expand...
Click to collapse
Would help if your hboot/radio/etc info was in your signature

kbeezie said:
Would help if your hboot/radio/etc info was in your signature
Click to expand...
Click to collapse
Ah...I forget abt radio and all those... does it effect the performance? And I'm using a Italian dz not g2
Sent from my Desire Z using xda app-developers app

Steven How said:
Ah...I forget abt radio and all those... does it effect the performance? And I'm using a Italian dz not g2
Sent from my Desire Z using xda app-developers app
Click to expand...
Click to collapse
As long as it's a DZ hboot it should be fine (i.e.: because the G2 hboot only has a ~400MB /system which is way too small, as this preview takes up about 96% of /system on DZ hboot).
Also depending on what rom you're coming from (i.e.: /system, etc may still be formatted as ext3 instead of ext4).
And far as radio... I don't know if this requires 26.13.04.19 or equivalent.
I guess if you can attempt a logcat output, might be helpful to someone who knows how to read those things.

kbeezie said:
As long as it's a DZ hboot it should be fine (i.e.: because the G2 hboot only has a ~400MB /system which is way too small, as this preview takes up about 96% of /system on DZ hboot).
Also depending on what rom you're coming from (i.e.: /system, etc may still be formatted as ext3 instead of ext4).
And far as radio... I don't know if this requires 26.13.04.19 or equivalent.
I guess if you can attempt a logcat output, might be helpful to someone who knows how to read those things.
Click to expand...
Click to collapse
I'm using 4ext recovery and I only left 20mb in my system space..I have restore back to ARHD 6.3.3.. until infinity become more rock stable perhaps? hope so
Sent from my Desire Z using xda app-developers app

Steven How said:
I'm using 4ext recovery and I only left 20mb in my system space..I have restore back to ARHD 6.3.3.. until infinity become more rock stable perhaps? hope so
Sent from my Desire Z using xda app-developers app
Click to expand...
Click to collapse
Hence why it NEEDs the DZ hboot
it is an alpha/preview
I enabled swap with this script http://dl.dropbox.com/u/1169731/swap_enabler.sh (ie: pop it on /data/local/tmp, chmod 775 , run it, reboot). So will see how SD-swap helps it.

I would remove some unesacary apps from the Rom to free up space
Sent from my HTC Sensation 4G using xda premium

I DO know how to enable swap lol, but it still lag badly.. after opening an app it hang there and finally reboot...lol I understand it's an alpha build so I'm not that demanding for the best performance for now
Sent from my Desire Z using xda app-developers app

evilcuber said:
I would remove some unesacary apps from the Rom to free up space
Sent from my HTC Sensation 4G using xda premium
Click to expand...
Click to collapse
Seems kind of pointless since the /system partition isn't normally going to change after installation. So removing those apps from /system doesn't really give you much benefits in 'freeing up space'. If it were on /data/app that'd be a different story, but it's pretty light in that department upon start.
Now you *could* disable some system apps (if it won't break anything) to improve some degree of performance, but then again what would be the point of testing/previewing if you didn't take it as is.
---------- Post added at 11:26 AM ---------- Previous post was at 11:15 AM ----------
So with 128MB swap on, overall it does seem smoother. However for any *new* item, there can be occasional freezes for a few seconds, in which time I'll notice the swap usage (via adb shell) will jump 20-30MB at a time, eventually once the phone has unfrozen it'll be quite smooth after that. In the last 3 freezes I've jumped from about 30MB to 60MB to 96MB.
Right now it's down to 87MB after about a minute since the last freeze (added a power widget to the desktop, taped the brightness, froze for about 15-20 seconds, changed the brightness, was smooth after that).
Also I'm not using the launcher that came with it, but rather Apex Pro and fancy widgets.
current memory usage, uptime and top:
Code:
[email protected]:/ # free
total used free shared buffers
Mem: 370420 360300 10120 0 600
-/+ buffers: 359700 10720
Swap: 131580 88232 43348
[email protected]:/ # uptime
15:25:04 up 34 min, load average: 2.69, 3.22, 3.40
Code:
Mem: 360772K used, 9648K free, 0K shrd, 1020K buff, 57144K cached
CPU0: 5.7% usr 5.7% sys 0.0% nic 88.4% idle 0.0% io 0.0% irq 0.0% sirq
Load average: 2.18 2.93 3.29 2/680 8348
PID PPID USER STAT VSZ %MEM CPU %CPU COMMAND
316 104 1000 S 425m117.2 0 2.3 com.android.systemui
209 104 1000 S 403m111.3 0 1.1 system_server
7173 104 10148 S 378m104.5 0 0.0 com.facebook.katana
421 104 10165 S 373m103.0 0 0.0 com.anddoes.launcher
467 104 10141 S 372m102.7 0 0.0 com.htc.idlescreen.shortcut
513 104 10018 S 351m 97.0 0 0.0 android.process.acore
3783 104 10017 S 334m 92.2 0 1.1 com.google.process.gapps
501 104 1001 S 329m 91.0 0 2.3 com.android.phone
760 104 9999 S 322m 89.0 0 0.0 com.htc.launcher
7847 104 1000 S 313m 86.4 0 0.0 com.android.settings:remote
1323 104 10018 S 310m 85.6 0 0.0 com.android.htccontacts
482 104 10163 S 310m 85.5 0 0.0 com.touchtype.swiftkey
7394 104 10106 S 309m 85.3 0 0.0 com.android.mms
7882 104 10017 S 301m 83.0 0 0.0 com.google.android.gsf.login
8235 104 10014 S 301m 83.0 0 0.0 com.htc.calendar
8192 104 10014 S 301m 83.0 0 0.0 com.htc.bg
8163 104 9996 S 300m 82.9 0 0.0 com.htc.notes
7862 104 10153 S 300m 82.8 0 0.0 com.google.android.googlequicksear
8214 104 10146 S 300m 82.7 0 0.0 com.dropbox.android
5568 104 10162 S 298m 82.3 0 0.0 com.mhuang.overclocking.ProfilesSe

kbeezie said:
Seems kind of pointless since the /system partition isn't normally going to change after installation. So removing those apps from /system doesn't really give you much benefits in 'freeing up space'. If it were on /data/app that'd be a different story, but it's pretty light in that department upon start.
Now you *could* disable some system apps (if it won't break anything) to improve some degree of performance, but then again what would be the point of testing/previewing if you didn't take it as is.
---------- Post added at 11:26 AM ---------- Previous post was at 11:15 AM ----------
So with 128MB swap on, overall it does seem smoother. However for any *new* item, there can be occasional freezes for a few seconds, in which time I'll notice the swap usage (via adb shell) will jump 20-30MB at a time, eventually once the phone has unfrozen it'll be quite smooth after that. In the last 3 freezes I've jumped from about 30MB to 60MB to 96MB.
Right now it's down to 87MB after about a minute since the last freeze (added a power widget to the desktop, taped the brightness, froze for about 15-20 seconds, changed the brightness, was smooth after that).
Also I'm not using the launcher that came with it, but rather Apex Pro and fancy widgets.
current memory usage, uptime and top:
Code:
[email protected]:/ # free
total used free shared buffers
Mem: 370420 360300 10120 0 600
-/+ buffers: 359700 10720
Swap: 131580 88232 43348
[email protected]:/ # uptime
15:25:04 up 34 min, load average: 2.69, 3.22, 3.40
Code:
Mem: 360772K used, 9648K free, 0K shrd, 1020K buff, 57144K cached
CPU0: 5.7% usr 5.7% sys 0.0% nic 88.4% idle 0.0% io 0.0% irq 0.0% sirq
Load average: 2.18 2.93 3.29 2/680 8348
PID PPID USER STAT VSZ %MEM CPU %CPU COMMAND
316 104 1000 S 425m117.2 0 2.3 com.android.systemui
209 104 1000 S 403m111.3 0 1.1 system_server
7173 104 10148 S 378m104.5 0 0.0 com.facebook.katana
421 104 10165 S 373m103.0 0 0.0 com.anddoes.launcher
467 104 10141 S 372m102.7 0 0.0 com.htc.idlescreen.shortcut
513 104 10018 S 351m 97.0 0 0.0 android.process.acore
3783 104 10017 S 334m 92.2 0 1.1 com.google.process.gapps
501 104 1001 S 329m 91.0 0 2.3 com.android.phone
760 104 9999 S 322m 89.0 0 0.0 com.htc.launcher
7847 104 1000 S 313m 86.4 0 0.0 com.android.settings:remote
1323 104 10018 S 310m 85.6 0 0.0 com.android.htccontacts
482 104 10163 S 310m 85.5 0 0.0 com.touchtype.swiftkey
7394 104 10106 S 309m 85.3 0 0.0 com.android.mms
7882 104 10017 S 301m 83.0 0 0.0 com.google.android.gsf.login
8235 104 10014 S 301m 83.0 0 0.0 com.htc.calendar
8192 104 10014 S 301m 83.0 0 0.0 com.htc.bg
8163 104 9996 S 300m 82.9 0 0.0 com.htc.notes
7862 104 10153 S 300m 82.8 0 0.0 com.google.android.googlequicksear
8214 104 10146 S 300m 82.7 0 0.0 com.dropbox.android
5568 104 10162 S 298m 82.3 0 0.0 com.mhuang.overclocking.ProfilesSe
Click to expand...
Click to collapse
This rom didn't come with virtuous oc?
Sent from my Desire Z using xda app-developers app

Related

[Q] HTC Desire Lags alot,any Fix?

Hi,for the past two weeks,i discovered my HTC desire (unrooted,unbranded and unlocked,on froyo) has been laging like crazy not just web browsing but the entire OS.for example,the smooth transition between each screen (Home screen and the rest) is gone.Also,accessing menus and apps tend to lag, basically everything.You can easily tell that the device is definitely buggy.
Could anyone please recommend a fix different from hard/factory reset?As I've put so much work into device i.e. customizing screens,sorting out apps,and most importantly getting all my email accounts functioning.
It would be a big shame if I have to do a complete factory reset and if that's the only solution for now,will a future software update resolve this issue (lags)? And if i decide to go ahead with the hard reset,will the device let me do automatic backup of the following details:
* Text and multimedia messages
* Settings in the Messages application
* Web bookmarks
* Keyboard dictionary
* Settings in your phone that fall under these categories:
o Wireless & networks
o Sound & display
o Location
o Applications
o Date & time
o Language & keyboard - only the Locale setting
Thanks
what have you done to it?!?!
since day 1, I had loads of apps, no lag, loads of music, movies, pictures etc.. no lag. now, counting.. counted.. 48 rows x 4 columns of apps.. = 192 apps including all the sense ones.. still NO LAG! do a factory reste and see if that works, if not, try flashing a different ROM laterz.
Are you using a task killer?
Invisible Elf said:
Are you using a task killer?
Click to expand...
Click to collapse
I used one called Advanced Task pro but uninstalled it immediately as soon as I found out 'task killers' are more damaging .
Sent from my Archos5 using XDA App
Im underclocking my desire to 700mhz and even then, the only time it lags is the first few minutes after boot....
Sent from my HTC Desire using Tapatalk
Checked RAM usage?
Hi nasimdejai!
I have a similar problem after a day or two, when I have often browsed the web, searched for something and watched youtube vids in browser.
Is the problem after a reboot gone?
Have you checked if you are running out of mem? (Install e.g. Temp+CPU V2 from market and put the widget on your homescreen)
Because in my case, there are running a few instances of the android browser which are eating up my mem and don't get killed by the process managment.
To check this, install Terminal emulator and type in ps.
When there are more processes like com.android.browser or FP_DoPlay you have the same issue like I do. (see attachments)
I kill the unwanted/older instances with the command kill 5920 (PID number from process, see 1st attachment).
You can easily tell that the device is definitely buggy.
Click to expand...
Click to collapse
There is no "Galaxy S lag" type problem/bug that affects all Desires, so I think it is your configuration/setup, not the device itself per se!
My advice to you would be to take a Nandroid backup and then factory reset, so see if this "cures" your problem. If it does, chances are you have a rogue app that is causing your problems rather than a "system" setting, so you then have two realistic options.
1. Restore your Nandroid backup and start de-installing applications until performance becomes acceptable again. If you have something like Titanium Backup, you can always backup the app+data you wish to de-install, so that you can bring it back again easily if you require.
2. Start setting your device up from scratch again.
Note that if your phone is not rooted, you won't be able to make a Nandroid backup anyway, so you'll be left with option 2 only!
Regards,
Dave
hi floyd0815,thanks for the suggestions.I've got this app that displays memory (RAM) each time i use the device for any task be it browsing,youtube vids.And I could tell that some of these tasks do eat up memory but after completing said tasks,i immediately go into the "manage application" setting,clear the cache for each process/app used and then the RAM usually goes back to the previous size.Presently i've got 71MB of RAM and execution of processes/applications usually shaves 2MB or 3MB at most,off the current memory size.Alot of people tend to have way less RAM on their devices and still have fully function phones without lags.The reason for me being a bit worried.I'll either wait for the rumoured december update or do a factory reset if the problem persists.I'll try downloading Terminal emulator.Cheers
71MB of RAM????????? My Desire usually had 200MB of ram free before i rooted! Use a task Killer. Its nessecary. those things that tell you they are not are not always true. Get a good task killer like quick process killer or such. that should solve your problem.
Hi nasimdejai!
After a fresh boot, I have got about 120mb of free mem with the browser opened, but after 1-2 days it's going down to 70-40mb and stays there. Then it's sluggish. (e.g. FolderOrganizer onscreen-folder links open slowly,...) There I first started to clean the caches and logs, but that gave only a few mb's and the system stayed slow. Then I have seen those multiple browsers in the terminal.
I don't understand, why the android-process-managment doesn't kill the old browser instances but other processes that provide widgets?!
When I kill that old instances, I have up to 160mb+ of free RAM and the system is snappy again.
Do you have Astro (file manager) installed? If so, you can open it and press menu -> Tools -> Process manger -> Processes and look for FP_DoPlay (thats the browser). There it's shown how much RAM those processes need. (look at my 1st posts 2nd attachment)
Keep me updated about your Terminal emulator result! (ps)
P.S.: I don't use a task killer for killing running processes, only if something has crashed or as list of running apps.
shockem said:
Its nessecary. those things that tell you they are not are not always true. Get a good task killer like quick process killer or such. that should solve your problem.
Click to expand...
Click to collapse
Not again!
No task killers are *not* necessary. Some people perceive some benefit from using them, but in general as long as you don't have an errant app they are most certainly not necessary!
Also - the amount of free memory you have is not an good indicator of performance! Remember than by default Android does not "swap" and just because memory is being consumed doesn't mean that CPU cycles are.
If anything, freeing up memory by killing processes can actually slow the system down because the process might not be consuming any CPU cycles but may well be required later and so keeping it in memory will actually allow it to resume far quicker than it would do otherwise.
Regards,
Dave
Hi Dave!
I am not a killer too! ;-)
But my system gets really slow after a while. (1-2 days, depending on how often I use the browser)
Before I have seen the multiple browser instances, I tried to make it faster by clearing caches and logs with no big change.
I know "the amount of free memory you have is not a good indicator of performance" but it was the only thing I noticed when the system was getting sluggish.
And as you can see in the attachments of my 1st post here, the android browser needs A LOT OF RAM (4 instances: 150mb+) and doesn't get killed by the android process managment.
PLEASE type in a terminal ps > /sdcard/ps.txt to save the output onto your sd-card and then post it here, so we can see if your system does the same! (your desire should have been runing for a while)
THX in advance!
My ps attached. Note that I hadn't used the browser this morning (last time was last night), so I started it and opened all 4 windows to different sites before running ps.
It definitely sounds to me like the Android memory management is not running correctly on your device - have you done anything to it, or set up swap etc?
Regards,
Dave
@Dave
THX for the quick response!
In your system are 2 running browser processes (and some FP_DoPlay = flash?), which could be normal, but one of them (PID 4734) is old and maybe should have been closed by the system.
Would be nice to check later again, when a task manager tells you, that there is no running browser.
And no, I haven't done anything to the memory management or something else.
Leedroid 2.2d + sdfix kernel + bright silence theme
Radio ***09.05.30_2
This also happend on PinkyROM, after that I did a full wipe.
THX
EDIT: In /system/etc/sysctl.conf is standing "vm.swappines=1", so on my system is swapping enabled?!
floyd0815 said:
n your system are 2 running browser processes (and some FP_DoPlay = flash?), which could be normal, but one of them (PID 4734) is old and maybe should have been closed by the system.
Click to expand...
Click to collapse
I wouldn't expect the system to kill a process just because it is old if there is sufficient memory available.
EDIT: In /system/etc/sysctl.conf is standing "vm.swappines=1", so on my system is swapping enabled?!
Click to expand...
Click to collapse
Have you partitioned your SD card with a swap partition?
Regards,
Dave
I wouldn't expect the system to kill a process just because it is old if there is sufficient memory available.
Click to expand...
Click to collapse
Thats true and I don't know if your sys is running out of mem, but in my case, android should close those processes. (only ~40mb left)
I also read, that the "vm.oom_kill_allocating_task=1" in the sysctl.conf means, android kills the processes with the highest mem usage, but it doesn't! (in my case)
And I haven't made a swap partition or customized the sysctl.conf. (stock from LeeDroid 2.2d) Just read, that ...swappines=1 doesn't take an effect if you haven't got swap.
But now I changed "vm.oom_kill_allocating_task=0" and rebooted.
Lets see what happens!
floyd0815 said:
Thats true and I don't know if your sys is running out of mem, but in my case, android should close those processes. (only ~40mb left)
Click to expand...
Click to collapse
40mb left is nowhere near running low on resources IMO - killing at 40mb free is just a waste of 40mb memory.
And I haven't made a swap partition or customized the sysctl.conf. (stock from LeeDroid 2.2d) Just read, that ...swappines=1 doesn't take an effect if you haven't got swap.
Click to expand...
Click to collapse
I don't have a sysctl.conf file at all, so "stock" isn't always stock!
Regards,
Dave
T
foxmeister said:
40mb left is nowhere near running low on resources IMO - killing at 40mb free is just a waste of 40mb memory.
Click to expand...
Click to collapse
But I see the android process manager working to free RAM, kicking out apps but not the browser, which is huge?! With the sysctl.conf "vm.oom_kill_allocating_task=1"?!
I don't understand that and I don't care anymore.
I make me a script like:
Code:
#!/bin/sh
ps|grep com.android.browser|grep -v grep|awk '{print $1}'|xargs -r kill
exit
und Pasta!
I have the same problem, but i can't kill browsers through terminal emulator. Nothing happens when I enter kill *pid*
And fp_doplay isn't listed there it is listed in astro with 78mb! But i can't kill it there.
My terminal emulator ps after browser closing:
export PATH=/data/local/bin:$PATH
$ $ps
PID USER TIME COMMAND
1 0 0:03 /init
2 0 0:00 [kthreadd]
3 0 0:22 [ksoftirqd/0]
4 0 0:24 [events/0]
5 0 0:00 [khelper]
6 0 0:00 [ksmartass_up/0]
7 0 0:05 [ksmartass_down/]
8 0 0:00 [async/mgr]
9 0 50:24 [suspend]
10 0 0:00 [sync_supers]
11 0 0:01 [bdi-default]
12 0 0:01 [kblockd/0]
13 0 0:02 [kmmcd]
14 0 0:00 [bluetooth]
15 0 0:01 [smd_tty]
16 0 0:00 [qmi]
17 0 0:00 [rpcrouter]
18 0 0:00 [krpcserversd]
19 0 0:00 [microp_work_q]
20 0 0:00 [detection/0]
21 0 0:00 [button/0]
22 0 0:00 [detect/0]
23 0 0:00 [button/0]
24 0 0:06 [kswapd0]
25 0 0:00 [aio/0]
26 0 0:00 [kslowd000]
27 0 0:00 [kslowd001]
28 0 0:00 [crypto/0]
41 0 0:59 [panel_on/0]
42 0 0:00 [msm_serial_hs]
43 0 0:00 [mtdblockd]
50 0 0:00 [msm_hsusb]
51 0 0:00 [usb_mass_storag]
52 0 0:00 [gs_tty]
53 0 4:37 [synaptics_wq]
54 0 0:00 [proximity_wq]
55 0 0:01 [ls_wq/0]
56 0 0:03 [curcial_wq]
57 0 0:00 [w1_bus_master1]
58 0 0:00 [kstriped]
59 0 0:00 [kondemand/0]
60 0 0:00 [kconservative/0]
61 0 0:00 [kinteractive_up]
62 0 0:00 [knteractive_dow]
63 0 0:00 [binder]
64 0 0:00 [krfcommd]
65 0 3:33 [ds2784-battery.]
66 0 2:59 [mmcqd]
85 0 0:00 [kjournald]
129 1000 0:04 /system/bin/servicemanager
130 0 0:04 /system/bin/vold
131 0 0:04 /system/bin/netd
133 1001 0:33 /system/bin/rild
136 1002 0:01 /system/bin/dbus-daemon --syst
137 0 0:01 /system/bin/installd
138 1017 0:01 /system/bin/keystore /data/mis
139 0 0:01 /system/bin/ipd
140 1008 3:40 /system/bin/akmd
391 0 0:06 [loop0]
393 0 0:00 [kdmflush]
407 0 0:00 [kcryptd_io]
408 0 0:47 [kcryptd]
891 0 0:00 [loop1]
892 0 0:00 [kdmflush]
893 0 0:00 [kcryptd_io]
894 0 0:03 [kcryptd]
897 0 0:00 [loop2]
898 0 0:00 [kdmflush]
899 0 0:00 [kcryptd_io]
900 0 0:00 [kcryptd]
901 0 0:00 [loop3]
902 0 0:00 [kdmflush]
903 0 0:00 [kcryptd_io]
904 0 0:00 [kcryptd]
905 0 0:00 [loop4]
906 0 0:00 [kdmflush]
907 0 0:00 [kcryptd_io]
908 0 0:06 [kcryptd]
923 0 0:04 [loop6]
924 0 0:00 [kdmflush]
925 0 0:00 [kcryptd_io]
926 0 0:31 [kcryptd]
4864 0 0:00 [loop5]
4865 0 0:00 [kdmflush]
4866 0 0:00 [kcryptd_io]
4867 0 0:03 [kcryptd]
5370 0 0:00 /system/bin/debuggerd
10069 10007 0:00 com.android.browser
10074 10007 0:00 com.android.browser
11135 10014 0:36 com.htc.android.htcime
11142 10024 0:26 com.google.process.gapps
11489 10049 0:00 com.android.mms
12799 10005 0:06 com.android.htccontacts
15240 9999 0:31 com.htc.launcher
15403 10105 1:21 com.zomut.watchdoglite
15759 10010 0:07 com.htc.bgp
15988 10010 0:11 com.htc.bg
16748 10121 0:00 com.handyapps.easymoney
16769 0 0:00 [flush-179:0]
16906 10040 0:00 com.esmertec.android.jbed
16932 0 0:00 [iscan_sysioc]
16933 0 0:00 [dhcp_sysioc]
16934 0 0:00 [dhd_watchdog]
16935 0 0:00 [dhd_dpc]
16936 0 0:00 [dhd_sysioc]
16937 1007 0:00 /system/bin/logwrapper /system
16939 1010 0:00 /system/bin/wpa_supplicant -Dw
16955 1014 0:00 /system/bin/dhcpcd -ABKL eth0
17048 10088 0:00 org.peterbaldwin.client.androi
17079 10123 0:02 com.google.code.appsorganizer
17090 10067 0:02 com.android.vending
17110 10121 0:00 com.handyapps.easymoney:remote
17119 10096 0:08 com.thedeck.android.app
17136 0 0:00 [flush-31:0]
17147 10076 0:01 com.google.android.googlequick
17175 10039 0:00 com.htc.WeatherWallpaper
17198 10093 0:00 jackpal.androidterm
17205 10093 0:00 /system/bin/sh -
17210 10131 0:02 com.estrongs.android.taskmanag
17228 10093 0:00 /system/bin/sh -
17231 10093 0:00 ps
22931 1013 2:49 /system/bin/mediaserver
22932 0 0:16 zygote /bin/app_process -Xzygo
22937 1000 80:34 system_server
23034 1001 5:06 com.android.phone
23043 10085 0:25 sg.ruqqq.quickdesk
24864 10005 3:22 android.process.acore
27354 10007 0:00 com.android.browser
$
Hi Vukis!
Seems that we are the only ones having this problem, maybe because others are flashing/restarting there Desire daily so they don't have/get it.
Try:
Code:
su
kill -9 10069
kill -9 10074
...
It's an aggresive killing, but the only way I know to get rid of these "zombies".
Regards,
Floyd

[Q] Starts to lag, system_server near 100%

It seems like once a day, my phone will become super sluggish, to the point of no longer being usable. A simple reboot will clear up the problem, but there seems to be a larger issue as this is happening every day.
ROM - Myn's Warm 2.2 RL2
Kernel - Ziggy's 10/26
Code:
# top -m 5 -n 1
User 92%, System 7%, IOW 0%, IRQ 0%
User 278 + Nice 0 + Sys 23 + Idle 0 + IOW 0 + IRQ 0 + SIRQ 0 = 301
PID CPU% S #THR VSS RSS PCY UID Name
106 98% S 67 303536K 50328K fg system system_server
76 2% S 3 2764K 304K fg compass /system/bin/akmd
21278 1% R 1 940K 416K fg root top
5 0% S 1 0K 0K fg root events/0
21238 0% S 10 165336K 20484K fg app_124 jackpal.androidterm
Is this just an issue of needing to find a new kernel or rom? I am just not sure where to start looking for the culprit.
Thanks
I was having that issue as well and even sluggishness as well when touching the screen. I ended up reading about other people having that issue on his thread with his rom so check there. Might have to do alot of reading though. But I ended up leaving and going back to Baked Snack 1.9
Globetrahter said:
I was having that issue as well and even sluggishness as well when touching the screen. I ended up reading about other people having that issue on his thread with his rom so check there. Might have to do alot of reading though. But I ended up leaving and going back to Baked Snack 1.9
Click to expand...
Click to collapse
Yeah, I tried to read through the thread, but it turned in to a clusterF pretty quickly, just like every other rom thread.
This issue only started on Thursday, the 28th, so like I said I wasn't sure how to figure out where the real problem was. Guess I'll grab some beer and start reading through Myn's thread again.
If anyone has an idea of how to track down the culprit, please let me know.

activity manager cpu 100%

Hi
i have a weird thing , dont know if its rom related but defenetly noticed it after rooting my device and installing cosutm roms. well i only used ARHD since 2.0.09 and i love it.
but , what happens is that suddenly and out of nothing (after like hours/days and the rom running smooth and ultra fast) , system cpu usage jumps to 100% and never bugs off only through a restart, and this seems to happen with all the different versions of ARHD i had, even though i install most of them with full wipes. but this i don't understand and it annoyes me cos it uses this cpu amount and drains battery and it happens suddenly and randomly , dunno what triggers it, and no matter how i tried to track it to see the error but couldn't find a thing.
i just hope u can help me by taking a look at this log i saved from android systeminfo app registering some errors (3 min log and it drained 14% battery ) , it shows something about "activity manager", im not a developer and i know nothing about those codes, but would be awesome if someone helps me out with any tip please.
thank you.
I am not a DEV but i don't think your log file includes any clue of what is causing your problem. Do you have sense account on? or any types of account that let you track your phone?
Activate usb debugging
Seems to be the bug with the .init process.
Sent from my Desire HD using Tapatalk
thank you for the replies , i already have usb debugging on. dunno what is causing this, its totally random and its driving me nuts.
can you see a process that uses 100% cpu in android system info? If yes, try to kill it and look at your cpu usage.
CPUNotify is a great tool. It shows cpu usage in the notification bar
Sent from my Desire HD using Tapatalk
the process showing 100% cpu usage (not always but randomly, no idea what triggers it ) is system , and u can't force close or end that task
Hmm strange... i can't even find a process called activity manager on my phone...
Well i don't know but maybe it's related to the DroidDream malware. Some apps in the market were infected with this virus. And i've read that the virus gains root access and can download other apps in the background.
Here's a link: http://forum.xda-developers.com/showthread.php?t=977154
I really don't know if it's related to this but it just came to my mind
Sent from my Desire HD using Tapatalk
thx for the help mate , but i dont think its related to droidream cos ive been having this issue since a while (long time before droidream was up )
im still monitoring to find out what is causing this issue.
i have the same issue since going to a rooted ROM (HD rev 2.0.12). tried every build up to 3.0 and i have the same issue. it seems to be randomly triggered (i've seen it trigger after playing "robo defense", playing music, making a call etc).
i have no sense account and dont have malware and have usb debugging on
I fix/hack it this way..open adb shell
type
chmod 700 /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
ie disallow anything (even system_server) from reading this file.
in fact i automate this command to run every 15 mins using an app called phone prioritizer. as soon as you type the chmod..your logcat will stop spinning and all will be well (iove not seen any side effects yet).
ps. you have to run this every time you open setcpu, as it will reset the permission on this file to 777/666 depending on the version of setcpu you have.
Activate usb debugging
Seems to be the bug with the .init process.
Click to expand...
Click to collapse
nope that totally different. that problem shows itself in "top -m 5" as init taking all the cpu ..this will show as system_server.
the "bug" manifests itself in this kernel file:
goto url github.com/android/platform_frameworks_base/blob/master/services/java/com/android/server/ProcessStats.java#L157
it spins on getCpuSpeedTimes() where it reads time_in_state..why it does this i dont know..it looks like mBuffer is corrupt as nosuchelementException would indicate that the buffer didnt have 2 words per line of the file yet the real file looks fine if you cat it (readFile seems not to initialise this on reading it to null first (but i'm not a java expert..maybe ".read" does this) so perhaps it has junk in it on certain conditions..any java guys out there can explain why they made this a glbal variable? it seems like it should be a local one)
by chmodding the file i cause an IOException to throw in readFile (which is then ignored and the return is gracefully set as null..this then skips the infinate loop).
you can see this issue in a few bugs like android issue 9733..oxygen rom issue 507 etc.
wow , cheers mate for the help , sounds a bit complicated for me but at least we know what it is now and how to get over it.
but how come mike1986 doesnt know about this bug and its fix ? he could incorporate this into his next build so it saves us that command run every 15 mins. or it cant be incorporated ?
someone should tell him to be honest
but cheers for explanation mate, thank you
Is Apache14 informed about this? Maybe he can solve it in next Kernelversion.
walda said:
Is Apache14 informed about this? Maybe he can solve it in next Kernelversion.
Click to expand...
Click to collapse
i have no idea about that , if he does then im sure he will fix it
As I read in mikes 3.0 thread, he is informed. Fine...
sent from my DHD via Tapatalk
further to this.
in ProcessStats.java (im not sure if this is a kernel file or if it sits just outside the kernel).
mBuffer looks to me to be the main problem.
1. in apaches rom, which is overclocked he defines 23 CPU speeds..ProcessStats.java only allows 20
Code:
private long[] getCpuSpeedTimes(long[] out) {
long[] tempTimes = out;
long[] tempSpeeds = mCpuSpeeds;
final int MAX_SPEEDS = 20;
if (out == null) {
tempTimes = new long[MAX_SPEEDS]; // Hopefully no more than that
tempSpeeds = new long[MAX_SPEEDS];
this is a minor issue..as this overflow is trapped in the loop anyway:
Code:
if (speed == MAX_SPEEDS) break; // No more
however, the definition of mBuffer is too small:
Code:
private byte[] mBuffer = new byte[256];
my file at the moment is 300 bytes. the readFile reads only once instead of looping until end of file:
Code:
int len = is.read(mBuffer);
is.close();
so only the first 256 bytes are ever read.
My assumption is that IF the files first 256 bytes ends up cutting off the last read line (and that line lies in the first MAX_SPEEDS lines of the file) before the speed time element..this causes a NoSuchElementException to throw..as the last line will be like
921600 255
960000 750
998400 8042
10368
ie the line
1036800 3089
was cut off too soon and this code
Code:
long val = Long.parseLong(token);
tempSpeeds[speed] = val;
token = st.nextToken(); <-- here
val = Long.parseLong(token);.
in getCpuSpeedTimes() fails as it cant see the timing?
would then fail on the second nextToken().
the big question is who owns that code in our custom ROM? is it the same as the original android code so we are at the mercy of Google to fix it or is this something Mike / Apache will be able to patch up ..assuming i'm making sense
the only workaround is as i said before: to chmod this file to 700 and ensure it stays there (avoid using setcpu as it changes the permissions).
You can probably also reduce this by limiting the CPU frequency range your phone uses (ie keep the filesize smaller)..if you have profiles that span 200mhz to 1.2ghz then you will probably hit this sooner
i did a test.
1. rebooted my phone..ensured time_in_state had permissions -r--r--r--
2. manipulated CPU frequency using cpu tuner to make all frequencies have at least 5 bytes per line.
once the first 20 lines were > 256 bytes and the 256nd byte sat between <cpu speed> and <time spent at that speed> i get the loop.
eg just before the issue arose i saw:
Code:
# cat time_in_state
cat time_in_state
245000 200030
422400 12676
460800 11929
499200 10333
537600 37021
576000 10685
614400 13672
652800 10646
691200 14864
729600 13956
768000 12662
806400 15025
844800 22094
883200 26741
921600 10389
960000 9937
998400 17606
1036800 6864
1075200 1560
1113600 1296
1152000 2158
1190400 2540
1228800 2463
i had my cpu pinned to 960 mhz.
the 256 at this point lies here:
Code:
1075200 1560
1113600 1
ie line 20 is cut off after 1..this is still "valid" in terms of the data in mBuffer..but once 960 rolled into five digits
Code:
# cat time_in_state
cat time_in_state
245000 200030
422400 12676
460800 11929
499200 10333
537600 37021
576000 10685
614400 13672
652800 10646
691200 14864
729600 13956
768000 12662
806400 15025
844800 22094
883200 26741
921600 10389
960000 10288
998400 17606
1036800 6864
1075200 1560
1113600 1296
1152000 2158
1190400 2540
1228800 2463
the 256 byte now meant the last line shifts to:
Code:
1036800 6864
1075200
the 2nd word is now totally missing!
as soon as this happened..my logcat started issuing
Code:
Unexpected exception collecting process stats
java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:272)
at com.android.server.ProcessStats.getCpuSpeedTimes(ProcessStats.java:596)
at com.android.server.ProcessStats.getLastCpuSpeedTimes(ProcessStats.java:568)
at com.android.server.am.ActivityManagerService.updateCpuStatsNow(ActivityManagerService.java:1657)
at com.android.server.am.ActivityManagerService$4.run(ActivityManagerService.java:1583)
errors.
something later on then causes this behavior to go into a full tight loop (as once the issue starts..it just issues this every few seconds..so most uses wont notice it).
didnt mike fixed it with his latest release (ARHD 3.1) ?
Goodm7sn said:
didnt mike fixed it with his latest release (ARHD 3.1) ?
Click to expand...
Click to collapse
mike changed the file permission to 700 to get around it. the bug is still there in the code though. also im not sure if hes scheduling it to make it stay at 700..if not then users with setcpu installed may still get the problem (as setcpu changes the file permission back to 777/666 when you open the gui).
DazzaL said:
i have the same issue since going to a rooted ROM (HD rev 2.0.12). tried every build up to 3.0 and i have the same issue. it seems to be randomly triggered (i've seen it trigger after playing "robo defense", playing music, making a call etc).
i have no sense account and dont have malware and have usb debugging on
I fix/hack it this way..open adb shell
type
chmod 700 /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
ie disallow anything (even system_server) from reading this file.
in fact i automate this command to run every 15 mins using an app called phone prioritizer. as soon as you type the chmod..your logcat will stop spinning and all will be well (iove not seen any side effects yet).
ps. you have to run this every time you open setcpu, as it will reset the permission on this file to 777/666 depending on the version of setcpu you have.
nope that totally different. that problem shows itself in "top -m 5" as init taking all the cpu ..this will show as system_server.
the "bug" manifests itself in this kernel file:
goto url github.com/android/platform_frameworks_base/blob/master/services/java/com/android/server/ProcessStats.java#L157
it spins on getCpuSpeedTimes() where it reads time_in_state..why it does this i dont know..it looks like mBuffer is corrupt as nosuchelementException would indicate that the buffer didnt have 2 words per line of the file yet the real file looks fine if you cat it (readFile seems not to initialise this on reading it to null first (but i'm not a java expert..maybe ".read" does this) so perhaps it has junk in it on certain conditions..any java guys out there can explain why they made this a glbal variable? it seems like it should be a local one)
by chmodding the file i cause an IOException to throw in readFile (which is then ignored and the return is gracefully set as null..this then skips the infinate loop).
you can see this issue in a few bugs like android issue 9733..oxygen rom issue 507 etc.
Click to expand...
Click to collapse
Thanks mate, your solution is really effective on my DHD with revolution 3.0.
I am going to reflash with revolution 3.1, hopefully 3.1 will cure the cpu 100% usage
im on android revolution HD and i can confirm this , 100% system cpu of death is still here, didnt get fixed , had to change setcpu frequency and it stopped
meh phone cant last 12 hrs without a restart, frustrating.
DazzaL said:
mike changed the file permission to 700 to get around it. the bug is still there in the code though. also im not sure if hes scheduling it to make it stay at 700..if not then users with setcpu installed may still get the problem (as setcpu changes the file permission back to 777/666 when you open the gui).
Click to expand...
Click to collapse
if setcpu changed the range once the gui is opened , what do u recommend us to use for overclocking ? something safer
thx for helping
I read that it happens with CPU tuner and even without anything also!
The only solution I see is to fix the frequency file.
sent from my DHD via Tapatalk

Utilising the Adreno130 Graphics on the Hero

So as it says i wish to utilise the Adreno130 graphics like the legend utilises the adreno200
Taken from egl.cfg (Legend [Adreno200] )
Code:
# One line per configuration, of the form:
#
# D I TAG
#
# D: display (0: default)
# I: implementation (0: software, 1: hardware)
# TAG: a unique tag
#
# The library name loaded by EGL is constructed as (in that order):
#
# /system/lib/egl/libGLES_$TAG.so
# /system/lib/egl/lib{EGL|GLESv1_CM|GLESv2}_$TAG.so
#
0 0 android
0 1 adreno200
As you can see it uses a cfg to use the adreno200, Is there no way of changing it and the drivers so the hero does the same?? Im no developer so i really need help!
Nearly 500 views and not a single comment....Im beggining to think this should go in Development
bonesy said:
Nearly 500 views and not a single comment....Im beggining to think this should go in Development
Click to expand...
Click to collapse
only edit egl.cfg
Code:
0 0 android
0 1 qcom
to
Code:
0 0 android
0 1 adreno130
EDIT: Then you definitely must add adreno files also
Note that the differences between 200 and 130 can be quite large.
While 200 is considered as a separate GPU unit, the 130 is integrated into the CPU I believe.
While legend and newer uses KGSL for rendering triangles, we unfortunately still use hw3d. I believe this is due the GPU/integrated differences.
Maybe it is of any help...
Should this improve the gfx performance on our Heros?
Ooh it got moved! Thanks!
I think it may speed up a little but now im thinking the drivers will have to be made,
dont think it'll be easy...
Ill search through other Adreno 130 device rom's to see if i can find one that already uses them
...EDIT...
Adreno 200
A quantum leap in graphics quality from the OpenGL-Es 1.x, the Adreno 200 GPU has a unified shader architecture that makes maximum use of its graphics processing power. Developers can use this GPU to implement high-end effects that were previously impossible.
Dont think it will be possible after looking on the qdevnet site
bonesy after reading your thread I thought I would check this out a little and stumbled upon a thread over at simply android. looks like some devs working on the moto cliq had the same idea as you and they have been trying to contact qualcomm about this, doesn't look too promising at the moment but they are trying so maybe something will come out of it.
http://www.simply-android.com/discussion/833/mod-opengl-es-1.1-for-motorola-cliq/p9
Thanks for that, i will keep an eye there i managed to currupt my HD last night so it may take me a while to get back all the stuff..Hopefully they will have has a response by then!

[SCRIPT/DISCUSSION] Loopy Smoothness Tweak (Android's priorities) [02-02-2013]

LATEST UPDATE: 02.02.2013
A question that I'm often asked is:
"Can I have your permission to use your script in my ROM etc...?"
That answer to that is:
"Yes it is ok to use the code. I don't really believe it's useful anymore, but if you can find a use, and possibly improve the code to make it work better, go for it."
Version 1.0.2
Download available for ClockworkMod: requires Root (Superuser/Busybox), and a kernel that supports "init.d" scripts (script files that are stored in /system/etc/init.d/).
Always have a backup before installing any modification. Even though this script is rather simple, I can't guarantee it will work on every ROM! It appears to freeze custom ROMs such as CM, I don't know why. Maybe someone else knows.
NOTE: This script appears to be less and less useful as newer ROMs and phones become more sophisticated in dealing with any sort of lag. Tested on I9000XWJW9 and it doesn't seem to help. This ROM is quite smooth anyway.
What this script hopes to achieve:
- Entering your PIN with minimal/no delay/lag
- Minimising delay with lock screen pattern/unlock (not the time it takes to wakeup, but the touchscreen response lag)
- Having smoother notifications on the status bar, and smoother pulldown menu response
- Minimising Launcher lag while Media Scanner is running (can scroll through screens without heavy pauses)
- Minimising lag when scrolling through the market while icons are still loading
- Installing/Uninstalling apps while continuing other tasks
- Minimising/eliminating intermittent lag spikes in gaming
- No delay in being able to answer phone calls
... you get the idea
#!/system/bin/sh
#
# Loopy Smoothness Tweak v1.0.2 - 02/02/2013 (http://forum.xda-developers.com/showthread.php?t=1137554).
#
# An attempt at keeping the UI running a little smoother.
# Optimised for Galaxy S1 stock ROM, but can be modded for other Android devices. Backup recommended before running scripts.
# Not recommended for custom ROMs, such as CM. The "sleep" command appears to halt the OS, rendering the script useless.
# Feel free to edit how you wish, but please leave at least the first comment above as is.
# Any editing must be saved in UNIX (LF) format. Google "text editor unix lf" to read more.
#
Click to expand...
Click to collapse
However, as phones get faster, this script will probably have less of an effect.
Even with 2.3.6 and ext4, RAM scripts, governor tweaks, other tweaks, etc. the occasional lag still appears to be there, especially noticable when installing/unistalling, gaming, or even just scrolling through the launcher screens and menus. I decided to investigate. Being a linux newbie, I had to also source the appropriate commands.
The following has been discussed a little here and there on other Android forums, but surprisingly I couldn't find anything about it in the I9000 section...
Thinking of how processes in Windows can be run with six different priorities (Low, Below Normal, Normal, Above Normal, High, Realtime), I investigated to see what the deal was with Linux/Android. Turns out there are forty settings, ranging from -20 (Highest) to 0 (Default) to 19 (Lowest).
The next step was to see which process was causing the CPU bottleneck as it was happening. The top command is handy for this. I used this in adb shell (these tests were performed quite some time after reboot when there was craploads of stuff in the memory - the impact is not very noticeable after a fresh boot, or with very few apps installed/running.
UPDATE: The reason behind the majority of the kswapd0 issue was due to modified code of a custom kernel I was once using. I do however still find the script of benefit to me, and maybe you will too. You can still read below if you wish, but it may be irreverent.
Code:
adb shell
top -n 1
At the top of the list was:
18 16% R 1 0K 0K fg root kswapd0
Click to expand...
Click to collapse
kswapd0 is a kernel thread responsible for managing the memory.
I know Angry Birds can show a little lag from time to time, so I performed a little testing while playing that.
To change the priority of a running process, I used the renice command as such:
Code:
su
renice -20 `pidof kswapd0`
where -20 equals highest priority and `pidof kswapd0` returns the PID of the process, which is required by renice. In this case, 18.
To confirm the change, the ps command will give you what you need to know. Interesting to note "krfcommd" with a value of -10, and "mediaserver", -8.
Code:
ps -p kswapd0
If you enter "ps -p" all processes in memory are shown, along with their "nice" value.
It shouldn't take long before the game becomes barely playable at times (for a split second), as kswapd0 completely takes over the CPU until it performs its task. Setting the priority to
Code:
renice 0 `pidof kswapd0`
returns kswapd0 back to its default, and Angry Birds with the seldom lag. Let's go the other way now with
Code:
renice 19 `pidof kswapd0`
setting kswapd0 to its lowest priority, it should now have barely any impact on the game, if at all. Will this have negative impact on Android, though? Not sure yet.
We can even go one better and give Angry Birds all the CPU it needs via
Code:
renice -20 `pidof com.rovio.angrybirds`
With these settings in place, you could virtually play this all day, and your battery would probably be flat way before any lag becomes noticeable.
One problem though, when you close and reopen the game - assuming it's left the memory - it will have a new PID and the priority is set back to 0 (default).
Now, with my very limited knowledge of Linux/Android/Busybox, I'm not sure if there's a way to tell an app to open with a priority other than 0. Well, there is the nice command, but I couldn't get that working.
A common problem is the phone dialer app taking too long to popup when someone calls. Luckily, processes such as this one enter the memory from boot and seem to remain there. Setting its priority to -20 will basically tell the CPU to hold everything with less priority and open the phone dialer ASAP so you can take that call. And it works. I was on Angry Birds when a call came in, and was able to answer it on the first ring. I tried then calling myself without the -20 phone or the 19 kswapd0 settings, and there was an extra 2-3 second delay before I was able to answer. A few other apps that usually never leave the memory are default launcher (in my case, ADW Launcher EX), SMS/MMS app, Swype, Status Bar, and some others.
Even with apps launching at the default priority, with kswapd0 at 19, it still allows them more CPU, and may just be enough to combat this lag that people have tried to rid of with RAM scripts, Overclocking, and what not.
The script shown below is not the current init.d download script.
And the result (still a work in progress):
Code:
#!/system/bin/sh
###### Loopy Smoothness Tweak for Galaxy S (Experimental) #######
sleep 3
renice 18 `pidof kswapd0` # please give credit and thanks to loopy for this line if it works
##### Set nice levels for smoothness loop BEGIN #####
### Let's loop this in the background for a bit
for i in {1..20}
do
sleep 5
### Phone dialer app ###
renice -20 `pidof com.android.phone`
### Launcher apps ###
renice -19 `pidof com.sec.android.app.twlauncher` # TouchWiz Launcher
renice -19 `pidof org.adwfreak.launcher` # ADW Launcher Ex
renice -19 `pidof org.zeam.core` # Zeam launcher
### System apps ###
renice -19 `pidof com.android.mms` # Text message app
renice -19 `pidof com.swype.android.inputmethod` # Swype keyboard
renice -15 `pidof com.sec.android.app.controlpanel` # Task manager
renice -15 `pidof com.android.systemui` # Status bar
renice -9 `pidof com.android.settings` # Settings menu
renice -9 `pidof com.android.browser` # Browser app
renice -9 `pidof com.android.vending` # Market app
renice -6 `pidof com.sec.android.app.camera` # Camera app
renice -6 `pidof com.sec.android.app.fm` # FM Radio app
renice -6 `pidof com.google.android.youtube` # YouTube app
renice -6 `pidof com.google.android.apps.maps` # Maps
renice -3 `pidof android.process.acore`
renice -3 `pidof android.process.media`
### Memory management kernel thread ###
renice 19 `pidof kswapd0` # please give credit and thanks to loopy for this line if it works
done
##### Set nice levels for smoothness loop END #####
What would be ideal is if programs such as launchers (TouchWiz Launcher etc..) had the ability to set its "nice" level upon launch, and have kswapd0 set real low, assuming it's safe to do so. If Android isn't doing this, why not? This isn't a good idea? Maybe it's only Samsung? If so, then... well, I won't ask why not...
NOTE: These commands/parameters vary depending on the su/busybox version installed.
Common SGS1 apk's:
com.android.phone # Phone
com.sec.android.app.dialertab # Dialer
com.sec.android.app.twlauncher # TouchWiz Launcher
com.android.mms # Messaging
com.swype.android.inputmethod # Swype keyboard
com.sec.android.app.controlpanel # Task manager
com.android.systemui # Status bar
com.android.settings # Settings menu
com.android.browser # Internet Browser
com.android.vending # Google Play
com.sec.android.app.camera # Camera
com.sec.android.app.fm # FM Radio
com.google.android.youtube # YouTube
com.google.android.apps.maps # Google Maps
com.android.phone # Phone
Common SGS3 apk's:
com.android.phone
com.android.contacts
com.sec.android.app.controlpanel
com.android.browser
com.android.mms
com.android.vending
com.android.settings
mediaserver
com.sec.android.app.camera
com.sec.android.app.videoplayer
com.sec.android.app.myfiles
com.android.browser
com.sec.android.app.camera
Click to expand...
Click to collapse
Quick FAQ:
I wanna see how it works without it again, how do I remove the script?
To remove, delete the file /system/etc/init.d/S00loopyst. If using Root Explorer, use Mount R/W before you attempt to delete. For adb, use the commands at the DOS prompt:
Code:
C:\>adb root
restarting adbd as root
C:\>adb remount
remount succeeded
Code:
[SIZE=2][SIZE=2]C:\>adb shell rm /system/etc/init.d/[/SIZE][/SIZE][SIZE=2]S00loopyst
[/SIZE][SIZE=2]
[/SIZE][SIZE=2]C:\>
[/SIZE]
For the Test versions (prior to v1.0.0):
Code:
[SIZE=2][SIZE=2]C:\>adb shell rm /system/etc/init.d/S_loopy_smoothness_tweak[/SIZE][/SIZE][SIZE=2]
[/SIZE][SIZE=2]
[/SIZE][SIZE=2]C:\>
[/SIZE]
How can I make this script run first/last?
Scripts in the init.d are run in alphabetical/numerical order, following the letter "S". For example, script "S_ramboost" would run AFTER "S00loopyst", because "r" is after "l". Renaming it to "S_1ramboost" will now run that script BEFORE "S00loopyst".
How do I edit the script and add apps I use?
Open the .zip file and extract the file S00loopyst from /system/etc/init.d/. Alternatively, if installed, you can edit the file directly from the phone's init.d folder. File must be saved in UNIX format.
So I can just edit the script and add apps I use?
You can, but there is no guarantee this will actually work. Very few processes remain in memory...there is a lot of chopping and changing going on in the background. You could alter the script's timing variables, but even then results are unpredictable with anything other than what I call the resident system processes. If you're able to improve the script in any way, let us know.
Will this work on a custom ROM such as CM/MIUI?
Probably not. The "sleep" command within the screen appears to run in the foreground as opposed to the background in a stock ROM, hence making the script useless. Not to mention it may prevent anything else loading.
Are the settings permanant?
Usually. Most apps remain in the memory, although some do come and go. If you use the Task Manager to clear apps from the memory, or use the "Clear memory" option, the apps will have lose their priority when removed from the memory.
Changelog:
v1.0.2a:
Added option for "low priority" tasks.
Early script finish if 2nd loop is complete before "number of checks" is complete.
More detailed log file.
v1.0.1:
Cleaned up some invalid code.
Tested OK on rooted Samsung GT-I9000 2.3.6 ROM.
Tested OK on rooted Samsung GT-I9305T 4.1.1 ROM.
Tested NOT OK on CM 9.1 GT-I9000 ROM. Phone freezes on boot until loop is complete.
v1.0.0:
User friendly - a lot easier to configure.
Total number of processes automatically calculated (used to shorten 1st loop if all apps are in memory).
Debug file created for troubleshooting (includes "renice" pass or fail test) - can be saved to /data partition or sdcard.
Simple "Aggressive" option to increase priority of resident and other apps.
In addition to kswapd0 checking before continuing, launcher app is also checked in a loop before continuing (usually no more than ~15 seconds after start-up).
oom_adj & oom_score settings for launcher to remain resident (doesn't seem to work too well... settings don't appear to "stick").
T2:
"Smarter" script.
Checks for kswapd0 every 3 seconds until found, and then 'nice' level is set.
1st loop: checks for apps 60 times, at an interval of 3 seconds. Once an app is found in memory, 'nice' level is set, and it is not checked again during the loop. (Some apps enter and then leave the memory, which ain't helpful.)
2nd loop: checks again 6 times at an interval of 5 seconds and sets 'nice' level.
Settings are a little more user-friendly.
Debug option (if kernel stores a log file).
T1:
Sets kswapd0 'nice' level after 3 seconds.
Pauses for 15 seconds, sets 'nice' levels for other apps (many of which don't remain in memory).
Download:
Download file and transfer to SD card
Enter ClockworkMod Recovery via Vol+Up/Menu/Power button combo
Select zip and install (remove any "Test" versions before using Version 1 or above)
I'm not a Linux/Android master myself, but this actually is food for thought. I'll try and do some reading, and i would really like to hear more experienced users's opinion about it.
Thanks for the explanatory post.
Very interesting idea
Sent from my GT-I9000 using XDA Premium App
Thanks for the feedback so far. I too would like to hear what more experienced users have to say, as I've only been using linux for a few days now and have quite a lot to learn.
The other good thing about this is, if it turns out to be a good idea, I'm guessing it can be used on basically any Android device.
this is something to be looked at
interesting
I'd personally like to see more discussion on this and input from more experienced people as well so...
BUMP
A good place to start from...
Will take a look more....i am very interested on this and if u need help in scripts i can help u....
Sent from my GT-I9000 using XDA Premium App
interesting approach lpy !
FYI:
looping should be fine since it is also done, e.g. on the Galaxy Spica and CM7
but with different parameters
I have some ideas back in the back of my mind that might help with this issue (kernel-patches and other stuff)
Thanks !
edit:
related:
On Saturday, May 07, 2011 09:35:48 PM Ali Ahsan wrote:
> Hi All
>
> I have xeon server with 16 Gb Ram and no Swap memory.I am running
> cassandra server on two node in cluster.When there is high load on
> server kswapd0 kicks inn and take 100% cpu and make machine very slow
> and we need to restart out cassandra server.I have latest kernel
> 2.6.18-238.9.1.el5.Please let me know how can i fix this issue .Its
> hurting us badly this our production server any quick help will be
> appreciated.
There is more than one bug that causes this behaviour. A few related memory
managent situations (possibly responsible) may actually be avoided if you add
some swap (even if it's not used). My suggestion would be to add some swap,
set swappiness to 0 and see what happens.
/Peter
_______________
Click to expand...
Click to collapse
http://www.linux-archive.org/centos/523508-kswapd-taking-100-cpu-no-swap-system.html
Tried the script with go contacts,go sms, go launcher (edited ofcourse)
it seems to make them open instantly even when they aren't running in the background..
if some1 could make an app which make the app you use as -20 or something and if you close it or move to another one make it back to 0..
It would be really interesting to see this being controlled at Kernel level (if possible.)
I know that it contains the govenors to control the CPU and UV settings (smartass, conservative, etc.), but wouldn't it be awesome if you could determine a priority level for apps installed on your phone so that it removed a load of junk from memory?
I mean I know app developers would all start setting their apps "attention level" to -20, but if there could be an intelligent manager for this, it would make things alot faster I would think.
lttldvl said:
It would be really interesting to see this being controlled at Kernel level (if possible.)
I know that it contains the govenors to control the CPU and UV settings (smartass, conservative, etc.), but wouldn't it be awesome if you could determine a priority level for apps installed on your phone so that it removed a load of junk from memory?
I mean I know app developers would all start setting their apps "attention level" to -20, but if there could be an intelligent manager for this, it would make things alot faster I would think.
Click to expand...
Click to collapse
that s the goal , ultimately all these task killers try to achieve problem as of today is it usually creates more problems then it solves ..
having a script in init.d folder or using gsript (market app ) to run script manually on a regular basis to ensure your apk have the proper level ..
@ OP : good thread
that's really interesting approach but it has also some drawbacks. With nice you give a process more CPU time and in case that the application is not written properly you could end up with frozen system.
looping this script will eat my battery? i see it like a permament recursive process running in background.
phone will sleep properly after? cpu usage?
Indeed there is a speedup if I use parts of your script. This is an interresting approach to gain your most important task faster. I often recognized a large latency if I opened phone or sms/mms. Is their a way to preload this apps and prevent its swapping out of ram?
Edit: recognized a reliable process when updating a lot of apps at once -> no update failed message any more
using scripts should be fine and the resource consumption should not be a problem, if it is used properly
while using nice/renice will gain some benefits in controlling the priorities (i use nice too in some cases), i doubt the effectiveness if all thoese processes are set to low priorities
also, on my phone, the kswapd0 only consumes very little resources and it's not even in the top 10 in the top results but somewhere near 20
All good responses so far, and definitely making a lot of sense.
@simone201 many thanks re the script offer. There is no doubt this script can be improved, for example, having an 'if ... then' condition where once an app enters the memory, the "`pidof" changes from 0 (false) to a PID (true), and then the nice value can be set.
matematic said:
that's really interesting approach but it has also some drawbacks. With nice you give a process more CPU time and in case that the application is not written properly you could end up with frozen system.
Click to expand...
Click to collapse
Very true. -20 can be quite a dangerous setting if an app decides to play up.
lttldvl said:
I mean I know app developers would all start setting their apps "attention level" to -20, but if there could be an intelligent manager for this, it would make things alot faster I would think.
Click to expand...
Click to collapse
haha. I can see "priority wars" happening between developers and apps.
If Android doesn't take advantage of nice, I don't see why we can't. It's possible that in 12 months from now when many phones are dual core (or more?), this may have little impact, but for now this should prove very handy.
ykk_five said:
using scripts should be fine and the resource consumption should not be a problem, if it is used properly
while using nice/renice will gain some benefits in controlling the priorities (i use nice too in some cases), i doubt the effectiveness if all thoese processes are set to low priorities
also, on my phone, the kswapd0 only consumes very little resources and it's not even in the top 10 in the top results but somewhere near 20
Click to expand...
Click to collapse
I agree with all that, however, I don't really see it as a matter of "how much" it uses in terms of resources, but rather "when". My example with Angry Birds and a stock ROM, you will notice little glitches here and there, due to the work kswapd0 does. Lowering its priority still enables it to complete its task/s, but without interfering with real-time action.
Here are examples of some improvements I've noticed:
- Entering your PIN minimal/no delay
- Minimising delay with lock screen pattern/unlock (not the time it takes to wakeup, but the touchscreen response lag)
- Having smoother notifications on the status bar, and smoother pulldown menu response
- Minimising Launcher lag while Media Scanner is running (can scroll through screens without heavy pauses)
- Minimising lag when scrolling through the market while icons are still loading
- Installing/Uninstalling apps while continuing other tasks
- Minimising/eliminating intermittent lagging in gaming
- you get the idea..
The way I see it, at the very least, lowering the priority of kswapd0 already helps with the way everything runs. Setting an app's nice/renice value (if managed in a practical way) will be a bonus.
Just a quick note (uncertain if this is even related):
A couple of kernels ago (yes, i switch a lot) i noticed a large battery consumption by "Android System". This was running JVP, and DarkCore 2.7.3 i think... But it wasn't until I read this thread that I remembered that the reason I switched kernels was because of a "laggy" system. After a while the phone seemed a lot slower, and I had to reboot to get the initial speed.
Now with Galaxian kernel I have an extremely snappy phone, and the "Android System" drain is gone aswell....
How do you get the process name of an application (to edit the script)?
Edit\\ open app in app manager (astro)
I think this is an important topic, but don't see much feedback from developers.
My question as a non developer is:
is there a way for me to use this? seems like the script is already there, so it could be possible to have a flashable zip or a tutorial because different apps/versions require a different script.
Cool thing. I remember something very similar to this when I was having HTC Dream. There was scheduling app which runs similar script like this Will try it and post my opinion

Categories

Resources