[Lenovo A7000 ROMs, Kernels, Recoveries, & Other De] tanish2k09:
Note :

This thread is not the kernel thread. This thread is about the Poison governor in my venom kernel​

-- And btw happy diwali to my good friends and users :D

Intro :

--->Poison is a governor made by me specifically for this device (A7000-a or aio_row)

--->Poison is based on ThunderX governor

--->Poison has maximum optimisation for this device

--->Poison has amazing performance on this device

--->Poison provides amazing battery backup (based on ThunderX)

--->Poison has many additional features

Features :

--->Made for A7000 specifically in mind

--->Most optimised governor for A7000

--->Has custom tuneables for various operations

--->Has support for dynamic frequency scaling modes

--->Has support for dynamic frequency scaling mode engine

--->Has sysfs tuneables linked to it for easier accessibility

What is a "Tuneable"/"Tunable" ?

--->A tuneable/tunable is any variable/value which controls the behaviour of certain things. What a tuneable does is coded by the maker of the tuneable.

How to change a "Tuneable"/"Tunable" ?

--->It's really easy! Install a kernel-editing app like "Kernel adiutor" from play store and you will have all options in it...

How to change a "Tuneable"/"Tunable" in poison governor?

1) Read above question. Below instructions are for "kernel adiutor".

2) Open the app.

3) Go to "CPU" section (in the sidebar menu or whatever you call that thing).

4) Choose "Poison" governor from the list of CPU governors. Ignore if already set.

5) Tap on "CPU Governor tunables".

6) You will now have a list of available tuneables of my governor.

7) Edit them to your preference.

NOTE : DO NOT TOUCH THE BELOW LISTED TUNEABLES UNLESS YOU KNOW WHAT YOU'RE DOING !

Which "Tuneables"/"Tunables" should be left untouched in poison governor (if you are new) ?

1) debug_mask

2) down_rate_us

3) max_cpu_load

4) min_cpu_load

5) ramp_down_step

6) ramp_up_step

7) sample_rate_jiffies <-- This one even I don't dare editing

8) up_rate_us

Tuneables Added by me :

--->Tuneable for controlling haptic feedback on dt2w

--->Tuneable for controlling Wifi power management modes

--->Tuneable for controlling frequency mode

--->Tuneables for fine-tuning the frequency mode behaviour

--->Tuneable for enabling/disabling dt2w input from capacitive buttons at the bottom

--->Tuneable for enabling/disabling pocket mode (accidental wakeup prevention in pocket)

--->Tuneable for controlling which area of the screen triggers dt2w (x,y co-ordinates)

--->Tuneables for many more things also. A total of 21 custom tuneables! Below they are explained.

Tuneables (only necessary ones) working + explanation :

1) MODE :

Function : This tuneable is for dynamic frequency handling.

Values + what does what :

---Mode 1 (Optimized/Default mode)---

The default mode. Best for normal users who only browse and use social apps etc... It has good screen-on performance and usually stays around 1.1Ghz CPU freq. Will move higher depending on load.

---Mode 0 (low mode) (battery-friendly)---

Makes available to the governor only the values less than "mode_low_freq" (936MHz by default) to keep power consumption low while also allowing considerable background work to occur. When screen is off, it will stay at 468Mhz to save power if no wakelock is requested.

---Mode 2 (high mode) (performance-based)---

The opposite of mode 0. This mode makes Makes available to the governor only the values above "mode_high_freq" (1287MHz by default). Recommended for gamers and heavy multitaskers.

NOTE : Slightly more battery use.

---Mode 3 (min-max mode) ("extreme" behaviour)---

Remains only on 468Mhz and 1495Mhz values, or the min and max frequencies set by user.

---Mode 4 (mid mode) ("ready" behaviour)---

Fixes the CPU frequencies to the value of tuneable "mode_mid_freq" (1170MHz by default)

2) MODE_LOW_FREQ :

Function : This sets the limit to which frequencies can go in Mode 0 (battery-friendly)

3) MODE_HIGH_FREQ :

Function : This sets the limit to which frequencies can drop in Mode 2 (performance-based)

4) MODE_MID_FREQ :

Function : This sets the fixed frequency in Mode 4 (ready behaviour)

5) SLEEP_IDEAL_FREQ :

Function : This is the frequency which will be usually used when phone is in sleep mode.

6) SLEEP_WAKEUP_FREQ :

Function : This is the frequency which will be bounced when a wakelock/wake command is requested.

7) AWAKE_IDEAL_FREQ :

Function : This is the frequency which will be usually used when the phone is active

8) VIB :

Function : If dt2w is enabled, you will feel a vibration on dt2w. This tuneable changes the extent of that vibration.

Value : The value is in milliseconds, so 1000 means phone will vibration for 1 second on dt2w.

9) DT2W_ON_BUTTONS :

Function : If dt2w is enabled, this will enable/disable dt2w on the hardware capacitive keys.

Value : The value is a bool (only 0 and 1). 0 means dt2w from buttons is disabled. 1 means opposite.

10) WIFICUSTPOWERMODE :

Function : It controls that behaviour of wifi networks.

Value : It can take three values. "2" means full speed wifi, may use more battery. "1" means more battery, on cost of speed. "0" is a value even I don't understand. Default value is "2".

11) X_LEFT :

Function : Dt2w will only trigger from the part of touchscreen on right side of this co-ordinate.

Value : Default is 0, can be set upto 720, or X_RIGHT (whichever comes first)

12) X_RIGHT :

Function : Dt2w will only trigger from the part of touchscreen on left side of this co-ordinate.

Value : Default is 720, can be set upto 0, or X_LEFT (whichever comes first)

13) Y_UP :

Function : Dt2w will only trigger from the part of touchscreen below this co-ordinate.

Value : Default is 0, can be set upto 1280, or Y_DOWN (whichever comes first)

14) Y_DOWN :

Function : Dt2w will only trigger from the part of touchscreen above this co-ordinate.

Value : Default is 1280, can be set upto 0, or Y_UP (whichever comes first)

NOTE : Using the combined co-ordinates of X_LEFT, X_RIGHT, Y_UP, Y_DOWN (which makes a square), you can define the part of touchscreen which triggers dt2w. Also note that the default values (0,720,0,1280) make the whole touchscreen, so by default whole touchscreen can react to dt2w.

15) REVERT_DT2W_AREA_BOUNDED_BY_XY :

Function : This tuneable gives its function from it's name. This tuneable reverses the area for dt2w bounded by the co-ordinates.

Values : This is a bool (only 0 and 1). On "0" value, it means off. So dt2w will work only from the area bounded by x_left,x_right,y_up,y_down. On "1" value, this tuneable will activate and dt2w will work only from the area NOT bounded by x_left,x_right,y_up,y_down (on touchscreen only). This tuneable affects only touchscreen dt2w. Note that this value doesn't affect the "dt2w_on_buttons" tuneable. Default value is 0, means dt2w will only function in the area bounded by the co-ordinates.

16) POCKET_MOD_ENABLED :

Function : This tuneable enables/disables pocket mod (accidental proximity wakeup). This should be disabled in ROMs with proximity wakeup support like RR by [MENTION=5138268]Rohan Taneja[/MENTION] and all vibe roms. This should be kept enabled on all other ROMs.

Values : This is a bool (only 0 and 1). On "0" value, proximity sensor check is disabled from kernel. ROM proximity check will still work. On "1" value, proximity check is enabled and screen won't wake up if proximity sensor is covered. This might conflict with proximity checks of ROMs... (advanced : ...but the workqueue should handle everything, thus eliminating conflicts, but using double power for same thing on every wakeup call)

17) AC_CHARGE_LEVEL :

Function : Sets the maximum limit of current level while charging with ac.

Value : Can be from 1500000 to 2500000

18) USB_CHARGE_LEVEL :

Function : Sets the maximum limit of current level while charging with usb.

Value : Can be from 900000 to 1500000 (maybe. I don't remember)
​

I hope this guide to use the POISON governor properly was of great help to you.

If you have any questions regarding ONLY poison (NOT venom) then post on this thread. Non-sense/Noob questions will be ignored.

If you like my work, please consider donating to me.

If you want to donate, please contact me via private message on xda, or mail me (tanish2k09.dev@gmail.com) and simply type "I want to donate to you" or something like this.

XDA:DevDB Information

Poison governor, Tool/Utility for the Lenovo A7000

Contributors

tanish2k09, Those who made linux, ThunderX CPU gov devs, those who made all the stuff my tuneables point to, Rohan Taneja for giving support, HDHR for starting me off in development

Source Code: https://github.com/tanish2k09/Venom-Poison_cpu_governor_aio_row/

Version Information

Status: Stable

Current Stable Version: 2.0.

Stable Release Date: 2017-10-19

Created 2017-10-19

Last Updated 2017-11-13