-
Notifications
You must be signed in to change notification settings - Fork 194
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
Add a plugin for amdgpu tuning of the panel_power_savings
attribute
#601
Conversation
3d56e41
to
2379845
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, Mario, it looks interesting. I haven't yet tested this properly, as I do not have any device with an AMD GPU at hand.
On devices without AMD GPUs, TuneD now reports errors due to the missing file /sys/class/drm/card1-eDP-1/amdgpu/panel_power_savings
. Make sure to check that the file exists or add a flag that disables the functionality of the plugin entirely if the device doesn't have an AMD card.
I'm not sure what I think about enabling this by default for the main stock profiles, mainly due to the new upower
dependency and the fact that it basically performs a kind of "dynamic tuning", which TuneD has now abandoned by default. @yarda, what are your thoughts on this?
Regarding "dynamic tuning" it's not a blocker, because I think we need per plugin configuration, e.g. something like:
This was discussed earlier, but never implemented :). This is for another PR. Regarding the |
I think it should reflect the |
Regarding the upower, it should detect whether upower is available and if yes use it. This is what other plugin do (e.g. disk plugin with hdparm) then we could softdep upower and it will not break consumers without upower. |
Also what about adding this functionality into the |
If it's acceptable I would prefer to make power mandatory for the plugin. If it's not available or masked then fail the plugin initialization/load or make it a noop. I'll double check behavior for the plugin with it masked to make sure I got it right. |
I was thinking dedicated amdgpu plugin with the idea that we could extend it to other amdgpu stuff later maybe. |
I think plugin should be disabled for this case. |
2379845
to
1c93d22
Compare
1c93d22
to
94b6194
Compare
I believe the modifications I've made will effectively cause this behavior if upower can't be accessed for any reason (such as dbus is disabled). Let me know if you disagree. |
94b6194
to
922cbe7
Compare
The current functionality of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update. Now, this seems to work as expected (i.e., no-op) on machines without AMD GPUs or without upower on the dbus. I'll try to find an AMD GPU machine to test it fully.
I think it could be good extension of the video plugin, because it currently doesn't have dynamic tuning and maybe easier and more user friendly to write more generic:
than HW specific:
|
OK let me see if I can squeeze it into that plugin instead. Two questions:
|
922cbe7
to
29705c4
Compare
For now I've force pushed using the old configuration option name and kept the existing style for that plugin. In general though, I think it would be better to reformat it with |
29705c4
to
eb2776d
Compare
eb2776d
to
3e55d79
Compare
ping? |
@superm1, sorry for my longer inactivity. I'm still looking for a suitable device for testing. You mentioned that it has to run DCN, is there any specific version of DCN required? Will I be able to test this on Raphael, Renoir, or Ridge? |
The important part is that it is a mobile design with Vega or newer. I tested it on Phoenix and Rembrandt but I would expect it to be exposed on Renoir or newer. |
One more thing: Backport these 2 kernel patches from drm-next to 6.8 kernels to enable access to ABM:
They'll be part of 6.9-rc1. |
3c77247
to
6a7ff4a
Compare
The patches are going to be in 6.9-rc1 if that makes it easier. Here is sample output with the PR with a battery unplugged at startup, plugged in, and then unplugged, then powersave, then back to balanced.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update. I've got one more change request and when that is fixed, this looks mergeable to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Managed to find one other thing still.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. LGTM, so approving, but leaving the final merge decision on @yarda.
@yarda ping? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in #616, the response to battery/AC changes should be handled by tuned-ppd and thus moved to that PR.
b070c60
to
7db4407
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, please delete the remnants of the dbus functionality according to the comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, please remove the upower
mention from the commit 9d10869 description:
The plugin now uses upower to get a signal when battery changes so that
it will react instantly.
Otherwise OK.
This will allow reusing for non-radeon stuff as well.
When the plugin is overloaded to non-radeon files it shouldn't be so noisy.
When the plugin supports non-radeon files it shouldn't show errors trying to read values.
…` attribute This attribute accepts a range from 0 through 4 where larger values will also have larger panel power savings. Using this has a trade off for color accuracy, and it is only applied when the system is currently operating on battery. Intentionally the plugin will check what values are already programmed to the sysfs file to avoid unnecessary writes. Writing the sysfs file will cause a modeset which isn't necessary if writing the same value twice. The default values are applied to the profiles that are used in power-profiles-daemon compatbility. They also match the values used in that software. Signed-off-by: Mario Limonciello <[email protected]>
Rebased on main and done now. |
Thanks. |
This attribute accepts a range from 0 through 4 where larger values will also have larger panel power savings.
Using this has a trade off for color accuracy, and it is only applied when the system is currently operating on battery.
The plugin uses upower to get a signal when battery changes so that it will react instantly.
Intentionally the plugin will check what values are already programmed to the sysfs file to avoid unnecessary writes. Writing the sysfs file will cause a modeset which isn't necessary if writing the same value twice.
The default values are applied to the profiles that are used in power-profiles-daemon compatbility. They also match the values used in that software.