[LG Optimus 2x] pengus77:
Change Log and How-Tos

Change Log

100p5 - 2013/03/03

* Fix derp in voltage table​

100p4 - 2013/03/02

* OC to 1.2GHz max

* Re-introduced the ability to modify the voltage table

* Global kmsg cleanup. Removed tons of useless/annoying debug messages

* OC code refactor and fixes. Thanks to Tonyp for finding the AP20 tech docs :)

* Fixed max suspend frequency race condition

* Disabled async compaction in the new lmk. Really not playing nice with the 3.4 code

* tspdrv (vibrator) code cleanup and fixes. Hopefully no more "dildo bug" :p

* Lots of 3G modem related fixes and introduction of the idle mode during runtime and suspend
​

100p3 - 2013/02/19

* Fixed Dynamic Fsync code and added reboot/shutdown forced flushing of buffers

* Added Max CPU Frequency when screen is off

* Fixed wifi suspend issues​

100p2 - 2013/02/16

* Disabled OC for releases

* 1st attempt to fix wifi hang upon resume

* Probable fix for excessive wifi drain when ap is out of range

* Support for Faux123 Dynamic Fsync​

100p1 - 2013/02/13

* Fixed USB Mass Storage freezes

* Fixed audio input not working on some phones​

100 - 2013/02/12

* Added OC possibility (thanks to wkpark for the initial patch and to civato for pushing it to github)

* Tweaked the voltage values and enabled a bit of 2d OC

* Fixed the slow charge bug on the old bootloader

* Aligned USB Fast Charge code between old and new bootloaders

* Enabled EMC scaling aligned with the cpu speed

* Enabled RTC (Real Time Clock) support for the battery monitor

* Added fsync control from sysfs

* Added async memory compaction to the lmk

* Locked min cpu speed when using camera (snappy !)

* Tweaked a bit the interactive governor presets

* CPUs unaligned access

* Various patches to the lmk

* Various fixes to the voltage regulator

* Tons of patches to the android binder

* Tons of patches to the linux memory management

* Tons of patches to ext4

* Tons of patches to the mmc host​

011p4 - 2013/02/03 - Bugfixes and some goodies

* Backported OnDemand governor from kernel 3.2

* Added Boost Pulse support in the kernel for Interactive and OnDemand governors

* Added tegra.power.so blob to the installer

* Optimized CFQ and BFQ schedulers

* Fixed shutdown crash

* Fixed USB fast charge on the old bootloader

* Updated Kowalski Manager to the latest version​

011p3 - 2013/01/28 - Bugfixes Release

* Fixed wifi parameters persistency

* Fixed USB fast charge on the old bootloader

* Reverted "disable aio" commit that was causing lousy sdcard r/w speeds and some lag

* Updated Kowalski Manager to the latest version (with icon !)

* Tweaked the LMK values a bit​

011 - 2013/01/26

*Added USB Fast Charge mode

*Net: Various ipv4 related fixes from kernel 3.4

*Wifi: Lowered default dBm of the wifi card to 19dBm (<3 my health)

*Wifi: Raised scan time for wifi from 3s to 8s (<3 my battery)

*Wifi: fixed compatibility between 10, 10.1 and ICS

*Wifi: fixed battery drain

*Wifi: removed background scan (let Combo Scan do the job)

*Row: Multiple patches from 3.4

*Row: Implemented urgent requests (speedy gonzales style)

*Disabled LG FOTA crap in muic (and hopefully autofix some bugs)

*Disabled android compaction process (let's have the new awesome lmk do the job)

*Modified kernel entropy generation (the new black apparently)

*input: monotonic input events (fasteeeer, i said faaaaaaaster)

*increased slightly timers ticks/second (oh, this is going to be felt a lot)

*gpio timers from kernel 3.8

*android logger from kernel 3.8

*prepared makefiles for gcc 4.7.X (the next step)​

010 - 2013/01/19

*Added the possibility to change leds brightness from userspace (sysfs)

*Simplified kernel flags, removed useless bloat, smaller kernel

*Backported the lowmemorykiller from kernel 3.4

*Unified wifi driver for compatibility with cm10, cm10.1 and ics

*Disabled the cpu boost when connecting usb (badly done by nvidia)

*Compiled Zram as a module, installed a init.d script to enable it

*Moved from lzo to google's snappy as compression for zram

*Fixed a couple of regressions from nvidia kernel 2.6.32 linked to bsods when suspending/resuming

*Switched to Interactive as default governor. Seems snappier for now with the latest version

*Enabled low level kernel tegra irq timers

*Added all the TCP Congestion Algorithms available in the kernel

*Backported from kernel 3.4 the latest patches for

- ROW I/O Scheduler

- Interactive Governor

*Backported from kernel 3.4 the BFQv5 I/O Scheduler

*Tons of patches from upstream related to

TCP Networking

ARM suspend/resume and smp routines

USB memory corruption and possible lockups

Kernel Timers

009p1 - 2013/01/13

* Disabled tegra cpu frequency locking

* Added a small cpu boost when usb cable is inserted [ may prevent bsods ]

* Added one more wifi interface to sysfs [ wake_pm (bool) to set PM_FAST/PM_OFF when screen on ]

* Re-enabled the conservative governor

* Updated toolchain to a more optimized one

* Compiled with "graphite" flags for a bit more kick

* Fixed the LMK so it doesn't kill kernel threads​

007 - 2013/01/13

* Full changelog that lead to this release in my CM10 thread at the second post​

How-Tos

Change the default TCP Congestion Algorithm

To see what algorithms are available you can, in a terminal/adb console, type: "sysctl net.ipv4.tcp_available_congestion_control"

To change the default congestion algorithm, type: "sysctl -w net.ipv4.tcp_congestion_control=one_of_the_names_that_came_out_before"​

Change the Wifi Power Management modes

In a terminal/adb shell navigate to /sys/kernel/wifi_pm.

You can change the high power management setting by typing: "echo 1 > max_pm" to enable it, or "echo 0 > max_pm" to disable it (cam / psp modes).

This setting will enable/disable the PSP power saving mode when the phone is asleep. Be careful, not all the routers are happy with it.

You can change the awake (screen on) power management setting by typing: "echo 1 > wake_pm" to enable it, or "echo 0 > wake_pm" to disable it (off / cam modes)
​

Change the leds brightness

In a terminal/adb shell navigate to /sys/class/leds/star_led.

You can change the high value setting by typing: "echo XXX > max_brightness" to modify it, where XXX can be a value between 0 (off) and 255 (max).
​

Change WiFi TxPower

Interestingly enough, Broadcom/LG decided that they want us all dead in a very short time so they set the default txpower of the wifi chip to 32dBm (that's a whopping 1.6 Watts in power). Considering that the US FCC sets a top limit of 30dbM/1W for antennae and that the EU sets a max power of 20dBm/100mW for consumer products, i'd say that Broadcom and LG are quite some nice companies... also wonder how they went past controls with this one...

Anyway, i packed a flashable zip that will install the "iwconfig" and "iwlist" binaries to /system/xbin in your phone. After flashing this one you can, from a terminal, modify the txpower value in real-time depending on your needs (if at home 5 mts from the router, or in a park 100 mts from the access point). For now a binary, soon an apk to handle this, so bear with me and wait :)

You can download the package from here :)

To check the current txpower value

su
iwconfig wlan0

To set the new txpower value

su
iwconfig wlan0 txpower XX (where XX is the value in dBm)

On this link you can find a W -> dBm conversion table that might come in handy ;)

Side notes: 1) To use iwconfig your wifi must be on and 2) When you turn it off/on or reboot, the setting will be reset to 32dBm for now.
​

Alsa Mixer

There ya go, for all of you a little deaf that love some real crackling from your phone's speakers :D

Packaged in a nice cwm flashable zip (alsa_mixer.zip) that you can find here is a collection of binaries that will be installed in /system/xbin and that will allow you to alter a bit the volumes of your phone. Of course you'll have to slap the values that you like in an init.d script once you find them, or they won't persist on reboot.

For example, to boost a bit the speaker volume, you can type: alsa_amixer sset "Speaker" "60" (max is 63) and to see the current setting you type: alsa_amixer sget "Speaker"

I suggest that you look into the alsa_amixer help and experiment a bit with the values. You can't break anything, and a reboot will reset all the values to default ;)
​

-