forked from ublue-os/bazzite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from ublue-os/main
[pull] main from ublue-os:main
- Loading branch information
Showing
13 changed files
with
106 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
system_files/deck/shared/usr/lib/systemd/system/bazzite-tdpfix.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Resets power1_cap permissions to 644 if it is 666 at boot | ||
After=multi-user.target rc-local.service systemd-user-sessions.service | ||
Wants[email protected] | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/libexec/bazzite-tdpfix | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/bash | ||
# This is a workaround for cards that somehow has their sysfs power1_cap permission set to 666 on boot | ||
# Which in turn makes steam directly set the TDP to 15W | ||
POWER_CAP_PATH=$(find /sys/class/hwmon/*/ -name "power1_cap") | ||
|
||
# If the permissions are set to writable | ||
if [ "$(stat -c %a "$POWER_CAP_PATH")" == "666" ]; then | ||
chmod 644 "$POWER_CAP_PATH" | ||
echo "fix: Permissions reset to 644 on $POWER_CAP_PATH" | systemd-cat -t bazzite-tdpfix -p warning | ||
fi | ||
|
||
# If TDP is 15W and default TDP is higher than 45W, set card to use default TDP | ||
# This will then be handled by firmware or software afterwards as this is set once | ||
if [ "$(cat "$POWER_CAP_PATH")" == "15000000" ] && [ "$(cat "${POWER_CAP_PATH}_default")" -gt "45000000" ]; then | ||
"$(cat "${POWER_CAP_PATH}_default")" > "$POWER_CAP_PATH" | ||
echo "fix: TDP reset to default on $POWER_CAP_PATH" | systemd-cat -t bazzite-tdpfix -p warning | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
system_files/desktop/shared/usr/lib/tuned/balanced-no-pstate/tuned.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# tuned configuration | ||
# | ||
[main] | ||
summary=General tuned profile for CPUs without p-state support | ||
|
||
[cpu] | ||
priority=10 | ||
governor=schedutil | ||
energy_perf_bias=normal | ||
energy_performance_preference=balance_performance | ||
|
||
[acpi] | ||
platform_profile=balanced | ||
|
||
[audio] | ||
timeout=10 | ||
|
||
[video] | ||
radeon_powersave=dpm-balanced,auto | ||
|
||
[disk] | ||
# Comma separated list of devices, all devices if commented out. | ||
# devices=sda | ||
|
||
[scsi_host] | ||
alpm=medium_power | ||
|
2 changes: 1 addition & 1 deletion
2
system_files/desktop/shared/usr/libexec/hardware/simpledeckytdp-supported-hardware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters