Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949824 - [guru] games-util/mangohud-0.7.2-r1::guru does not work with >=sys-kernel/zenpower3-0.2.0-r1::guru
Summary: [guru] games-util/mangohud-0.7.2-r1::guru does not work with >=sys-kernel/zen...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Overlays (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Adel KARA SLIMANE
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-16 05:47 UTC by Enne Eziarc
Modified: 2025-03-09 21:20 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enne Eziarc 2025-02-16 05:47:36 UTC
Here's a patch to apply to mangohud-0.7.2-r1 that makes both packages work with each other.


--- a/src/cpu.cpp
+++ b/src/cpu.cpp
@@ -510,7 +510,7 @@ bool CPUStats::GetCpuFile() {
             find_input(path, "temp", input, "Package id 0");
             break;
         }
-        else if ((name == "zenpower" || name == "k10temp")) {
+        else if ((name == "zenpower" || name == "zenstats" || name == "k10temp")) {
             if (!find_input(path, "temp", input, "Tdie"))
                 find_input(path, "temp", input, "Tctl");
             break;
@@ -633,7 +633,7 @@ bool CPUStats::InitCpuPowerData() {
 
         if (name == "k10temp") {
             cpuPowerData = (CPUPowerData*)init_cpu_power_data_k10temp(path);
-        } else if (name == "zenpower") {
+        } else if (name == "zenpower" || name == "zenstats") {
             cpuPowerData = (CPUPowerData*)init_cpu_power_data_zenpower(path);
             break;
         } else if (name == "zenergy") {
Comment 1 Kostadin Shishmanov 2025-03-09 15:28:54 UTC
Make a PR upstream with the patch.
Comment 2 Enne Eziarc 2025-03-09 18:04:32 UTC
(In reply to Kostadin Shishmanov from comment #1)
> Make a PR upstream with the patch.

No. It belongs in FILESDIR because it's a problem entirely caused by downstream packaging.
Comment 3 Gonçalo Negrier Duarte 2025-03-09 20:03:01 UTC
The original zenpower project is dead if look at the ebuild I using a fork of the project.
For some reason that fork rename the sensor to zenstat instead of zenpower.

So just send that patch upstream, me and Adel will not mantained it.
Comment 4 Gonçalo Negrier Duarte 2025-03-09 20:14:23 UTC
(In reply to Gonçalo Negrier Duarte from comment #3)
> The original zenpower project is dead if look at the ebuild I using a fork
> of the project.
> For some reason that fork rename the sensor to zenstat instead of zenpower.
> 
> So just send that patch upstream, me and Adel will not mantained it.

Being fare I gonna change the zenpower3 to this repo instead:
https://github.com/koweda/zenpower3
So this patch is not needed.
Comment 5 Kostadin Shishmanov 2025-03-09 20:17:37 UTC
(In reply to Gonçalo Negrier Duarte from comment #4)
> (In reply to Gonçalo Negrier Duarte from comment #3)
> > The original zenpower project is dead if look at the ebuild I using a fork
> > of the project.
> > For some reason that fork rename the sensor to zenstat instead of zenpower.
> > 
> > So just send that patch upstream, me and Adel will not mantained it.
> 
> Being fare I gonna change the zenpower3 to this repo instead:
> https://github.com/koweda/zenpower3
> So this patch is not needed.

But why tho? The fork that is currently used also has support for AM5. Just let the bug reporter send the patch to upstream MangoHud. It's not a huge change and I doubt they are gonna reject it.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-09 20:20:01 UTC
See also bug 947057.
Comment 7 Enne Eziarc 2025-03-09 20:21:54 UTC
(In reply to Gonçalo Negrier Duarte from comment #3)
> The original zenpower project is dead if look at the ebuild I using a fork
> of the project.
> For some reason that fork rename the sensor to zenstat instead of zenpower.
> 
> So just send that patch upstream, me and Adel will not mantained it.

Alright, being formal is going nowhere so now you get the Real Talk.

There are thirteen zenpower forks currently on github; the other twelve do not break everything, the one you packaged has stayed dead after a single commit and its author has also made clear they're never returning to github. You have refused to justify your actions even after being shown how counterproductive and pointless they've been and I'm starting to wonder what the motivation behind them really is, because improving the software ain't it.

I am not wasting my time signing up for Microsoft Github to bother projects about some libav-esque office-political rubbish I don't subscribe to; I'd get (justifiably) laughed out of the room for wasting *their* time asking for a hack for some rando's dead vanity project and the bug would remain not fixed.

I have already done more than enough homework here as is by diagnosing, triaging, and providing a patch. This has been broken for over four months and you have been aware of that from the start and still refused to fix it. I am not taking the fall for such sloppy workmanship.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-09 20:22:17 UTC
(In reply to Enne Eziarc from comment #2)
> (In reply to Kostadin Shishmanov from comment #1)
> > Make a PR upstream with the patch.
> 
> No. It belongs in FILESDIR because it's a problem entirely caused by
> downstream packaging.

Explicitly stating that (and explaining it) in an annotation of the patch is appreciated in general.
Comment 9 Gonçalo Negrier Duarte 2025-03-09 20:23:28 UTC
(In reply to Kostadin Shishmanov from comment #5)
> But why tho? The fork that is currently used also has support for AM5. Just
> let the bug reporter send the patch to upstream MangoHud. It's not a huge
> change and I doubt they are gonna reject it.

I not really sure the commit really work I don't have AM5 machine to test.
And there is a huge argument about the fork I use.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-09 20:23:41 UTC
(In reply to Enne Eziarc from comment #7)
> (In reply to Gonçalo Negrier Duarte from comment #3)
> > The original zenpower project is dead if look at the ebuild I using a fork
> > of the project.
> > For some reason that fork rename the sensor to zenstat instead of zenpower.
> > 
> > So just send that patch upstream, me and Adel will not mantained it.
> 
> Alright, being formal is going nowhere so now you get the Real Talk.
> 
> There are thirteen zenpower forks currently on github; the other twelve do
> not break everything, the one you packaged has stayed dead after a single
> commit and its author has also made clear they're never returning to github.
> You have refused to justify your actions even after being shown how
> counterproductive and pointless they've been and I'm starting to wonder what
> the motivation behind them really is, because improving the software ain't
> it.
> 

Please leave the aspersions wrt motivation out of it. It's entirely reasonable to say the fork is a bad choice and we should really change (and that you're fed up), but just leave it at that.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-09 20:29:41 UTC
I'm sorry if I'm missing it, but I can't spot what fork you're suggesting be used instead yet. Can you point it out?
Comment 12 Gonçalo Negrier Duarte 2025-03-09 20:37:52 UTC
(In reply to Sam James from comment #11)
> I'm sorry if I'm missing it, but I can't spot what fork you're suggesting be
> used instead yet. Can you point it out?

The fork I gonna change is this one: https://github.com/koweda/zenpower3

The fork use in the ebuild, say it support AM5, but I really not sure if it work (since I don't have hardware to test) and commit doesn't seem ok, for example using zen2 and 1 calculation on zen5.
 
I didn't change early because I forgot and that commit didn't have nothing nasty let say.
Comment 13 Gonçalo Negrier Duarte 2025-03-09 20:39:29 UTC
(In reply to Gonçalo Negrier Duarte from comment #12)
> (In reply to Sam James from comment #11)
> > I'm sorry if I'm missing it, but I can't spot what fork you're suggesting be
> > used instead yet. Can you point it out?
> 
> The fork I gonna change is this one: https://github.com/koweda/zenpower3

I also choose this fork because it solve some bug of the old ocerman one.
Comment 14 Adel KARA SLIMANE 2025-03-09 20:49:28 UTC
Sam do you know what's the current official way to get energy/power readings ?

I even downloaded Phoronix's test suite and it seems to actually use zenpower (if my memory didn't get corrupted). I've never looked deep into RAPL otherwise.

But it's weird that we're in zen5 already and AMD still doesn't provide an easy ootb way to get those readings...
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-09 20:53:29 UTC
No, I'm sort of baffled by it myself -- the zen CPUs are really popular and I can't understand how we're in this state of affairs, to the extent that I'm sure I'm missing something.
Comment 16 Gonçalo Negrier Duarte 2025-03-09 21:14:59 UTC
Sam James: you agree with the change?
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-03-09 21:15:46 UTC
I'd like to hear from OP first as to what their recommendation is, as they seem to have one but I've missed it.
Comment 18 Gonçalo Negrier Duarte 2025-03-09 21:20:50 UTC
(In reply to Adel KARA SLIMANE from comment #14) 
> I even downloaded Phoronix's test suite and it seems to actually use
> zenpower (if my memory didn't get corrupted). I've never looked deep into
> RAPL otherwise.
> 

Yes it uses zenpower for the cpu power: https://github.com/phoronix-test-suite/phoronix-test-suite/blob/e1fdc09426136035743b509a6f963a237324ffd2/pts-core/objects/phodevi/sensors/cpu_power.php#L191C6-L191C7