FEATURE REQUEST: Add AC / DC power profile switching
Hi,
Is it possible to add AC/DC profile switching to the app? I know in other comments you had mentioned not wanting to replicated supergfxctl features but if there was a way to automate a changing of both cpu/gpu modes for AC/DC profiles when plugged / unplugged that would be great!
thanks for the great work! you have made my laptop Stealth-16-Studio-A13VX finally usable in linux!
@TAGE7 it's still early to talk about it, but here:
This setting should apply on each charger connection/disconnection, so you can select other modes and it wont change until the charger status changes (un/plugged)
this is awesome!! looking forward to this being available. apologies for not seeing this earlier.
@TAGE7 can you share the output of
upower -e
i need you to do the following:
-
connect the charger
-
run
dbus-monitor --system "interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='/org/freedesktop/UPower/devices/DisplayDevice'"
-
disconnect the charger
-
reconnect the charger again
-
copy and paste the output here (not screenshot)
.-------------------------: masonaterr@gf63-10sc
.+=========================. --------------------
:++===++==================- :++- OS: CachyOS x86_64
:*++====+++++=============- .==: Host: GF63 Thin 10SC (REV:1.0)
-*+++=====+***++==========: Kernel: Linux 6.18.5-2-cachyos
=*++++========------------: Uptime: 7 mins
=*+++++=====- ... Packages: 1617 (pacman), 45 (flatpak)
.+*+++++=-===: .=+++=: Shell: fish 4.3.3
:++++=====-==: -*****+ Display (CMN15E7): 1920x1080 in 16", 60 Hz [Built-i]
:++========-=. .=+**+. DE: KDE Plasma 6.5.5
.+==========-. . WM: KWin (Wayland)
:+++++++====- .--==-. WM Theme: Breeze
:++==========. :+++++++: Theme: Breeze (CachyOSNordLightly) [Qt], Breeze-Dar]
.-===========. =*****+*+ Icons: breeze-dark [Qt], breeze-dark [GTK2/3/4]
.-===========: .+*****+: Font: Noto Sans (10pt) [Qt], Noto Sans (10pt) [GTK2]
-=======++++:::::::::::::::::::::::::-: .---: Cursor: breeze (24px)
:======++++====+++******************=. Terminal: konsole 25.12.1
:=====+++==========++++++++++++++*- CPU: Intel(R) Core(TM) i5-10500H (12) @ 4.50 GHz
.====++==============++++++++++*- GPU 1: NVIDIA GeForce GTX 1650 Mobile / Max-Q [Disc]
.===+==================+++++++: GPU 2: Intel UHD Graphics @ 1.05 GHz [Integrated]
.-=======================+++: Memory: 3.28 GiB / 15.38 GiB (21%)
.......................... Swap: 0 B / 15.38 GiB (0%)
Disk (/): 136.41 GiB / 411.46 GiB (33%) - btrfs
Local IP (wlan0): 10.98.9.208/19
Battery (BIF0_9): 63% [Charging, AC Connected]
Locale: en_US.UTF-8
~
❯ dbus-monitor --system "interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='/org/freedesktop/UPower/devices/DisplayDevice'"
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Sender is not authorized to send message". Falling back to eavesdropping.
signal time=1768415415.958909 sender=org.freedesktop.DBus -> destination=:1.100 serial=4294967295 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.100"
signal time=1768415428.458234 sender=:1.43 -> destination=(null destination) serial=100 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "IconName"
variant string "battery-full-symbolic"
)
dict entry(
string "UpdateTime"
variant uint64 1768415428
)
dict entry(
string "TimeToFull"
variant int64 0
)
dict entry(
string "EnergyRate"
variant double 0
)
dict entry(
string "Energy"
variant double 28.671
)
dict entry(
string "State"
variant uint32 2
)
]
array [
]
signal time=1768415429.576612 sender=:1.43 -> destination=(null destination) serial=103 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "UpdateTime"
variant uint64 1768415429
)
dict entry(
string "Energy"
variant double 28.6824
)
]
array [
]
signal time=1768415432.928671 sender=:1.43 -> destination=(null destination) serial=107 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "UpdateTime"
variant uint64 1768415432
)
dict entry(
string "Energy"
variant double 28.671
)
]
array [
]
signal time=1768415434.049858 sender=:1.43 -> destination=(null destination) serial=109 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "UpdateTime"
variant uint64 1768415434
)
dict entry(
string "Energy"
variant double 28.6596
)
]
array [
]
signal time=1768415439.182158 sender=:1.43 -> destination=(null destination) serial=111 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "UpdateTime"
variant uint64 1768415439
)
dict entry(
string "TimeToEmpty"
variant int64 5035
)
dict entry(
string "EnergyRate"
variant double 20.4744
)
dict entry(
string "Energy"
variant double 28.6368
)
]
array [
]
signal time=1768415443.298070 sender=:1.43 -> destination=(null destination) serial=114 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "IconName"
variant string "battery-full-charging-symbolic"
)
dict entry(
string "UpdateTime"
variant uint64 1768415443
)
dict entry(
string "TimeToEmpty"
variant int64 0
)
dict entry(
string "EnergyRate"
variant double 0
)
dict entry(
string "Energy"
variant double 28.6254
)
dict entry(
string "State"
variant uint32 5
)
]
array [
]
signal time=1768415444.407923 sender=:1.43 -> destination=(null destination) serial=117 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "UpdateTime"
variant uint64 1768415444
)
dict entry(
string "Energy"
variant double 28.614
)
dict entry(
string "State"
variant uint32 1
)
]
array [
]
signal time=1768415447.745806 sender=:1.43 -> destination=(null destination) serial=121 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "UpdateTime"
variant uint64 1768415447
)
dict entry(
string "Energy"
variant double 28.6254
)
]
array [
]
signal time=1768415448.864347 sender=:1.43 -> destination=(null destination) serial=123 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "UpdateTime"
variant uint64 1768415448
)
dict entry(
string "Energy"
variant double 28.6368
)
]
array [
]
signal time=1768415453.984427 sender=:1.43 -> destination=(null destination) serial=125 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "UpdateTime"
variant uint64 1768415453
)
dict entry(
string "TimeToFull"
variant int64 2540
)
dict entry(
string "EnergyRate"
variant double 24.0084
)
dict entry(
string "Energy"
variant double 28.671
)
]
array [
]
Hello. I don't want to be annoying, but what is the progress on this so far?
@MasonT8198 im currently testing the feature, it works even if the charger state changes during sleep. only thing left is to find a good way to save the user preference for each state.
UI changed a bit but stays very similar to the one i posted earlier.
@MasonT8198 can you do the as mentioned in https://github.com/dmitry-s93/MControlCenter/issues/249#issuecomment-3750675443 ? only if you don't use arch linux
@MasonT8198 im currently testing the feature, it works even if the charger state changes during sleep. only thing left is to find a good way to save the user preference for each state.
UI changed a bit but stays very similar to the one i posted earlier.
I believe you made a wrong mention, but thanks for the quick response. Looking forward to this feature.
$ dbus-monitor --system "interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='/org/freedesktop/UPower/devices/DisplayDevice'"
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.559" (uid=1000 pid=309515 comm="dbus-monitor --system interface='org.freedesktop.D" label="unconfined") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
signal time=1772109056.921937 sender=org.freedesktop.DBus -> destination=:1.559 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.559"
signal time=1772109067.489997 sender=:1.21 -> destination=(null destination) serial=1216 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "IconName"
variant string "battery-full-symbolic"
)
dict entry(
string "UpdateTime"
variant uint64 1772109067
)
dict entry(
string "State"
variant uint32 2
)
]
array [
]
signal time=1772109071.895835 sender=:1.21 -> destination=(null destination) serial=1222 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "UpdateTime"
variant uint64 1772109071
)
dict entry(
string "Energy"
variant double 41.268
)
]
array [
]
signal time=1772109078.105023 sender=:1.21 -> destination=(null destination) serial=1225 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "UpdateTime"
variant uint64 1772109078
)
dict entry(
string "TimeToEmpty"
variant int64 5834
)
dict entry(
string "EnergyRate"
variant double 25.4334
)
dict entry(
string "Energy"
variant double 41.2224
)
]
array [
]
signal time=1772109098.344728 sender=:1.21 -> destination=(null destination) serial=1228 path=/org/freedesktop/UPower/devices/DisplayDevice; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.freedesktop.UPower.Device"
array [
dict entry(
string "IconName"
variant string "battery-full-charging-symbolic"
)
dict entry(
string "UpdateTime"
variant uint64 1772109098
)
dict entry(
string "TimeToEmpty"
variant int64 0
)
dict entry(
string "EnergyRate"
variant double 0
)
dict entry(
string "Energy"
variant double 41.0742
)
dict entry(
string "State"
variant uint32 5
)
]
array [
]
I am on Zorin os 18 (Basically just ubuntu 24.04)
@defaultUser822 yes it seems that i tagged another user, and thanks for the output, now i can be sure that the feature will work once it's merged.
Do you know if zorin comes with power profiles daemon by default? usually it shows up as a slider in the system tray that allows you to change performance modes (power save, balanced, performance)?
@mutchiko You are welcome.
About the power profiles thing, is this what you are talking about?
@defaultUser822 yes, thats what i wanted to see.
do you have an option in the settings to automatically switch between these profiles when the charger is dis/connected?
@mutchiko No, there is no option in the settings to automatically switch between the profiles depending on whether the charger is connected or not. This is just regular Gnome 46 btw.
If this is relevant, here's a screenshot of all of the power settings.
@defaultUser822 i see now, this isn't as close to kde as i hoped it would be, thanks for sharing.
i can't give any ETAs on when the feature will be added, if the new branch doesn't show up before monday, you can expect to wait more time on it.
@defaultUser822 i see now, this isn't as close to kde as i hoped it would be, thanks for sharing. You are welcome.
i can't give any ETAs on when the feature will be added, if the new branch doesn't show up before monday, you can expect to wait more time on it.
I understand that, thanks anyway.
@TAGE7 @MasonT8198 @defaultUser822 if any of you is still interested in this feature, please build from source this branch and report back with results.
if you need steps for that, just ask
@TAGE7 @MasonT8198 @defaultUser822 if any of you is still interested in this feature, please build from source this branch and report back with results.
if you need steps for that, just ask
[100%] Linking CXX executable mcontrolcenter
/usr/bin/ld: CMakeFiles/mcontrolcenter.dir/src/mainwindow.cpp.o: in function `MainWindow::MainWindow(QWidget*)':
mainwindow.cpp:(.text+0x2428): undefined reference to `PowerMonitor::currentChargerState(bool)'
/usr/bin/ld: mainwindow.cpp:(.text+0x24ab): undefined reference to `PowerMonitor::currentPowerProfile(PowerProfile)'
/usr/bin/ld: CMakeFiles/mcontrolcenter.dir/src/mainwindow.cpp.o: in function `MainWindow::on_userModeOnBatteryComboBox_currentIndexChanged(int) const':
mainwindow.cpp:(.text+0x6c7a): undefined reference to `PowerMonitor::queryChargerState()'
/usr/bin/ld: CMakeFiles/mcontrolcenter.dir/src/mainwindow.cpp.o: in function `MainWindow::on_userModeOnChargerComboBox_currentIndexChanged(int) const':
mainwindow.cpp:(.text+0x6d56): undefined reference to `PowerMonitor::queryChargerState()'
/usr/bin/ld: CMakeFiles/mcontrolcenter.dir/src/mainwindow.cpp.o: in function `MainWindow::on_autoAcDcProfilesGroupBox_toggled(bool)':
mainwindow.cpp:(.text+0x6df8): undefined reference to `PowerMonitor::connectToUpower()'
/usr/bin/ld: mainwindow.cpp:(.text+0x6ed5): undefined reference to `PowerMonitor::disconnectFromPowerProfiles()'
/usr/bin/ld: mainwindow.cpp:(.text+0x6f22): undefined reference to `PowerMonitor::queryChargerState()'
/usr/bin/ld: mainwindow.cpp:(.text+0x6f52): undefined reference to `PowerMonitor::disconnectFromUpower()'
/usr/bin/ld: CMakeFiles/mcontrolcenter.dir/src/mainwindow.cpp.o: in function `MainWindow::on_autoPPDCheckBox_toggled(bool)':
mainwindow.cpp:(.text+0x7088): undefined reference to `PowerMonitor::connectToPowerProfiles()'
/usr/bin/ld: mainwindow.cpp:(.text+0x7146): undefined reference to `PowerMonitor::disconnectFromUpower()'
/usr/bin/ld: mainwindow.cpp:(.text+0x720f): undefined reference to `PowerMonitor::queryPowerProfile()'
/usr/bin/ld: CMakeFiles/mcontrolcenter.dir/src/mainwindow.cpp.o: in function `__static_initialization_and_destruction_0()':
mainwindow.cpp:(.text+0xd4a0): undefined reference to `PowerMonitor::PowerMonitor()'
/usr/bin/ld: CMakeFiles/mcontrolcenter.dir/src/mainwindow.cpp.o: in function `QMetaObject::Connection QObject::connect<void (PowerMonitor::*)(bool), void (MainWindow::*)(bool)>(QtPrivate::FunctionPointer<void (PowerMonitor::*)(bool)>::Object const*, void (PowerMonitor::*)(bool), QtPrivate::ContextTypeForFunctor<void (MainWindow::*)(bool), void>::ContextType const*, void (MainWindow::*&&)(bool), Qt::ConnectionType)':
mainwindow.cpp:(.text._ZN7QObject7connectIM12PowerMonitorFvbEM10MainWindowFvbEEEN11QMetaObject10ConnectionEPKN9QtPrivate15FunctionPointerIT_E6ObjectESB_PKNS9_21ContextTypeForFunctorIT0_vE11ContextTypeEOSH_N2Qt14ConnectionTypeE[_ZN7QObject7connectIM12PowerMonitorFvbEM10MainWindowFvbEEEN11QMetaObject10ConnectionEPKN9QtPrivate15FunctionPointerIT_E6ObjectESB_PKNS9_21ContextTypeForFunctorIT0_vE11ContextTypeEOSH_N2Qt14ConnectionTypeE]+0x8e): undefined reference to `PowerMonitor::staticMetaObject'
/usr/bin/ld: CMakeFiles/mcontrolcenter.dir/src/mainwindow.cpp.o: in function `QMetaObject::Connection QObject::connect<void (PowerMonitor::*)(PowerProfile), void (MainWindow::*)(PowerProfile)>(QtPrivate::FunctionPointer<void (PowerMonitor::*)(PowerProfile)>::Object const*, void (PowerMonitor::*)(PowerProfile), QtPrivate::ContextTypeForFunctor<void (MainWindow::*)(PowerProfile), void>::ContextType const*, void (MainWindow::*&&)(PowerProfile), Qt::ConnectionType)':
mainwindow.cpp:(.text._ZN7QObject7connectIM12PowerMonitorFv12PowerProfileEM10MainWindowFvS2_EEEN11QMetaObject10ConnectionEPKN9QtPrivate15FunctionPointerIT_E6ObjectESC_PKNSA_21ContextTypeForFunctorIT0_vE11ContextTypeEOSI_N2Qt14ConnectionTypeE[_ZN7QObject7connectIM12PowerMonitorFv12PowerProfileEM10MainWindowFvS2_EEEN11QMetaObject10ConnectionEPKN9QtPrivate15FunctionPointerIT_E6ObjectESC_PKNSA_21ContextTypeForFunctorIT0_vE11ContextTypeEOSI_N2Qt14ConnectionTypeE]+0x8e): undefined reference to `PowerMonitor::staticMetaObject'
/usr/bin/ld: CMakeFiles/mcontrolcenter.dir/src/mainwindow.cpp.o: in function `PowerMonitor::~PowerMonitor()':
mainwindow.cpp:(.text._ZN12PowerMonitorD2Ev[_ZN12PowerMonitorD5Ev]+0xf): undefined reference to `vtable for PowerMonitor'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/mcontrolcenter.dir/build.make:242: mcontrolcenter] Error 1
make[1]: *** [CMakeFiles/Makefile2:114: CMakeFiles/mcontrolcenter.dir/all] Error 2
make: *** [Makefile:136: all] Error 2