eliapasquali / power-profile-switcher

Gnome extension to automatically switch between power profiles based on power supply.
https://extensions.gnome.org/extension/5575/power-profile-switcher/
GNU General Public License v3.0
51 stars 10 forks source link

[BUG] `assignment to undeclared variable PowerProfilesIFace` #25

Closed GlitchWitch closed 11 months ago

GlitchWitch commented 1 year ago

Describe the bug When using version 14, an error occurs that causes the extension to become disabled and stop working. This seems to be reproducible when locking and unlocking the session.

To Reproduce

  1. Install or upgrade to version 14 from the gnome extensions site
  2. Lock your screen
  3. Note the extension will no longer be enabled or function due to the error after unlocking

Expected behavior The error should not be present.

Screenshots image

Desktop (please complete the following information):

Additional context

Gnome Extension's upgraded the extension to version 14. The version I compiled in #24 still works without error.

GlitchWitch commented 1 year ago

Added some additional details, this seems to be easily reproducible by installing the extension, locking the screen, then unlocking.

vismajor1 commented 1 year ago

I went to github to report the same Problem with Gnome 45 on Ubuntu 23.10. But @GlitchWitch did already a very good report. Thank you.

dmy3k commented 1 year ago

Also encountered the same.

After some digging around I see that the extension published at gnome extensions has const PowerProfilesProxy defined in enable method of extension class. It's scope is that method only. Then disable method tries to reference that const, but it is not defined here.

@eliapasquali We need help with fixing this release issue, as it makes extension unusable with gnome 45 (crashes on every disable call).

Thanks in advance!

GlitchWitch commented 1 year ago

For anyone else still waiting on a fix, I've recompiled the working version from #24 with an updated metadata version of 14.

To install it simply download power-profile-switcher@eliapasquali.github.io.shell-extension.zip and run gnome-extensions install power-profile-switcher@eliapasquali.github.io.shell-extension.zip --force

This will replace the broken gnome-extensions version 14 and prevent auto updating until a patch is released.

Magniflex99 commented 1 year ago

For anyone else still waiting on a fix, I've recompiled the working version from #24 with an updated metadata version of 14.

To install it simply download power-profile-switcher@eliapasquali.github.io.shell-extension.zip and run gnome-extensions install power-profile-switcher@eliapasquali.github.io.shell-extension.zip --force

This will replace the broken gnome-extensions version 14 and prevent auto updating until a patch is released.

Sorry to bother you, I wanted to ask you if this solution of yours was still valid, I downloaded it, and it seems that even after a restart, Power Profile Switcher, opens and allows you to set the energy profiles you want according to your needs, but so is it really like this in practice? Finally, after the first restart with which the problem occurred to me, both from the settings, and from the Ubuntu quick panel (23.10), the ability to manage the energy plans, that is, the energy saving/balancing/performance selector, disappeared. Would you know how I could restore their vision?

GlitchWitch commented 12 months ago

Sorry to bother you, I wanted to ask you if this solution of yours was still valid, I downloaded it, and it seems that even after a restart, Power Profile Switcher, opens and allows you to set the energy profiles you want according to your needs, but so is it really like this in practice? Finally, after the first restart with which the problem occurred to me, both from the settings, and from the Ubuntu quick panel (23.10), the ability to manage the energy plans, that is, the energy saving/balancing/performance selector, disappeared. Would you know how I could restore their vision?

@Magniflex99 Asking for help is fine, but this is not the right place for it as it's unrelated to this issue.

I'd suggest making a new issue to get support.

I will point out that if you have TLP 1.6 installed it conflicts with power-profiles-daemon and so that may have gotten automatically removed. You can try reinstalling power-profiles-daemon with sudo apt-get install power-profiles-daemon.

dmy3k commented 12 months ago

Currently published version for GNOME 45 sits broken for over a month without any attention from maintainer. Therefore I have created a fork auto-power-profile that includes the fix.

Magniflex99 commented 12 months ago

Sorry to bother you, I wanted to ask you if this solution of yours was still valid, I downloaded it, and it seems that even after a restart, Power Profile Switcher, opens and allows you to set the energy profiles you want according to your needs, but so is it really like this in practice? Finally, after the first restart with which the problem occurred to me, both from the settings, and from the Ubuntu quick panel (23.10), the ability to manage the energy plans, that is, the energy saving/balancing/performance selector, disappeared. Would you know how I could restore their vision?

@Magniflex99 Asking for help is fine, but this is not the right place for it as it's unrelated to this issue.

I'd suggest making a new issue to get support.

I will point out that if you have TLP 1.6 installed it conflicts with power-profiles-daemon and so that may have gotten automatically removed. You can try reinstalling power-profiles-daemon with sudo apt-get install power-profiles-daemon.

Got it, thanks for your reply. I'll think about it better the next time I write.

eliapasquali commented 12 months ago

Hello everyone,

In the past month, various commitments and unforeseen events have prevented me from being responsive in addressing the issue with GNOME 45. I had attempted to make quick fixes, but encountered problems with publishing to the store.

Meanwhile, I noticed that @dmy3k has created a stable version, adding quick settings. I was relying on this extension to have an indicator of the current state, but unfortunately, it is no longer supported.

I express my gratitude to him and @GlitchWitch for handling questions in my absence. Once the code is stabilized, I will also try to address the issue with @Magniflex99.

Now, I will work on retrieving the current state of the project so that I can resume maintaining the extension. I've wrote to @dmy3k to have a recap, any additional assistance is highly welcome.

I apologize once again for my absence, Elia

eliapasquali commented 11 months ago

This should be fixed, if someone still have problems just open a new issue