Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
Features / changelist:
I've recently got into possession of my own iPro2 photospectrometer so I revisited the calibration on my S4. To my surprise it was quite off from what Ryan had calibrated 1.5 years ago. Here's the results for the below calibration: http://imgur.com/a/wdDnX#0
For anybody interested/caring about colour accuracy, this would be new values you can setup in Synapse:
Chroma weight: 9 Red gain: 20 Green gain: 11 Blue gain: 15 Yellow gain: 19 Cyan gain: 10 Magenta gain: 9 Red: #FF131A Green: #55FF00 Blue: #1A1EFF Yellow: #FFEF08 Cyan: #2AF0FF Magenta: #EE00FF White: #FFF1F7
Perseus alpha19 (25/04):
- This reverts the INT and MEMIO, and decoupling logic of version 17.
Perseus alpha18 (02/03):
- Samsung 4.4 support.
- Auto-root, auto-deKnox, etc.
Perseus alpha17 (19/02):
DO NOT USE THIS VERSION IF STABILITY IS A CONCERN!
I got around having another look in the auxiliary voltage controls for the internal, memory interface and memory IO voltage planes; this is an experimental version having some non-insignificant changes.
The stock voltage driver on the 5410 has a weird design as the INT and MIF voltages are interdependent on each other. One cannot be too high or too low in relation to the other. The internal logic prevents a too high skewing of the voltage differences between the two. As to why this is is unknown to me. A hypothesis is maybe that because the 5410's clock plane on which the memory controllers and 2D accelerator reside in, is broken, that it needs some special voltage treatment.
The default driver has four different voltage tables for the internal voltage depending on the memory frequency, with a total of 44 internal voltage sets. Since is too much for reasonable tuning, I decoupled the two voltages planes again (As on the 4412 and 5420).
However this may bring:
- Instabilities due to the removal of this voltage sanitation.
- Instabilities due to the removal of the thermal compensation mechanisms in regards to MIF and INT.
- Increased power consumption due higher than default voltages in the settings I configured the single INT voltage plane to operate now in.
The advantages are of course that you now have complete voltage control of the chip. Depending on the stability of the new DVFS scaling, I may tweak it in the future, such as maybe lowering the default voltage table to one with lower voltages.
And for those who missed what INT/MIF/MEMIO is:
- INT (Internal) voltage is the voltage supplied to the internal auxiliary IP blocks, such as the hardware video decoders, the scaling blocks, the image signal processors, the display controllers, and the MMC controllers.
- MIF (Memory interface) voltage is the voltage supplied to the memory controller.
- MEMIO (Memory I/O) voltage is the voltage supplied to the memory chip's IO interface. Also known as VDDQ. Voltage is tied to the memory controller's speed.
You can find the download link yourselves.
Perseus alpha16 (13/02):
- Updated support for AOSP 4.4.
- 16.1: I messed up the 16 download links, it was actually the 15.2 package. Fixed.
Perseus alpha15.2 (04/12):
Updated ZRam to a faster implementation.
Updated CPU scaling logic for ondemand-sec.
Doubled the SD card MMC controller's memory bandwidth from 40mB/s to 80mB/s and enabled SDR104 UHS card modes.
Fixed Synapse not installing itself.
15.2: Stopped a service from limiting CPU max frequency and fixed power savings mode not working.
Perseus alpha14 (07/11):
This is a release for 4.3 onwards. 4.2.x is no longer supported, please refer to 12.2 for the last working version for 4.2.
This includes a partial merge with Samsung's sources, which include:
Updated GPU drivers.
Updated Wifi drivers include new packet filter rules for less network spam.
Updates sensorhub firmwares.
Updates modem drivers.
Better audio decoding on the SRP and block bypass for high quality audio, better frequency handling on the hardware level.
Batter impedance-dependant volume normalization (Headphones).
Small updates for all IP accelerator and function block drivers.
Better memory management; Migration and compaction are now enabled. The new LMK has a new mechanism for immediately freeing up memory for the ISP for faster camera start-up times.
Various other miscellaneous fixes.
The kernel runs with SELinux disabled. It does not contain any of the TIMA related patches. On Samsung ROMs, it will automatically disable the relevant build.prop entries for correct runtime.
The kernel will remove the main KNOX related APKs from the ROM by itself.
The kernel auto-roots Samsung ROMs.
AOSP 4.3 is supported.
Perseus alpha12.2 (17/10):
Updated to Linux 3.4.39 for compatibility reasons with the UNIVERSAL5420 trees.
Merged some things over from the Exynos 5420 tree;
- Replaced the hotplug mechanism in IKCS and Ondemand-SEC with a new standalone driver listening to screen on/off notifications.
- Updated IKCS mechanisms. I suspect this will also fix the "stuck" state on the A15 cluster.
- Majorly rewritten AMOLED controller driver.
- Enabled Non-cacheable streaming enhancement.
- More precise GPU utilization calculation.
I rewrote/exposed proper handling of power supply properties:
current_maxshows the currently applied input current limit as read from hardware.
current_nowshows the currently applied charge current limit as read from hardware.
current_avgshows the driver set charge current limit. I incorporated the readouts into the charge detection button in Synapse.
MHL currents are now exposed: There are 4 types of identifiable MHL charge sources, three distinct MHL classes (500, 900, 1500mA), and a USB class. Keep in mind if you have an MHL dongle then the type detection will either show SDP for the older dongles, or MISC for those fancy new ones, but the current limits are still separate from SDP and MISC. Input and charge currents are equal for MHL charging.
The updated panel drivers fixed the touchscreen problems with AOSP ROMs. This means you can use this now as a universal kernel.
12.1: Wifi and MTP fixes for AOSP ROMs.
12.2: Fixed not booting problem and touch-screen on first boot power-on for AOSP ROMs.
Perseus alpha11 (06/10):
Added multiple Quality of Service boosters to Synapse for configuring.
- Touchscreen booster
- Touchkey booster
- GPU QoS boosters
The various boosters control minimum CPU, memory, and internal block frequencies for each mechanism.
Added unstable power detection switch to the battery settings.
Complete disabling of unstable power detection. This simply ignores unstable power sources and leaves the input current limit at its set up value. This will fix charging problems people have been reporting, as long as the charging source indeed is able to provide the given currents. Use at the risk of frying your charger/charging port.
Perseus alpha10pre4 (30/09):
STweaks has been replaced by Synapse.
This is the first public release. I'm not interested in bug reports or things alike, I'm aware of them.
NOTE: There is currently no option to avoid setting the configurations on boot, so please be careful regarding boot-loops. If you do enter one, ADB into the device in recovery and delete
/data/data/com.af.synapse/*as a temporary measure.
pre2: Fixes Synapse crash for people who don't use SD cards (ramfs change)
pre4: Fixes mdnie-control switches like edge enhancement. Synapse updates with new functionalities (0.6)
Perseus alpha9 (20/08):
The controls give you access to several charging current limits whom which the charger chip (MAX77803) follows. In general, there are two different types of currents:
- The input current is the current flowing into the device through the USB port. This is a usual nominal 5V of voltage. This powers the whole of the device.
- The charging current is the current flowing into the battery from the charger chip. This is of variable voltage depending on the battery's state of charge between 3.4V to 4.3V.
Because the electric circuit between charger IC and battery is of a lower potential than the the input circuit of the phone, you may set up the charging current higher than the input current if you wish so.
The phone detects and differentiates between several different charging sources, depending on power source and cable types; you may find out which one the phone detects while having it connected and pressing the "Check power source" button in STweaks. The following sources are controllable:
- "Mains AC charger": All dedicated chargers plugged into the wall.
- "USB Standard Downstream Port": All standard legacy USB ports with data connectivity. Applies to most PCs. Usually limited to 500mA.
- "USB Dedicated Charging Port": Special purpose USB ports on modern PCs which deliver up to 1000mA.
- "USB Charging Downstream Port": Special purpose USB ports which deliver up to 1500mA.
- "USB Accessory Charger Adapter": Special purpose accessories with USB connections which may charge the device.
- "Miscaenellous power source": Any non-identifiable power source falls into this category.
- "Wireless Power Consortium charger": For wireless charging stations.
The charger chip has a built-in protection logic for "unstable power". This downgrades the input current in 100mA steps until a stable signal is achieved. For now, I will not remove this protection (As opposed to the S3 and Note2 charging controls). Be aware of it if your settings don't correspond the live values.
Perseus alpha8 (17/08):
- Moved to GCC 4.8.
- Ramdisk revamp (Maintenance and forward planning);
- CM compatibility added as multi-boot capability in the kernel. (Touchscreen still broken).
- Some redesign in terms of Busybox and new custom binary with bash extensions.
- exFat is now compiled from source instead of Samsung's modules.
- Negative toggle added (Thanks to sorg)
- Enabled in the screen settings in STweaks. Tap the menu button 4 times to toggle.
Perseus alpha7.2 (26/07):
Attempt to remove camera lag (Memory compaction disabled). Be sure to report further lags in Wanam's thread instead of mine.
Perseus alpha7.1 (23/07):
- Fixed A15 cores not being used with ondemand-sec.
- Some experimental changes to memory QoS.
Perseus alpha7 (20/07):
Added anti-smearing functionality to the screen controls due to popular demand.
i950X devices have an issue with the AMOLED controller in which, if individial pixels get power-gated for true black, they occur a latency delay when getting powered on again, resulting in a visible smearing effect.
Acts on the black RGB channel filters of the mDNIe engine to elevate pure black to a deep grey. Acts as single control; it acts as a luminosity addend to all greyscale colours in 0.39% steps.
A value of 3 or 4 should be satisfactory to remove the smearing.
Added a cut-off point under
/sys/class/misc/mdnie/black_increase_pointafter which the effect is not applied. I did not expose this in STweaks due to questionable usefulness.
Perseus alpha6 (15/07):
New notification LED controls:
- Enable fading in/out. Includes ramp timings, detention time, and blink delay.
- Any combination of the above are possible. A blink delay of zero will cause a constantly lighting LED.
- Comes pre-configured with a "breathing" effect.
- Brightness controls for low-light and bright environments.
- Ability to change the stock ROM notification colour without additional apps from userspace.
The new controls also expose the hardware capabilities of the new Texas Instruments LED controller; the implementation is interesting in its own way.
- Enable fading in/out. Includes ramp timings, detention time, and blink delay.
Fixed a bug where setting policy max freq inside of the A7 frequency "hole" would cause a crash.
Perseus alpha5 (11/07):
- A7 core overclocking up to 1500MHz. Configurable only via STweaks or
- Adjusted touch booster and other QoS locks to lower frequencies.
- Disabled ZSwap until further notice due to random crashes and suspected battery drain.
Perseus alpha4 (04/07):
- GPU overclocking and voltage control.
Controls to be found in STweaks or alternatively via
/sys/devices/platform/pvrsrvkm.0/. There is no minimum frequency because userspace drivers are dynamically changing the min frequency depending on scenario. 267MHz is minimum for 2D work for better efficiency and race-to-idle as the whole GPU gets power gated during runtime. The 267MHz step is also special as it has its own separate fixed voltage (900mV), during 2D work, if the GPU never switches DVFS state, it will never change this voltage and undervolting will have no effect.
Before anybody asks why 480MHz is the default max clock, I've already discussed and explained it here.
- Disabled GPU CPU QoS requests (CPU min locked at 600MHz virtual on => 480MHz GPU).
- Updated ISP kernel drivers. Camera libraries should be updated to => MF3 versions. Here's a CWM for the reverse-fix.
- Added ZSwap to the kernel with a VNSwap device, uses Snappy compression instead of LZO. Configurable via STweaks.
- Added improved Android-style lowmemorykiller logic.
- Various miscellaneous changes from updated sources can be viewed here.
Perseus alpha3.4 (24/06):
Sound control (part five):
New tuning for the speaker:
New frequencies are:
- Band 1: 160Hz cutoff, +12dB gain
- Band 2: 500Hz center, 1050Hz bandwidth, -9dB gain
- Band 3: 2800Hz center, 2200Hz bandwidth, 4dB gain
- Band 4: 7600Hz center, 4500Hz bandwidth, -10dB gain
- Band 5: 20000Hz cutoff, 0 dB gain
Speaker tuning now applies a -3.5dB offset on the digital volume of the DAC as to compensate equalizer added volume and have generally equal volume to the default settings.
Added headphone mono mode.
Added speaker privacy mode. This avoids simultaneous output of audio through headphones and main speaker; the speaker forcefully remains disabled/idle (Includes alarms!) whenever there are headphones attached.
This should be the last version completely concentrating on bringing up the audio controls. Instead of just talking and tweeting about it; the kernel now includes and makes available the vast majority of the practical audio enhancing features exposable on the WM5102.
Among things that are left to be done, is to revisit dynamic range compression for audio recording and eventual saturation prevention for speaker and headphones (HP part already possible via sysfs), both which will take more time for calibrating.
Perseus alpha3.3 (22/06):
- Sound control (part four):
Speaker equalizer and tuning. I did not expose the speaker equalizer settings via STweaks, but as always, they can be found under
Speaker tuning: I configured this within my limits and within what the speaker is physically capable of, the frequency reponse has been altered as follows if you enable speaker tuning:
I'm happy with the settings but will consider inputs from other people. The tuned speaker frequency bands are:
- Band 1: 160Hz cutoff
- Band 2: 740Hz center, 1900Hz bandwidth
- Band 3: 2800Hz center, 2200Hz bandwidth
- Band 4: 5300Hz center, 4000Hz bandwidth
- Band 5: 4000Hz cutoff
Equalizer frequency controls under
/sys/class/misc/wolfson_control/eq_sp_freqs. This is for advanced users who want to configure the bands via WISCE.
Perseus alpha3.2 (21/06):
- Sound control (part three):
- Fixed deep sleep problem.
- Introduced power management for equalizer and DRC.
- Added dynamic range compression. For now configurables are only available via sysfs.
Perseus alpha3.1 (19/06):
- Sound control (part two):
- Fixed volume on notifications while on headphones. The headphones volume controls now affect only media playback, and keep the default system values for anything else (Notifications, calls, VOIP).
- Hardware equalizer support. This is a 5-band on-chip digital equalizer. Controls are exposed in STweaks. Band frequency control will be implemented in the next iteration.
Perseus alpha3 (18/06):
- Sound control (first iteration)
- Includes volume controls for headphone, earpiece and speaker. I also have exposed the dock volumes but can't test that one since I don't have a dock.
- System interface is the same as my controls on the S3/N2 kernels:
Perseus alpha2.1 (14/06):
- Screen calibration for the master profile: Detailed Calibration Report. Credits go to Slimer777 for the good work.
- I removed all non-essential screen controls from STweaks. Frankly, nobody seems to care or use them.
- Reverted a change that caused random reboots for some people.
Perseus alpha2 (10/06):
- CPUIdle patches to the menu governor to allow for higher residency times in deep C states.
- Enabled multi-core aware scheduling.
- Added ROW io scheduler and made as the default setting.
- Read-ahead for internal and SD increased to 256kB respectively 1024kB.
- mDNIe colour and effect controls:
The controls work now on two levels: First we have a master sequence that overrides any and all of Samsung's settings; currently this version is released with an eye-balled calibration based to my calibrated S3. However in the next minor version it will be updated with proper professional screen calibration.
The master sequence works as as the calibrated base; for people not wanting to bother further with any more controls, you simply enable this and you're done.
Second part is the register hook, it catches effect values and modifies them by applying delta values available as controls in STweaks and in /sys/class/misc/mdnie/hook_control/.
Leaving both these options will give you Samsung's default values.
The register hook, while used on Samsung's profiles, is not capable to alter effects which are not integrated in that screen profile's value sequence, the "Movie" profile for example lacks some effects present in the "Dynamic" profile. The same is valid when having different scenarios, the "Camera" scenario will use different effects in its base than the "UI" scenario. To fully explore all possible effects, use the Master profile as it integrates all effect values known.
Digital edge enhancement - An edge enhancement effect. What we previously called "sharpening". Divided in controls for radius, amount and threshold. Read the Wikipedia page for more information. More advanced controls found in the sysfs under the de_ prefix.
Chroma saturation control.
The SCR controls are colour channel filters working on the Red, Green, Blue, Yellow, Cyan, Magenta, White, and Black channels. Imagine the controls as manipulating the corners of the RGB cube:
By controlling the RGB coordinates of each corner/channel we can mould the cube into a different shape. At the same time the cube is projected onto a hexagon; the perimeter of the hexagon represents the colour hue, the radius of the hexagon from the middle represents chroma. We can use the chroma saturation controls to "push in" each corner of the cube, while moulding the corner's directions with the RGB controls. The RGB coordinates can be transformed into the HSL space space if needed, however I didn't include this function yet as I don't feel the need for it.
STweaks has controls for the RGBYCMW channels, the K (Black) channel I left out because it makes no sense in altering it, but can be found in the sysfs folder.
Additionally to the controls exposed to STweaks, there are several other effects and modifiers exposed in the sysfs interfaces. This also includes the gamma curve controls for levels 0-255 in steps of 16.
mDNIe digital brightness reduction:
You can now lower the brightness to basically nothing via this: it uses the mDNIe engine to digitally remove luminance from the RGB channel values, as opposed to reducing brightness via a proper backlight/display driver. The side effect of this is that you lose colour resolution somewhat, but is a practical and working method to reduce the too bright minimum values of our displays.
You have three configurables:
A reduction rate which you want to apply, this is the intensity of the darkening you want to achieve.
The take-over point; the backlight driver gets fed brightness values from 0-255 (In reality values below 20 have no effect). The take-over point is the point where the digital brightness reduction starts, on a reverse scale. The reduction is applied linearly from 0, (Full reduction taking place), to the take-over point (Zero reduction). The stock slider doesn't go below 20 in the interface, so practically the full reduction rate is never applied unless you use a third-party brightness controller app, just to keep that in mind, but in practice it doesn't matter.
Auto-brightness input-delta: This is needed because the stock framework is retarded in the values it forwards to the kernel, you can adjust this to avoid having brightness reduction when you don't want it on auto-brightness.
Somebody needs to edit config_autoBrightnessLevels, config_autoBrightnessLcdBacklightValues in framework-res.apk\res\values\arrays.xml to fix this.
Optionally, if you use a third-party app like Custom Auto Brightness which allows backlight values of down to 0, you can avoid this problem. The register hook needs to be enabled to be able to use this function.
Perseus alpha1 (09/06):
This is a clean kernel glued together upon Samsung's last public branch of android-exynos-3.4 with sources provided by the OSRC releases. The OSRC release has been stripped clean of all non-i9500 related code and sourced, as much as possible through the original patches.
WFI residency down to 5 from 1000µS.
Wifi drivers modified to allow only unicast and mDNS traffic through, this should fix battery draining on dirty networks.
Variety of hotfix patches from upstream updated to their final forms.
NFS (in-kernel), CIFS, NTFS (as modules) supported.
- Supports legacy applications via UV_mV_table interfaces such as SetCPU. Remember that frequencies lesser or equal 600MHz are on the A7 cores and are represented as half of their real speeds.
- STweaks support and UV_uV_table interface: Displayed with their real frequencies and proper fine-grained voltage control support. The power-management IC on the i9500 supports voltage buck regulators in steps of 6250µV (6.25mV).
- A special characteristic to keep in mind on this chip: Voltage is also temperature controlled, in a "cold" state the displayed voltages are applied. In warmer circumstances, 75mV is added to the values.
The colder a silicon IC is, the better are its electrical characteristics and it requires less voltage. This mechanism takes advantage of this physical trait to apply less voltages in cold states.
Overclocking support up to 2000MHz on the A15 cores.
Samsung cheats during benchmarks by enabling a thermal boost mode which raises the throttling temps by 10°C (90° -> 100°C). I disabled the permissions to this. Practical effects is things like Antutu will give lower scores. This is more realistic of actual performance and I will leave it as such. Benchmark freaks can enable the boost mode manually: