-
Notifications
You must be signed in to change notification settings - Fork 74
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
Notify in CLI if system is incompatible #401
Conversation
Do we want rustfmt to pass? It looks like other PRs have merged without that, so if I |
That's up to you/engineering. That check not passing isn't a regression from a QA standpoint since it's already not passing on master. |
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.
Before, I did already get an error message that somewhat explained what the problem was if I tried to switch graphics profiles on a non-switchable system.
system76@pop-os:~$ system76-power graphics nvidia
setting graphics to nvidia
daemon returned an error message: "does not have switchable graphics"
system76@pop-os:~$
Now, I get a longer message that may be more human-readable.
system76@pop-os:~$ system76-power graphics nvidia
System76 Power is not supported on this device.
This means that your device is either a desktop or doesn't have both an iGPU and dGPU.
System76 Power's daemon automatically stops on systems like this. There is no need
to uninstall nor any need for further configuration.
system76@pop-os:~$
However, this new message is also showing up if I try to switch power profiles (testing on lemp10.) All laptops should work with power profiles, not just the graphics-switchable ones. This change also breaks setting charging profiles (displaying the same message.)
I force pushed a change, hows it look now? |
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.
Power profiles and charging profiles now work again on non-switchable laptops.
For desktops, do we want to consider also using the get_desktop
method/message for charging profiles? Currently, it still returns Not running System76 firmware with charge threshold support
.
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.
The "not switchable" string still seems pointless since it will never be displayed, but that's more engineering's discretion.
Desktop:
system76-power graphics
returns a new message instead of functioning like a laptop.system76-power profile
returns a new message instead of functioning like a laptop.system76-power charge-thresholds
returns an existing daemon error message.
I noticed in the logs that the GNOME Shell extension still thinks the "balanced" profile is being loaded when it first starts. The top-right menu doesn't include the battery/power drop-down, so not sure what its behavior would be now.
Laptop (switchable):
system76-power graphics
still works.system76-power profile
still works.system76-power charge-thresholds
still works.
Laptop (non-switchable):
system76-power graphics
returns a new message instead of the old daemon error message.system76-power profile
still works.system76-power charge-thresholds
still works.
That is a good point. I pushed a fix for that. Thank you |
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.
Desktop:
system76-power graphics
returns a new message instead of functioning like a laptop.system76-power profile
returns a new message instead of functioning like a laptop.system76-power charge-thresholds
returns a new message instead of the old daemon error message.
Laptop (switchable):
system76-power graphics
still works.system76-power profile
still works.system76-power charge-thresholds
still works.
Laptop (non-switchable):
system76-power graphics
returns a new message instead of the old daemon error message.system76-power profile
still works.system76-power charge-thresholds
still works.
Print out a error message if the system is not supported. Behaviour before this is a success that looks like the power profile was changed, which is incorrect.
I gave this a quick sanity check since it's been a while. This is still working as expected on switchable and non-switchable laptops. Testing in a virtual machine attempting to simulate a desktop, I found that by default, In order to properly simulate running this on a desktop, I cloned this branch and modified the We might be able to better hide the options in the GUI on desktops, but this isn't going to cause any crashes in the GUI (and it sounds like profiles weren't properly functioning on desktops anyway, from this PR's initial description). Edit: @XV-02 did confirm that the GUI menu doesn't show up at all on desktops by default. |
Is the "success" actually incorrect? I'm currently trying to debug what seems to be a hardware issue. Compiling a personal project caused hardware instability if I ran
I'm now unsure what profile is active on my machine. |
Power profiles do work on desktops, yes. |
Print out a error message if the system is not supported. Behaviour before this is a success that looks like the power profile was changed, which is incorrect.