Skip to content

Commit

Permalink
Merge branch 'main' into testing
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Feb 18, 2025
2 parents d736d50 + 748b9af commit e0a0b19
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 2 deletions.
28 changes: 28 additions & 0 deletions spec_files/mangohud/5b7bd93f0493e88637ff4a6ef1140a13ded05cc8.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From 5b7bd93f0493e88637ff4a6ef1140a13ded05cc8 Mon Sep 17 00:00:00 2001
From: flightlessmango <[email protected]>
Date: Mon, 17 Feb 2025 21:18:04 +0100
Subject: [PATCH] Params: preset 4: disable some more options for steam deck

---
src/overlay_params.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp
index 9fbe4a4fc4..cf4446a87f 100644
--- a/src/overlay_params.cpp
+++ b/src/overlay_params.cpp
@@ -1165,8 +1165,13 @@ void presets(int preset, struct overlay_params *params, bool inherit) {
add_to_options(params, "frame_timing_detailed", "1");
add_to_options(params, "network", "1");
add_to_options(params, "present_mode", "0");
- if ( deviceID == 0x1435 || deviceID == 0x163f )
+ // Disable some options if steamdeck
+ if ( deviceID == 0x1435 || deviceID == 0x163f ) {
add_to_options(params, "gpu_fan", "0");
+ add_to_options(params, "gpu_junction_temp", "0");
+ add_to_options(params, "gpu_voltage", "0");
+ add_to_options(params, "gpu_mem_temp", "0");
+ }

break;

31 changes: 31 additions & 0 deletions spec_files/mangohud/6dcd1b5c4bbd9fa1ff56337bff6d307568afc4d5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 6dcd1b5c4bbd9fa1ff56337bff6d307568afc4d5 Mon Sep 17 00:00:00 2001
From: flightlessmango <[email protected]>
Date: Mon, 17 Feb 2025 20:28:18 +0100
Subject: [PATCH] amdgpu: current_gfxclk was not being collected in APUs

---
src/amdgpu.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/src/amdgpu.cpp b/src/amdgpu.cpp
index ebd2667e1f..b3cc5b9375 100644
--- a/src/amdgpu.cpp
+++ b/src/amdgpu.cpp
@@ -133,6 +133,17 @@ void AMDGPU::get_instant_metrics(struct amdgpu_common_metrics *metrics) {
metrics->apu_cpu_temp_c = 0;
}

+ if( IS_VALID_METRIC(amdgpu_metrics->current_gfxclk) ) {
+ // prefered method
+ metrics->current_gfxclk_mhz = amdgpu_metrics->current_gfxclk;
+ } else if( IS_VALID_METRIC(amdgpu_metrics->average_gfxclk_frequency) ) {
+ // fallback 1
+ metrics->current_gfxclk_mhz = amdgpu_metrics->average_gfxclk_frequency;
+ } else {
+ // giving up
+ metrics->current_gfxclk_mhz = 0;
+ }
+
indep_throttle_status = amdgpu_metrics->indep_throttle_status;
}

31 changes: 31 additions & 0 deletions spec_files/mangohud/f60145c288610145b172af4f0dff49697337abc4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From f60145c288610145b172af4f0dff49697337abc4 Mon Sep 17 00:00:00 2001
From: flightlessmango <[email protected]>
Date: Mon, 17 Feb 2025 21:07:20 +0100
Subject: [PATCH] amdgpu: current_uclk was not being collected in APUs

---
src/amdgpu.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/src/amdgpu.cpp b/src/amdgpu.cpp
index b3cc5b9375..4a2542298a 100644
--- a/src/amdgpu.cpp
+++ b/src/amdgpu.cpp
@@ -143,6 +143,17 @@ void AMDGPU::get_instant_metrics(struct amdgpu_common_metrics *metrics) {
// giving up
metrics->current_gfxclk_mhz = 0;
}
+
+ if( IS_VALID_METRIC(amdgpu_metrics->current_uclk) ) {
+ // prefered method
+ metrics->current_uclk_mhz = amdgpu_metrics->current_uclk;
+ } else if( IS_VALID_METRIC(amdgpu_metrics->average_uclk_frequency) ) {
+ // fallback 1
+ metrics->current_uclk_mhz = amdgpu_metrics->average_uclk_frequency;
+ } else {
+ // giving up
+ metrics->current_uclk_mhz = 0;
+ }

indep_throttle_status = amdgpu_metrics->indep_throttle_status;
}
10 changes: 8 additions & 2 deletions spec_files/mangohud/mangohud.spec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

Name: mangohud
Version: 0.8.0
Release: 3
Release: 4
Summary: Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load

License: MIT
Expand All @@ -41,9 +41,15 @@ Source6: https://wrapdb.mesonbuild.com/v%{implot_wrap_ver}/implot_%{implo
Source20: README.Fedora.md

# https://github.com/flightlessmango/MangoHud/commit/85bd029f2f292e2a7089caff6c78d79a102da96d
Patch0: dont_crash_gpu_uninit.patch
Patch0: 85bd029f2f292e2a7089caff6c78d79a102da96d.patch
# https://github.com/flightlessmango/MangoHud/pull/1581
Patch1: 1581.patch
# https://github.com/flightlessmango/MangoHud/commit/6dcd1b5c4bbd9fa1ff56337bff6d307568afc4d5
Patch2: 6dcd1b5c4bbd9fa1ff56337bff6d307568afc4d5.patch
# https://github.com/flightlessmango/MangoHud/commit/f60145c288610145b172af4f0dff49697337abc4
Patch3: f60145c288610145b172af4f0dff49697337abc4.patch
# https://github.com/flightlessmango/MangoHud/commit/5b7bd93f0493e88637ff4a6ef1140a13ded05cc8
Patch4: 5b7bd93f0493e88637ff4a6ef1140a13ded05cc8.patch

BuildRequires: vulkan-headers
BuildRequires: appstream
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
monitor.alsa.rules = [
{
matches = [
{
node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Speaker__sink"
}
]
actions = {
update-props = {
api.alsa.headroom = 1024
}
}
}
]

0 comments on commit e0a0b19

Please sign in to comment.