493 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
ZVNexus
e72d23f5e0 sapphire: Enable Qualcomm TrueWireless Stereo
Signed-off-by: 01soni247 <01soni247@gmail.com>
2024-09-09 19:44:52 +06:00
Fabian Leutenegger
1ddcbb2468 sapphire: sepolicy: Allow vendor_hal_perf_default to access surfaceflinger
Change-Id: If46befdd3559fd2632e8df4bef7389bc7fd5ff42
Signed-off-by: artemscine <artempemine@gmail.com>
2024-09-09 19:14:25 +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
NotZeetaa
fc1d8f17ad sapphire: vintf: Drop ISecureElement/eSE1
* Fixes Unable to set property "ctl.interface_start" to "android.hardware.secure_element@1.2::ISecureElement/eSE1": error code: 0x20
2024-09-09 01:43:04 +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
UnmoveD
d2baa6e8c5 sapphire: sepolicy: Solve vendor_hal_perf_default denials
avc:  denied  { search } for  name=1567 dev=proc ino=60290820 scontext=u:r:vendor_hal_perf_default:s0 tcontext=u:r:hal_graphics_composer_default:s0 tclass=dir permissive=0

avc:  denied  { getpgid } for  scontext=u:r:vendor_hal_perf_default:s0 tcontext=u:r:hal_graphics_composer_default:s0 tclass=process permissive=0

avc:  denied  { read } for  name="cpuset" dev="proc" ino=937978 scontext=u:r:vendor_hal_perf_default:s0 tcontext=u:r:hal_graphics_composer_default:s0 tclass=file permissive=0

Signed-off-by: UnmoveD <unmoved2121@gmail.com>
2024-09-09 01:32:24 +06:00
kibria5
3b7298c596 sapphire: Cleanup some props 2024-09-09 01:27:55 +06:00
AdarshGrewal
721a5136ab sapphire: Enable hwc vds
* fuck you qcom

Change-Id: I749551ac2b841c97483dfaafdd325cd68221a00f
2024-09-09 01:13:55 +06:00
Ken Huang
facc51f928 sapphire: Set 120Hz frame rate multiple threshold for sapphire
Bug: 215043570
Test: play 24fps video and check refresh rate
Change-Id: Ie638f9dcf11e25bdd903d6cde2d0eeb794668e52
2024-09-09 01:06:47 +06:00
Adithya R
e8bffe503a sapphire: props: Switch to SF phase offsets from gs201.
https://android.googlesource.com/device/google/gs201/+/refs/heads/main/device.mk#678
2024-09-09 01:04:25 +06:00
kibria5
0ebbe4b34e sapphire: Enable Incremental on the device 2024-09-09 00:55:31 +06:00
Kelly Rossmoyer
bdd913983f sapphire: enable adaptive suspend
This CL adds build properties enabling Adaptive Suspend's short
suspend backoff with a short suspend threshold of 2 seconds and
a max backoff time of 40s.  This is the same configuration that
was deployed on the previous generation of devices.

The plan is to monitor suspend behavior, screen-off uptime,
wakeup rates, and the distribution of screen-off mA on
these devices in comparison to those same attributes on late
UDC builds, which will inform whether we ship or revert.

from https://android.googlesource.com/device/google/gs201/+/refs/heads/main/device.mk#1114

Bug: 208947015
Test: booted with a test kernel and used alarmtimer mods to
exercise high-frequency wakeup behavior

Change-Id: Icf75c4dd705050833df5e48aaf0c28afa5754adb
2024-09-08 18:50:14 +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
Charlie-117
10e6d082ba sapphire: overlay: Enable TurboPower charging support
* The text 'TurboPower connected' will be displayed on keyguard instead of 'Charging Rapidly'

Signed-off-by: Tony Jose <gmoto1179@gmail.com>
Change-Id: I1afabade3bb7b32d8e36d521fa3d7abca9287c03
2024-09-07 22:00:58 +00:00
Bruno Martins
b3e1a4295c sapphire: Mark CNE symlink target as required package
Change-Id: I19c7d2ff968a72156edde722f50e2744e3062e0e
2024-09-07 22:00:58 +00:00
Bruno Martins
fd86e114b4 sapphire: Declare EGL libs as symlinks during extraction
Change-Id: I4b2f3e79b5e518889d9771bf8990e27babca8b61
2024-09-07 22:00:58 +00:00
Bruno Martins
bd7dd664ac sapphire: Convert WiFi firmware symlink to install_symlink target
The last bit that was preventing building hermetic images.

Change-Id: I618780b1c10c14ab8a00a7a9135a52386d156d39
2024-09-07 22:00:58 +00:00
Bruno Martins
934bf5b83f sapphire: Declare IMS and WFD libs as symlinks during extraction
Change-Id: I2a035323a483b8b2422b4a54219b2f6268ab4a61
2024-09-07 22:00:58 +00:00
Bruno Martins
fad2012a6c sapphire: Move to new RFS install_symlink targets
Change-Id: I9560fd0da00958d9349a0881b5a5f64a2c02e495
2024-09-07 22:00:58 +00: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
Michael Bestas
15a07cd7a4 sapphire: Sync extract scripts with templates
Change-Id: I98a36854c5a0c0390592911bb2558b34eff77efc
2024-09-05 17:31:36 +06:00
Adithya R
3c842c685e sapphire: perf: Enable performance mode on khaje
Change-Id: I3c81d1721272528f7a57f4dffe434f68b830131a
2024-09-05 17:02:25 +06:00
Vishalcj17
1d4f90ef9c sapphire: perf: Boost GPU on specific events
* Properly tackle blur event lags with GPU boosting.
2024-09-05 17:02:25 +06:00
chrisl7
45d35f2a48 sapphire: perf: Tune khaje boosts values 2024-09-05 17:02:25 +06:00
chrisl7
3bd6820bc1 sapphire: rootdir: Configure zram 2024-09-05 17:02:25 +06:00
Asier Ruiz
c6000c57ba sapphire: Add SystemUI restart in restart advanced menu 2024-09-05 17:02:25 +06:00
kdrag0n
83677d2266 sapphire: overlay: Allow more cached apps in the background
* Google has provisioned this on the Pixel 5 (RQ1A.201205.010) to utilize the 8 GB of RAM better, and I have also observed that a lightweight selection of apps was hitting the cached app limit before exhausting RAM on another device with 8 GB of RAM
* This shouldn't cause adverse effects on devices with less RAM (e.g. 4 GB) as the low memory killer should kick in long before this limit on such devices

Signed-off-by: Joker-V2 <nipinna0@gmail.com>
2024-09-05 17:02:24 +06:00
kdrag0n
e3e69aaf8f sapphire: overlay: Compact cached app heaps in the background
* Background ART heap compaction for cached apps has been recommended for Android Go devices for a while, and Google has enabled it for the Pixel 5 on RQ1A.201205.010. This feature should help fit more cached apps in memory

Signed-off-by: Joker-V2 <nipinna0@gmail.com>
2024-09-05 17:02:10 +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
Adithya R
38d6cabaed sapphire: Kill IMS logspam
Change-Id: Ieec9b995c0316bbdb4fce3e5fceca2defb24159f
2024-09-03 15:54:56 +06:00
Danny Lin
2809578531 sapphire: props: Disable RescueParty
RescueParty's aggressive approach to error recovery almost never helps
with the problems we're likely to face, and its risk of data loss is far
too high. Force-disable it entirely and remove all other conditions,
especially those that depend on data integrity in the first place, to
reduce the risk of RescueParty triggering falsely and causing data loss.

Note that it is still possible to force-enable RescueParty for testing
purposes using the persist.sys.enable_rescue property.
2024-09-03 15:54:56 +06:00
Kumar Anand
baa8af19ce sapphire: wifi: Enable automatic channel selection
* Automatic Channel Selection algorithms and implementations
   are used to enable interfaces to automatically figure
   out which channel configuration to use for initiating
   communication, for any mode of operation which initiates
   radiation (AP, Mesh, IBSS, P2P).

   https://wireless.wiki.kernel.org/en/users/documentation/acs
2024-09-03 15:54:56 +06:00
LuK1337
52b78707e3 sapphire: wifi: Enable DFS channel scanning in P2P search
* Fixes P2P when connected to 5GHz access point.

Change-Id: I31890645510931c7e7a65759c915a09fec77a1cf
2024-09-03 15:54:56 +06:00
Luk1337
7446da0e0b sapphire: wifi: Disable RX wakelock feature 2024-09-03 15:54:56 +06:00
Alan Chen
3e6682439b sapphire: wifi: Enable Optimized Power Management
- This config was renamed as of CLO commit [1] and [2].

[1]: 10989ba376
[2]: 9ef1447db3

Change-Id: Ie6ffbeebb45e5dd97b98592b7dfc195a4fb7045d
2024-09-03 15:54:56 +06:00
Alex Naidis
d0089d7f92 sapphire: wifi: Smarter decisions on whether to use a 2 or 5Ghz AP
Implement a smarter system on whether to connect
to the provided 2Ghz or 5Ghz network.

Change-Id: Idd41e3d9a5e2bde3ea9b4873dffc4274d1530324
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2024-09-03 15:54:56 +06:00