yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] stratosk:
Hi,

It's pretty simple.

Every process has a PID. Suppose you need a process to be exluded .

For example the process with PID 1234 (1234 is a random number for our example)

You run this in terminal emulator (or adb shell)

su
echo "1234" > /sys/module/lowmemorykiller/parameters/w_list

How do you find a pid?

you may tun these commands:

su (if you havent't run it already)
ps

The first column in the list is the process owner. The second is the PID. The last column is the process name.

You need the second one. Of course the process must run in order to find the PID. And it might me different in every boot.

So, you need something like the 'pidof' command (it gives you the PID of a process name):

echo `pidof processname` > /sys/module/lowmemorykiller/parameters/w_list

Please note the quotes. They have to be as written above.
[Galaxy S I9000 Android Development] saszseb:
I'm running SB_build 3 and the aLogcat.apk works only with 2.9.18s.
[Galaxy S I9000 Android Development] stratosk:
Confirmed. I guess because of the changes in logger.

Though logger works fine. Tested with adb, in terminal emulator and with other app.
[Galaxy S I9000 Android Development] nigox91:
Hello, I am a really close follower of your kernels and a couple of days ago I noticed that in the features list of your semaphore kernel is present voodoo sound. I was wondering, what it means? It means that every improvement that comes with the voodoo sound plus app is already packed inside the kernel?

I really appreciate your work.

Thanks
[Galaxy S I9000 Android Development] Rebel2k:
It means that kernel is supporting the bunch of sound improvements developed by soundcurio himself. Voodoo Control Plus or Free app is just the way your controlling those audio settings, but you need to have the features embedded into the kernel code for then to work, which is the case in the Semaphore kernel.

So long story short: Voodoo Sound features are supported in Semaphore through the Voodoo Control app.

Envoyé depuis mon GT-I9000 avec Tapatalk
[Galaxy S I9000 Android Development] nigox91:
Thank you...I kind of found out myself yesterday, and I understood that yes semaphore has thoose features but if you have a different kernel which does not have voodoo sound and you dont want to change it you can download the paid app that is going to improve your sound without a kernel... everything clear now...

thanks..
[Galaxy S I9000 Android Development] alb3rtt:
I don't even know if there are custom kernels that don't support it. (Other than stock GB ones).
[Galaxy S I9000 Android Development] ziporpor:
Many thanks, I finally succeeded in getting some data into the w_list file!

3 last questions,

1. do i need to do this process manually every time i boot the phone (like you said, the PID's can be different for each boot)

2. what is the syntax for inserting 2 PID's or more?

3. does this process requires a boot for the changes in the w_list file to take place?

Thanks a lot!
[Galaxy S I9000 Android Development] grinder777:
You can do it with am init.d script. Mine is

77Semaphore

#set brightness parabolic

echo 0 > /sys/devices/virtual/misc/sema_autobr/linear

# set lowmemorykiller whitelist - 6 items max

echo `pidof com.android.phone`,`pidof com.opera.mini.next.android` > /sys/module/lowmemorykiller/parameters/w_list

Have fun!

SGS - Sema 2.9.20s - Xylon 0.2.3.3 - Cobalt Sam-X - Big Thanx2all
[Galaxy S I9000 Android Development] nigox91:
yes that's true...Is there someone that have compared sound quality between voodoo and acid sound ?
[Galaxy S I9000 Android Development] saszseb:
Can you fix it or I need to use 2.9.18s in the future?
[Galaxy S I9000 Android Development] ziporpor:
Thanks!

I have a small problem since the process that i need to be whitelisted are process that run on demand and not automaticly when the phone boot up (like the navigation app process and the music/podcasts apps)... guess this is a problem that this w_list feature can't solve...

Thanks anyway, this is a magnificent feature all the same :highfive:
[Galaxy S I9000 Android Development] stratosk:
I'm not sure, If should 'fix' it.

Since JB, a process may have access only to it's own logs.

Only root may have access to all logs.

But I will check again.
[Galaxy S I9000 Android Development] grinder777:
Oh yeah, I see...

So it would be nice to start those processes with specific IDs and bring this IDs to whitelist at boot-time.

But don't know if it's possible and how :(

SGS - Sema 2.9.20s - Xylon 0.2.3.3 - Cobalt Sam-X - Big Thanx2all
[Galaxy S I9000 Android Development] stratosk:
This is not necessary. You may have a list of process names and convert with a list of PIDs with the 'pidof' command.

I can make an init script for you if you are interested in, later tonight.

The only small issue will be if some process are not available during the execution of init.d directory.
[Galaxy S I9000 Android Development] dark_knight35:
I think this is the problem he's actually talking about. Is there a way of automatically working around this, or should we just do it manually after boot?
[Galaxy S I9000 Android Development] AusMatt:
Not a small issue but a huge issue.

What people want is to add a process by name to the whitelist regardless of whether it's already running when the init.d scripts run.

Is this possible under kernel control ?

I think not.

What we need is a hook where CM10.1 can run a script after starting a new app so that the script can add the pid to the whitelist if the app is one that you care about.

As it is now, this feature is probably only useful for keeping the launcher alive (which is something I'd not want to do considering how much RAM it would use).
[Galaxy S I9000 Android Development] stratosk:
There are many things you may do with scripting.

I have an idea. I will post it later.

EDIT: OK, here is a simple script. You may save it to a file, put in /etc/init.d and change exec permissions.

Just change the variables PNAME1 - 6. You don't need to use every variable.

#!/system/bin/sh

# Wait 60 secs for all processes to start
sleep 60

# Fill the process names - up to 6
# Leave a variable empty if you don't need it
PNAME1="com.dropbox.android"
PNAME2="com.semaphore.sm"
PNAME3=""
PNAME4=""
PNAME5=""
PNAME6=""

PIDLIST=""

for i in $PNAME1 $PNAME2 $PNAME3 $PNAME4 $PNAME5 $PNAME6 ; do
PIDLIST=$PIDLIST`pidof "$i"`","
done;

echo "PID list: "$PIDLIST
echo $PIDLIST > /sys/module/lowmemorykiller/parameters/w_list
[Galaxy S I9000 Android Development] stratosk:
Anyone tested this?

I read bitblaster's post that it didn't work. Anyone with different results?
[Galaxy S I9000 Android Development] superkoal:
Thanks for the script!

This still has the problem that there is only a pid if a process is actually running, so in this 60 seconds of waiting time you would have to start your dialer (for example) so that the script can do what it's supposed to. However, if the process gets started after 10 seconds and killed by android after 40 seconds your script at 60 seconds won't find a pid again. It works for your launcher, as the possibility is high that it won't get killed within 60 seconds unless you start a game or similar resource heavy app.

There are 2 solutions i can think of to do this in an app (Semaphore manager? ;) )

First one:

for(every process in list)

{

1. send MAIN intent to an app (it will start in foreground, but one could live with that)

2. get it's pid

3. add to whitelist

}

Second one (maybe better as it won't start an app in foreground):

while(not all pids found)

{

for(every app in list) if(app is running) add pid to whitelist

}
[Galaxy S I9000 Android Development] stratosk:
I don't know if the first one is possible. About the second one: If an app is not running the script simply will not find the PID.

But it will run with no problem. Another one that scan every 1 min for your apps (untested as boot script because it runs for ever):

#!/system/bin/sh

# Wait 60 secs for all processes to start
sleep 60

# Fill the process names - up to 6
# Leave the variables empty if you don't need one
PNAME1="com.dropbox.android"
PNAME2="com.semaphore.sm"
PNAME3=""
PNAME4=""
PNAME5=""
PNAME6=""

while :
do

PIDLIST=""

for i in $PNAME1 $PNAME2 $PNAME3 $PNAME4 $PNAME5 $PNAME6 ; do
PIDLIST=$PIDLIST`pidof "$i"`","
done;

echo "PID list: "$PIDLIST
echo $PIDLIST > /sys/module/lowmemorykiller/parameters/w_list

sleep 60

done
[Galaxy S I9000 Android Development] arnes_king:
Hey everyone, my friend has a samsung galaxy i9000

I rooted it and wanted first to flash this "Semaphore" kernel, but after i flash it the phone won't boot, i tried 3-4 different version but still the same (i don't remember now if it is a bootloop or if it just stucks at the samsung logo)

I tried then to install a custom rom which has this kernel built in, but again the same .... after i flashed a custom rom with a different kernel the phone works :/

The phone has now RemICS JB installed (4.2.2) http://xdaforums.com/showthread.php?t=2075058

Any idea why and how to fix it?

Thanks in advance
[Galaxy S I9000 Android Development] ts1506:
I dont really think that a looping boot script is a good solution , cause often looping init.d scripts lead to bootloops due to kernel panic(mostly ROM dependant)

Maybe a better(in the long term sense of way), but harder way would be to add options into semaphore manager to add apps to whitelist. You could pick the app, start it temporarily (if not already running) , get its PID , and add it to the whitelist.
[Galaxy S I9000 Android Development] stratosk:
What versions did you flash?

Why an init script leads to bootloops? due to kernel panic?

Could you please clarify?

BTW, a better approach of the script in order not to block the init.d processing:

#!/system/bin/sh

filler() {

# Wait 60 secs for all processes to start
sleep 60

# Fill the process names - up to 6
# Leave the variables empty if you don't need one
PNAME1="com.dropbox.android"
PNAME2="com.semaphore.sm"
PNAME3="test"
PNAME4=""
PNAME5=""
PNAME6=""

while :
do

PIDLIST=""

for i in $PNAME1 $PNAME2 $PNAME3 $PNAME4 $PNAME5 $PNAME6 ; do
PIDLIST=$PIDLIST`pidof "$i"`","
done;

#echo "PID list: "$PIDLIST
echo $PIDLIST > /sys/module/lowmemorykiller/parameters/w_list

sleep 60
done

}

filler &
[Galaxy S I9000 Android Development] ts1506:
There was a init.d script which tweaked VM settings and LMK in a continously calculated manner.

It used to cause the phone to get stuck at kernel splash in all 4.0.x and 4.1.x ROMs, the dev of the script mentioned that the kernel panic would occur , because the scripts were loading before the rest of the ROM (just after the kernel) , and hence , the kernel loading would get interrupted for some reason.

Not exactly bootloop , but getting stuck at kernel splash. Sorry for the misnomer.
[Galaxy S I9000 Android Development] grinder777:
I'm also not a fan of looping init.d scripts...

To overload semaphore-manager with looping things seems suboptimal for me as well.

I think tasker can do this for us in a better way. It can start at boot-time, can check and set the PIDs by time - or even better when screen goes off maybe - and exit maybe when the list is done. At least it could be compiled to an app.

I'm not so familiar with tasker to do it quickly and good, but maybe someone else?

SGS - Sema 2.9.20s - Xylon 0.2.3.3 - Cobalt Sam-X - Big Thanx2all
[Galaxy S I9000 Android Development] pikachu01:
It's due to the boot script loading serially. If your script is infinitely looping, the boot hangs waiting for the script to be done.

Stratosk's way fixes it.
[Galaxy S I9000 Android Development] xaforib:
My phone sometimes reboot itself (even into recovery).

I'm using latest semaphore kernel and official cm10.1 nightly 20130414.

At stock cm kernel phone works really stable, so I think that's a kernel fault.

My manager settings :

- live OC : 120%

- ondemand without any changes

- deep idle enabled

- scheduler : No-op

- use BLN

I'll try to upload logcat tommorow (using CatLog app).
[Galaxy S I9000 Android Development] 5aaled:
That's because of ur 120% OC, try to reduce it (I think 110 is stable for most of devices)
[Galaxy S I9000 Android Development] xaforib:
But stock kernel at 1200MHz is stable.

To rule out this possibility I can leave my phone without OC.
[Galaxy S I9000 Android Development] ts1506:
Thats because stock CM has normal OC and semaphore uses live oc.

In normal oc, omly the cpu is overclocked but in live oc, the bus,gpu and ram is also overclocked, so its less stable but performance is better.

Sent from my dad's stocky i9300 sgs3
[Galaxy S I9000 Android Development] superkoal:
Stratosk I had a few hours spare time and started working on an app to create the whitelist for lowmemorykiller.

I'm almost done and when I am I'll share the app and source code here.

However I stumbled upon this questions:

Does the LMK clear the file after it reads it?

i tried writing to it with terminal and text editors - the file is always empty.

Is it OK to run the script multiple times and not just on reboot?

For example every time you add an additional app to the whitelist

If i read your script correctly i should do this in shell (Example):

echo PID list 12345,23456> /sys/module/lowmemorykiller/parameters/w_list

what permissions does it need?

Some of the files in this folder are 644, some 664.

And i think I will have to mount /sys/ rw

mount -o rw,remount /sys

As I am not that much a linux expert could anyone who is give feedback on this? ;)

Thx!
[Galaxy S I9000 Android Development] dejan-:
elo...question:

Semaphore_JB_2.9.21s.zip can be installed via recovery ? like some other kernels...couse on semaphore's page, there are 3 ways, but for .tar file: ODIN, HEIMDALL or SGS kernel flasher?
[Galaxy S I9000 Android Development] superkoal:
Yes, just get the zip from first post.

The tars can be flashed with odin & co if you somehow broke recovery.
[Galaxy S I9000 Android Development] steevo_bass:
Stratosk, I've done as you written.. and all work well, but every rebot my PID change, as like every few hour.

how to fix it?

(I use it with trebuchet)
[Galaxy S I9000 Android Development] Rebel2k:
Launch the script again. Sadly that's the way it is with Linux. A process has a PID during is lifetime. If the process is killed and restarted the PID is likely to change.

Envoyé depuis mon GT-I9000 avec Tapatalk
[Galaxy S I9000 Android Development] superkoal:
Wait a few hours, with the help of stratosk to answer the last questions my app will do just what you want ;)
[Galaxy S I9000 Android Development] purpleraintoxicity:
sorry but I can't font any bigmem libs besides the cm9 ones
[Galaxy S I9000 Android Development] stratosk:
No the LMK does not clear the file.

Most probably an invalid string is written in 'w_list' and the driver does not accept it.

You need root access to write in w_list and no need to remount it. /sys is writeable.

An example:

echo "12345,23456" > /sys/module/lowmemorykiller/parameters/w_list

You may run similar commands multiple times. The PID list count must not exceed 6

I hope that was clear enough. Please let me know if you need further info.

PID change after reboot is normal. But why every few hours? do you mean that you reboot after few hours?

Please check the values your wrote:

cat /sys/module/lowmemorykiller/parameters/w_list
[Galaxy S I9000 Android Development] superkoal:
Thank you for your support!

Just one more question:

do I need to chmod the file?

Are the permissions changed if i echo to the file?

I am sorry for the beginner questions, but i am not that familiar with linux shell yet.

I have sent you a pm regarding the app :)
[Galaxy S I9000 Android Development] Soyuz 3:
kasper_h made bigmem libs for CM10/10.1

http://xdaforums.com/showpost.php?p=30725734&postcount=61
[Galaxy S I9000 Android Development] Rokostar:
Awesome Kernel and with M3 super powerful. Here're results with on demand, Row, 104%live oc

Thanks for your work !
[Galaxy S I9000 Android Development] deeppans:
Phone is not showing options for USB Mass Storage and USB Tethering when phone is connected to laptop using usb cable.

Is this a bug or am I missing something?

ROM: CM 10.0 Apr 5 2013

Kernel : Semaphore 2.9.18
[Galaxy S I9000 Android Development] tenos:
Maybe you have fastcharge activated in semaphore app!?

Gesendet von meinem GT-I9000 mit Tapatalk 2
[Galaxy S I9000 Android Development] superkoal:
Guys this is the promised app to configure your memory killer whitelist.

Big thanks to stratosk for his support!

http://xdaforums.com/showthread.php?t=2239262
[Galaxy S I9000 Android Development] stratosk:
No you don't need to chmod the file and the permissions don't change.

About, your PM: yes, of course! (although, I'm bit late) :)

Thanks for your work.
[Galaxy S I9000 Android Development] deeppans:
I totally forgotten Fast charge feature ;)... Thanks problem solved
[Galaxy S I9000 Android Development] steevo_bass:
It's like he say
[Galaxy S I9000 Android Development] Drottnar:
Hi,

I have a problem with my SGS I9000. I'm using SlimBean, and I wanted to update the Semaphore kernel to the newset version. After updating, I have bootloop just after password screen shows up. I tried to reset kernel settings, wipe partition cache, wipe dalvik's cache but it didn't help. Even reinstalling the SlimBean didn't help. I wouldn't like to make a factory reset because I don't have all data backed up. Is there any way to run the system without factory reset?
[Galaxy S I9000 Android Development] jugster:
Try another kernel, older perhaps?

Signature? Signature!
[Galaxy S I9000 Android Development] Drottnar:
I have 2.9.15s but it didn't help.
[Galaxy S I9000 Android Development] grinder777:
bootloop just after password screen shows up?

Booting should be done then...

Don't think it's kernel related.

Reflash SlimBean should solve it at least...

Which version of SlimBean do you run? Maybe old 4.1.x?

SGS - Sema 2.9.20s - Xylon 0.2.3.3 - Cobalt Sam-X - Big Thanx2all
[Galaxy S I9000 Android Development] Drottnar:
Problem occured just after updating kernel that's why I think it's kernel related. I have 4.2.2.build.3 version of SlimBean and reflashing didn't help.
[Galaxy S I9000 Android Development] purpleraintoxicity:
have you tried to clear the dalvik and cache?
[Galaxy S I9000 Android Development] Sithhy™:
USB OTG

Hello. I bought today an USB On The Go cable and it won't work. I wanted to attach an wireless USB mouse from Logitech but with no success. I turned on the mouse support in Semaphore Manager too. I tried with a pendrive but nothing happened :/ Can someone help me? :(
[Galaxy S I9000 Android Development] 99x:
You need to attach it to a powered USB hub, i9000 does not supply any power
[Galaxy S I9000 Android Development] Sithhy™:
So why in Semaphore Manager is an option for powering usb mouse, keyboard and xbox pad?
[Galaxy S I9000 Android Development] Drottnar:
I have. OK, I just did the factory reset and it's ok now.
[Galaxy S I9000 Android Development] 99x:
It's not for powering, rather just the ability to use them (loading necessary modules probably)
[Galaxy S I9000 Android Development] stratosk:
New version 2.9.22

- Linux kernel 3.0.74

- CWM 6.0.3.1

- UHID implementation (thanks to pawitp and n8r for merging it to Semaphore)
[Galaxy S I9000 Android Development] Turtuga:
What is uhid???

Thanks
[Galaxy S I9000 Android Development] stratosk:
It's support for user-space HID (Human Interface Device) drivers.

n8r used this to connect bluetooth keyboard (or something).

For sure not everybody need this, maybe I will build it as module in next version.
[Galaxy S I9000 Android Development] idCyber:
Great job stratosk and ty. First Slim Bean 4.2.2 gets updated to build 4, now Semaphore JB Kernel gets updated to 2.9.22(s for me) :highfive: (checking calendar), is April 19 the new December 25 ? :P
[Galaxy S I9000 Android Development] jugster:
Some parts of the world celebrate Christmas on Christmas evening the 24th and not on Christmas day the 25th. Just saying :)

Signature? Signature!
[Galaxy S I9000 Android Development] pamarakos:
Why there are not so many great and often updates on sgs2 world?? :(

Just wondering...:(
[Galaxy S I9000 Android Development] Midomad:
Yes i really miss S1 Community!

Thanks Stratos and congratulation for you're new device :)

Envoyé depuis mon GT-I9100 avec Tapatalk
[Galaxy S I9000 Android Development] ryuzaki_eru:
Hi, i have CM 10.1 and i would like to know if this ROM has hugemem configuration or the way to add it in order to flash "s" version of semaphore. Thanks.

Inviato dal mio GT-I9000 con Tapatalk 2
[Galaxy S I9000 Android Development] alb3rtt:
Flash the s version and then flash the hugemem libs and reboot.
[Galaxy S I9000 Android Development] palera:
Yes, the easiest way is to install the semaphore app and there you'll have that option
[Galaxy S I9000 Android Development] superkoal:
Remember there's a difference between bigmem and hugemem!

you need libraries to use the s version. slim bean is already patched, for CM you need to flash them yourself.

you will lose support for a few rare used video codecs as far as i remember.
[Galaxy S I9000 Android Development] ryuzaki_eru:
What's the difference? I founded only a patch for CM 10.1 but i don't know if it's good for "s" version. How can i verify that?

Inviato dal mio GT-I9000 con Tapatalk 2
[Galaxy S I9000 Android Development] hepterci:
Flashing...

GT-I9000 cihazımdan Tapatalk 2 ile gönderildi
[Galaxy S I9000 Android Development] ryuzaki_eru:
And then?

Inviato dal mio GT-I9000 con Tapatalk 2
[Galaxy S I9000 Android Development] lerkin:
+1. Hate Samsung for their exinos abuse, making so many devs left sgs2.

My old sgs1 is still alive, my wife uses it.
[Galaxy S I9000 Android Development] alb3rtt:
What? He meant he is flashing the new version of semaphore. to activate hugemem 397mb w/720p recording working, flash semaphore s version, and then flash the huge mem libs (from August I think) and reboot. For 409mb ram but only 480p recording, do the above steps and go into semaphore manager and activate bigmem and reboot. Make sure to set recording in the camera app to 480p before rebooting or it will force close.
[Galaxy S I9000 Android Development] hepterci:
how to use otg without external power

Is it impossible?

Can we get the power from the battery in the phone to usb?

I do not have no sense of OTG with external powe

because of sell SGS,

SGS2 thinking of buying
[Galaxy S I9000 Android Development] ryuzaki_eru:
Done. Now, how can i see if 409RAM are really available?

Another question: what governor can i use in order to improving battery life?
[Galaxy S I9000 Android Development] alb3rtt:
Go to settings and then about and look at ram available.

For the governor, use ondemand with 95% up threshold and no smooth ui and no io is busy and no early demand for battery life.
[Galaxy S I9000 Android Development] ryuzaki_eru:
All done! Thank you so much!
[Galaxy S I9000 Android Development] Silentbob999:
SGS don't supply power on the usb.. You really need external power with this phone. (or a newer phone)

I buy an OTG cable and an little Hub with an power input last year but it's actually so useless that I did not even tested it lol

Envoyé depuis mon GT-S5830 avec Tapatalk
[Galaxy S I9000 Android Development] jugster:
How did you know it was useless if you didn't test it?

Signature? Signature!
[Galaxy S I9000 Android Development] pxrave:
because of you need power from external to use this feature ;)
[Galaxy S I9000 Android Development] jugster:
He did say he bought a hub with external power...

Signature? Signature!
[Galaxy S I9000 Android Development] dark_knight35:
Yes but the guy you quoted meant that the need of external power supply sucks and makes OTG... well, less OTG :)
[Galaxy S I9000 Android Development] Silentbob999:
Well.. The hub is useful on my old laptop that have very few too close usb port because the external power is amovible and optional... But for the use of OTG... The need of an OTG adapter, the hub and the cable to give power to the hub + a source of power make the OTG quite useless as very often the "power source" will be a pc.. Then why not using the pc to move the file of the usb key (if this was the goal)...

Envoyé depuis mon GT-S5830 avec Tapatalk