62 Commits

Author SHA1 Message Date
EmanuelCN
545eaf2768 sapphire: rootdir: Move KGSL and MSM_DRM to cores 6 and 7
By putting them on the bigger cores, they can be processed quicker,
resulting in improved responsiveness.

Change-Id: I13e710c94ff80cb5a044547989bda9a56d94b9e7
Signed-off-by: romgharti <romgharti@gmail.com>
2024-09-12 02:13:46 +06:00
chrisl7
113bc47509 sapphire: rootdir: Give thermal profiles permissions
05-01 19:34:36.590 W/binder:2826_4(2826): type=1400 audit(0.0:3287): avc:  denied  { write } for  name="sconfig" dev="sysfs" ino=65252 scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=file permissive=0
05-01 19:34:36.594 W/FileUtils(2826): No such file /sys/class/thermal/thermal_message/sconfig for writing
05-01 19:34:36.594 W/FileUtils(2826): java.io.FileNotFoundException: /sys/class/thermal/thermal_message/sconfig: open failed: EACCES (Permission denied)

Change-Id: Ie22a96daf93288eefa65e469487bd914c105d7cd
Signed-off-by: NikitaSavc <micraftur@gmail.com>
2024-09-09 19:14:25 +06:00
NikitaSavc
b360ce4179 sapphire: rootdir: Drop legacy init.qcom.post_boot.sh
* It's not using for 5.4/5.10/5.15 QCOM kernel family

Change-Id: I4d165a95f597df47f4d2ec07199b5dac0a347b61
Signed-off-by: NikitaSavc <micraftur@gmail.com>
2024-09-09 19:14:10 +06:00
RJ RAIJIN
46557a2887 sapphire: Fix qti_power_hal
* This fixes the following logspam:

E/ QTI PowerHAL: Failed to acquire lock for hint_id: 1040
E/ QTI PowerHAL: Failed to acquire lock for hint_id: 1041
E/ QTI PowerHAL: Failed to acquire lock for hint_id: 10A5

Change-Id: I03746ea83251d8b731afb8d307526d15320c3cf9
Signed-off-by: artemscine <artempemine@gmail.com>
2024-09-09 01:34:21 +06:00
Martin Liu
57c1c592cd sapphire: ZRAM aggression to 60
- Add swappiness to 60

Test: boots with correct settings
Bug: 299975853
Change-Id: I623a7687ef692f8f7a5cc906e186edde294b30be
Signed-off-by: Martin Liu <liumartin@google.com>
2024-09-08 18:45:45 +06:00
Akash Srivastava
c3326798b6 sapphire: rootdir: Drop input boost
* This resulted in some battery saving without the loose of performance. Boosting is being handled kernel side anyways
2024-09-08 19:09:36 +06:00
angelomds42
0c73f92c7e sapphire: rootdir: Boost uclamp on init
ref:[https://android.googlesource.com/device/google/gs201/+/refs/tags/android-14.0.0_r74/conf/init.gs201.rc]

Signed-off-by: angelomds42 <angelomds42@gmail.com>
2024-09-08 18:57:00 +06:00
Jaegeuk Kim
9eef94f147 sapphire: fastab: set readahead_size_kb=128 to partitions
This can avoid memory pressure.

Bug: 181567573
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I654c4d3bf24fa741c3fb0255431a26d8dcf5f153
Signed-off-by: Kajal4414 <81718060+Kajal4414@users.noreply.github.com>
Signed-off-by: angelomds42 <angelomds42@gmail.com>
2024-09-08 18:38:40 +06:00
SVB
9462fff85f sapphire: rootdir: Allow all filesystems for USB-OTG
Signed-off-by: kajal4414 <81718060+kajal4414@users.noreply.github.com>
Signed-off-by: angelomds42 <angelomds42@gmail.com>
2024-09-08 18:24:06 +06:00
EmanuelCN
800e2d8df2 sapphire: init: rm package cache on early boot
* Because Android won't do it on a dirty flash so certain elements will be broken if something is changed in UI.

Signed-off-by: Gustavo Mendes <gusttavo.me@outlook.com>
Change-Id: I611d082319c1d90b2a133e207516d5a2e9a33512
Signed-off-by: angelomds42 <angelomds42@gmail.com>
Signed-off-by: kibria5 <mdkibria687@gmail.com>
2024-09-08 18:21:58 +06:00
Vishalcj17
3991c2a89d sapphire: rootdir: Change CPUSets according to trinket
- In my testing, this caused less jank and killed lags on
  system background processes like ScreenRecorder without causing
  higher power consumption.

[angelomds42: Reduce background tasks to 2-3]

Change-Id: I0068a2c1f26da8ec77f2854100a8c95b70c94be3
Signed-off-by: angelomds42 <angelomds42@gmail.com>
2024-09-08 18:16:41 +06:00
Mohammad Kibria
71901f4e4d sapphire: fstab: Remove erofs unnecessary entry 2024-09-08 17:35:11 +06:00
Paul Crowley
5d5e833453 sapphire : Remove wait_for_keymaster and all references
No longer needed now init listens for property changes on a
separate thread.

Bug: 186580823
Test: Cuttlefish boots successfully
Change-Id: Ief3a546d2154231d18957c2f703bd128966d7288
2024-09-07 22:00:58 +00:00
chrisl7
3bd6820bc1 sapphire: rootdir: Configure zram 2024-09-05 17:02:25 +06:00
Danny Lin
4464981168 sapphire: rootdir: Disable native stats collection service
When opening and closing activities in Settings, a measurably
significant amount of CPU time is spent processing and logging stats
events in statsd:

0.02%     /apex/com.android.os.statsd/lib64/libstatspull.so                                                                                         @plt
0.01%     /apex/com.android.os.statsd/bin/statsd                                                                                                    @plt
0.01%     /apex/com.android.os.statsd/bin/statsd                                                                                                    SocketListener::runListener()
0.01%     /apex/com.android.os.statsd/bin/statsd                                                                                                    android::os::statsd::LogEvent::parseBuffer(unsigned char*, unsigned long)
0.01%     /apex/com.android.os.statsd/bin/statsd                                                                                                    android::os::statsd::LogEvent::parseAnnotations(unsigned char, int)

Over longer device uptimes with real-world usage, statsd uses a
substantial amount of total CPU time. We have no use for the stats
recorded by statsd, so disable the service entirely to save CPU in
potential hotpaths.

Test: simpleperf record -a; verify that statsd no longer appears in
      sample hits
2024-09-05 02:03:48 +06:00
Jake Weinstein
49bf17fca5 sapphire: rootdir: Disable multiple kswapd threads
https://lore.kernel.org/lkml/20180403133115.GA5501@dhcp22.suse.cz/

Change-Id: Ifc72726ad3c44bc0838d78031f70971f0677cd0e
Signed-off-by: Alexey Shelby <shelbyhell@proton.me>
2024-09-05 02:03:48 +06:00
Adithya R
858a1ec7e9 sapphire: rootdir: Dynamically set IRQ affinity for KGSL and MSM_DRM
- Introduce a new shell script to set IRQ affinity, since different
  kernels can have different IRQ numbers.

Change-Id: I61d2350e6b40f096714148c568489579bc4d2371
Co-Authored-By: Alex Naidis <alex.naidis@paranoidandroid.co>
Co-Authored-By: Jake Weinstein <jake@aospa.co>
2024-09-05 02:03:48 +06:00
Jake Weinstein
e0ff20d4ac sapphire: perf: Do not balance msm_drm and kgsl_3d0 IRQs
These are critical for display performance and should not be balanced
in order to improve latency and responsiveness.

After unbalancing, move these IRQs to separate cores
to improve latency.
2024-09-05 02:03:48 +06:00
Prabhanjan Kandula
7808e0b8fc sapphire: rootdir: Avoid delay for vblank disable from DRM
Set drm_vblank_offdelay parameter to -1, to make DRM
issue the vblank disable immediately with out delay.
By defailt  the DRM framework has a delay of 5 secs
timeout before issuing the vblank disable.
2024-09-05 02:03:48 +06:00
chrisl7
612ce5258c sapphire: rootdir: Add xiaomi perf changes 2024-09-05 02:03:45 +06:00
Jeferson Oliveira
ab43925309 sapphire: rootdir: Restrict apps access to /proc/net/unix
* Banking apps read the file /proc/net/unix to
  check system modifications, (in our case, custom rom)
  Let's avoid this by chmod it 440.

Test: Install a banking app as of Brazilian Nubank or PicPay, login.
Observed no side effects on any other proccess or apps

Change-Id: I12a356b7fe827ee005848108e2075534c7ec91bc
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
2024-09-02 18:31:03 +06:00
kamikaonashi
fba0be0b08 sapphire: rootdir: Give permission to restricht_chg
Co-Authored-By: Tofu <ralph950412@gmail.com>
Signed-off-by: kibria5 <mdkibria687@gmail.com>
2024-09-01 14:13:16 +06:00
Jens Reidel
2347f17fd2 sm6225-common: rootdir: Enable mgame mi_thermald mode
Out of all the modes that run the CPU at advertised speeds without
underclocking, mgame has the most conservative thermal limits.

Change-Id: I491f608a7be5c9497c70b3e49501d7abf58a980c
2024-08-31 16:41:10 +06:00
Sebastiano Barezzi
f682793d07 sm6225-common: rootdir: Drop debugfs stuff
Change-Id: Ibb5f24200f8d772cecf4166a90d27419329a337d
2024-08-31 16:41:10 +06:00
Daniel Jacob Chittoor
34d424f11e sm6225-common: rootdir: Enable suspend to RAM
* Improves idle drain considerably

Change-Id: Ibfbcbf9ade8123931b100432132b019f8fb44b45
2024-08-31 16:41:10 +06:00
Michael Bestas
8d4c3d65ac sm6225-common: Properly init qti perf hal
* Allows perf to work properly on boot to restore selected power profile

This fixes log spam -
QTI PowerHAL: Failed to acquire lock.

Change-Id: Idff7d1f51d8480b811a1a35c00670ca0bbd70be5
2024-08-31 16:41:10 +06:00
itsnouralawad
1a6c2e40a1 sm6225-common : rootdir: Override sensors HAL service
It is required to get the fod working
2024-08-21 13:37:08 +03:00
itsnouralawad
b45e970aec sm6225-common : init:Update fingerprint init script to handle xiaomi-fp 2024-08-21 13:26:33 +03:00
itsnouralawad
5e8d5a0652 sm6225-common : init:Add missing displayfeature sysfs node permissions 2024-08-21 13:26:33 +03:00
Arian
04a1eb7906 sm6225-common : rootdir: Override power HAL service and add input group
* This allows to access /dev/input/event* which is required for DT2W.

Change-Id: Idbab93138ba3221338413283552004d92e8ef333
2024-05-09 09:00:57 +00:00
Arian
9e40817f23 sm6225-common: Build Lineage Health HAL
Change-Id: I4719d1390233d2edcf94ca3c8567b6b40f5e5edd
2024-03-24 17:01:35 +07:00
chrisl7
13b87734c2 sm6225-common: rootdir: Remove duplicate ueventd definitions
Change-Id: I3d2e7485ec8f362ab3274bec80f3406a0e661243
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
2024-03-24 16:04:27 +07:00
Vamsi Krishna Gattupalli
5912b9fb3d sm6225-common: rootdir: Remove logging to kmsg device
Change-Id: Ie9c8bf1852c3fcf16eea2c25438e70477128f871
Signed-off-by: Vamsi Krishna Gattupalli <quic_vgattupa@quicinc.com>
Signed-off-by: CHRISL7 <70589286+CHRISL7@users.noreply.github.com>
2024-03-24 16:04:27 +07:00
boedhack99
a4b8b70995 sm6225-common: Update blobs from sapphire V816.0.2.0.UNGMIXM
Change-Id: I3b8d9e871f0c5f03eab0c4d81662c352f369db34
2024-03-24 16:04:27 +07:00
Fabian Leutenegger
62bc58b980 sm6225-common: Add xiaomi touchfeature HAL
Change-Id: I4eb881bbff108182f0f58699fdecefd760b12cda
2024-03-16 23:19:58 +07:00
boedhack99
3b6e16b183 sm6225-common: rootdir: Add device init scripts
Change-Id: I39ee5aa8bc9ec8fce1af9acc534e022f32a1535b
2024-03-16 00:51:42 +07:00
Arian
03dc0813db sm6225-common: Use xiaomi-touch to handle dt2w
Change-Id: I5c65e0df255853eb2b3018a27ceb807c111bc4df
2024-03-14 01:12:16 +07:00
Arian
55448b6fdf sm6225-common: Source build fingeprint HAL and implement udfpshandler
Change-Id: Ib0a8ed7d6e794aef4ad02b960841c66dfad79390
2024-03-14 01:12:16 +07:00
boedhack99
c936c6e8e4 sm6225-common: Update init scripts from saphhire
* From sapphire MIUI V14.0.6.0.TNGMIXM
* Also add missing init.qcom.post_boot.sh into packages build

Change-Id: I4414bf2dbcbdd01e02b6cf6681b5f004936233d8
2024-03-14 01:11:54 +07:00
boedhack99
2fbbea8947 sm6225-common: rootdir: Give permissions for xiaomi-fp
Change-Id: If79e888e3973b0c11e949e5ce10522c04168f653
2024-03-12 00:28:00 +07:00
boedhack99
0a4b25801d topaz: rootdir: Override attribute volume stream to system and vendor props
* Taken from marble

Change-Id: Ie2e01387b2cb7371a841a8aeeec823656c6f7e4c
2024-02-27 20:17:32 +07:00
boedhack99
2de89b7a8f topaz: rootdir: Disable agm loopback service
Change-Id: Id619be70798e6714e7d30621e52eb1c3a0caeddd
2024-02-27 20:17:32 +07:00
Chandu Dyavanapelli
3df7cd6140 topaz: rootdir: Drop multi-SIM init script
Until further notice, it's assumed that all variants
have dual SIM support.

Change-Id: I6c60230dff2b09c94208a6ec61c070c96dd803cd
2023-12-19 09:43:51 +07:00
boedhack99
49a6deaeb2 topaz: Bring back procfs tp_gesture to handle DT2W
* Partially reverts commit a83c711c8f.

Change-Id: If296f8952e124088e090244b0ec90992a490a580
2023-12-12 12:18:27 +07:00
Arian
8707e2336e topaz: Use xiaomi-touch to handle dt2w
Change-Id: I5c65e0df255853eb2b3018a27ceb807c111bc4df
2023-12-10 00:35:58 +07:00
Andy Hung
16192aae40 topaz: rootdir: audio HAL: Enable RT priority inheritance
Test: instrumented
Bug: 181148259
Bug: 260918856
Change-Id: If56e449a9c6f1a49e372591893d8714534574e3a
2023-12-04 15:47:23 +07:00
Suren Baghdasaryan
8c68126aca topaz: rootdir: Replace direct pid writes with setting task profiles for audio interfaces
For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ide373c283359cf4b73af4cb0813d8c0306942595
2023-12-04 15:47:23 +07:00
Bruno Martins
6ce6c8c936 topaz: rootdir: Override AOSP a-HAL service definition
Qualcomm adds oem_2901 and oem_2912 as group members.

Change-Id: I90e9d45069a8100bf922a5058fae5dbc5e5ef0c9
2023-12-04 15:47:23 +07:00
boedhack99
5d3c9ad6de topaz: Fix sepolicy denied and enforcing
Co-authored-by: Arian <arian.kulmer@web.de>
Co-authored-by: chrisl7 <wandersonrodriguesf1@gmail.com>
Change-Id: I5486e25a4e06d5e5ede95e9c54ac4f655290683c
2023-12-03 01:40:33 +07:00
chrisl7
814250fa40 topaz: Switch to prebuilt fingeprint service
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
Change-Id: I3f0ac432b47fefefcb4de2a7c7f09f641c006b47
2023-12-03 01:19:20 +07:00