Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to separate DBus logic from GPU management logic #2

Merged
merged 14 commits into from
Mar 4, 2024

Conversation

NeroReflex
Copy link
Contributor

This refactor is meant to allow to easily add device-specifics TDP management, removes duplicate code and define an interface for TDP management that is independent of dbus: the dbus logic is self-contained in another layer and uses the raw GPU and TDP interfaces.

@pastaq
Copy link
Contributor

pastaq commented Feb 19, 2024

No regressions for the ROG Ally on the AMD side.

Intel is rough. DBus is hanging in OpenGamepadUI and there are errors in the PowerStation log:

Feb 18 23:59:10 oxpintel systemd[1]: Started PowerStation Service.
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation] Starting PowerStation
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu7
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu5
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu3
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu1
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu6
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu4
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu2
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu0
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::core] Setting core 0 to enabled
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::core] Setting core 1 to enabled
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::core] Setting core 2 to enabled
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::core] Setting core 3 to enabled
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::core] Setting core 4 to enabled
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::core] Setting core 5 to enabled
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::core] Setting core 6 to enabled
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::core] Setting core 7 to enabled
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Core Map: {2: [CPUCore { number: 2, path: "/sys/bus/cpu/devices/cpu2" }, CPUCore { number: 6, pat>
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu7
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu5
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu3
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu1
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu6
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu4
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu2
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.867Z INFO  [powerstation::performance::cpu::cpu] Discovered core: /sys/bus/cpu/devices/cpu0
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.882Z INFO  [powerstation::performance::gpu::dbus::gpu] Discovered gpu: /sys/class/drm/card1
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.882Z DEBUG [powerstation::performance::gpu::dbus::gpu] Getting device info from: 8086 9a49 03 8086
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.885Z DEBUG [powerstation::performance::gpu::dbus::gpu] Found vendor: Intel Corporation
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.885Z DEBUG [powerstation::performance::gpu::dbus::gpu] Found device name: TigerLake-LP GT2 [Iris Xe Graphics]
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.885Z DEBUG [powerstation::performance::gpu::dbus::gpu] Got to end of device list. Subdevice not found
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.885Z DEBUG [powerstation] Discovered TDP interface on card: Card1
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.885Z DEBUG [powerstation::performance::gpu::dbus::gpu] Discovering connectors for GPU: card1
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.885Z DEBUG [powerstation::performance::gpu::dbus::gpu] Finished finding connectors
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.885Z DEBUG [powerstation] Discovered connector on Card1: /org/shadowblip/Performance/GPU/card1/DP/4
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.885Z DEBUG [powerstation] Discovered connector on Card1: /org/shadowblip/Performance/GPU/card1/DP/2
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.885Z DEBUG [powerstation] Discovered connector on Card1: /org/shadowblip/Performance/GPU/card1/eDP/1
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.885Z DEBUG [powerstation] Discovered connector on Card1: /org/shadowblip/Performance/GPU/card1/DP/3
Feb 18 23:59:10 oxpintel powerstation[484]: 2024-02-18T23:59:10.885Z DEBUG [powerstation] Discovered connector on Card1: /org/shadowblip/Performance/GPU/card1/DP/1
Feb 18 23:59:20 oxpintel powerstation[484]: 2024-02-18T23:59:20.055Z INFO  [powerstation::performance::cpu::cpu] Setting core count to 2
Feb 18 23:59:20 oxpintel powerstation[484]: 2024-02-18T23:59:20.055Z INFO  [powerstation::performance::cpu::core] Setting core 4 to enabled
Feb 18 23:59:20 oxpintel powerstation[484]: 2024-02-18T23:59:20.055Z INFO  [powerstation::performance::cpu::core] Setting core 1 to disabled
Feb 18 23:59:20 oxpintel powerstation[484]: 2024-02-18T23:59:20.055Z INFO  [powerstation::performance::cpu::core] Setting core 5 to disabled
Feb 18 23:59:20 oxpintel powerstation[484]: 2024-02-18T23:59:20.056Z INFO  [powerstation::performance::cpu::core] Setting core 2 to disabled
Feb 18 23:59:20 oxpintel powerstation[484]: 2024-02-18T23:59:20.056Z INFO  [powerstation::performance::cpu::core] Setting core 6 to disabled
Feb 18 23:59:20 oxpintel powerstation[484]: 2024-02-18T23:59:20.056Z INFO  [powerstation::performance::cpu::core] Setting core 3 to disabled
Feb 18 23:59:20 oxpintel powerstation[484]: 2024-02-18T23:59:20.056Z INFO  [powerstation::performance::cpu::core] Setting core 7 to disabled
Feb 18 23:59:20 oxpintel powerstation[484]: 2024-02-18T23:59:20.149Z ERROR [powerstation::performance::gpu::intel::tdp] invalid float literal
Feb 18 23:59:20 oxpintel powerstation[484]: 2024-02-18T23:59:20.175Z ERROR [powerstation::performance::gpu::intel::tdp] invalid float literal
Feb 18 23:59:20 oxpintel powerstation[484]: 2024-02-18T23:59:20.177Z ERROR [powerstation::performance::gpu::intel::tdp] Power profiles not supported on intel gpu
Feb 18 23:59:20 oxpintel powerstation[484]: 2024-02-18T23:59:20.178Z ERROR [powerstation::performance::gpu::intel::tdp] Power profiles not supported on intel gpu
Feb 19 00:00:15 oxpintel powerstation[484]: 2024-02-19T00:00:15.438Z ERROR [powerstation::performance::gpu::intel::tdp] Thermal throttling not supported on intel gpu
Feb 19 00:00:16 oxpintel powerstation[484]: 2024-02-19T00:00:16.937Z ERROR [powerstation::performance::gpu::intel::tdp] invalid float literal
Feb 19 00:00:16 oxpintel powerstation[484]: 2024-02-19T00:00:16.939Z ERROR [powerstation::performance::gpu::intel::tdp] invalid float literal
Feb 19 00:00:16 oxpintel powerstation[484]: 2024-02-19T00:00:16.951Z ERROR [powerstation::performance::gpu::intel::tdp] Power profiles not supported on intel gpu
Feb 19 00:00:16 oxpintel powerstation[484]: 2024-02-19T00:00:16.953Z ERROR [powerstation::performance::gpu::intel::tdp] Power profiles not supported on intel gpu
Feb 19 00:00:45 oxpintel powerstation[484]: 2024-02-19T00:00:45.464Z ERROR [powerstation::performance::gpu::intel::tdp] Thermal throttling not supported on intel gpu
Feb 19 00:01:15 oxpintel powerstation[484]: 2024-02-19T00:01:15.415Z ERROR [powerstation::performance::gpu::intel::tdp] Thermal throttling not supported on intel gpu
Feb 19 00:01:16 oxpintel powerstation[484]: 2024-02-19T00:01:16.253Z INFO  [powerstation::performance::cpu::cpu] Setting core count to 8
Feb 19 00:01:16 oxpintel powerstation[484]: 2024-02-19T00:01:16.253Z INFO  [powerstation::performance::cpu::core] Setting core 4 to enabled
Feb 19 00:01:16 oxpintel powerstation[484]: 2024-02-19T00:01:16.253Z INFO  [powerstation::performance::cpu::core] Setting core 1 to enabled
Feb 19 00:01:16 oxpintel powerstation[484]: 2024-02-19T00:01:16.253Z INFO  [powerstation::performance::cpu::core] Setting core 5 to enabled
Feb 19 00:01:16 oxpintel powerstation[484]: 2024-02-19T00:01:16.253Z INFO  [powerstation::performance::cpu::core] Setting core 2 to enabled
Feb 19 00:01:16 oxpintel powerstation[484]: 2024-02-19T00:01:16.253Z INFO  [powerstation::performance::cpu::core] Setting core 6 to enabled
Feb 19 00:01:16 oxpintel powerstation[484]: 2024-02-19T00:01:16.254Z INFO  [powerstation::performance::cpu::core] Setting core 3 to enabled
Feb 19 00:01:16 oxpintel powerstation[484]: 2024-02-19T00:01:16.254Z INFO  [powerstation::performance::cpu::core] Setting core 7 to enabled
Feb 19 00:01:16 oxpintel powerstation[484]: 2024-02-19T00:01:16.286Z ERROR [powerstation::performance::gpu::intel::tdp] invalid float literal
Feb 19 00:01:16 oxpintel powerstation[484]: 2024-02-19T00:01:16.286Z ERROR [powerstation::performance::gpu::intel::tdp] invalid float literal
Feb 19 00:01:16 oxpintel powerstation[484]: 2024-02-19T00:01:16.287Z ERROR [powerstation::performance::gpu::intel::tdp] Power profiles not supported on intel gpu
Feb 19 00:01:16 oxpintel powerstation[484]: 2024-02-19T00:01:16.287Z ERROR [powerstation::performance::gpu::intel::tdp] Power profiles not supported on intel gpu

@pastaq
Copy link
Contributor

pastaq commented Feb 21, 2024

Looking at the errors, a lot of these are historical and are due to how OpenGamepadUI is implementing detection of features and handling profiles. The only valid ones for this PR are the invalid float literal I think.

@NeroReflex
Copy link
Contributor Author

NeroReflex commented Feb 23, 2024

Thanks, I will take a look at that invalido float literal. Do you known the source of the problem? I don't own intel hardware

@pastaq
Copy link
Contributor

pastaq commented Feb 23, 2024

Let me compare to stable. It occurs to me I don't recall if this is an issue already.

Copy link
Contributor

@ShadowApex ShadowApex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really great additions! Sorry it took so long for me to review. Thanks for these changes!

@ShadowApex ShadowApex merged commit ffb30b6 into ShadowBlip:main Mar 4, 2024
1 check passed
Copy link

🎉 This PR is included in version 0.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants