FS#40193 - [cinnamon-control-center] Please integrate upower 0.99 patch to fix "Power" module
Attached to Project:
Community Packages
Opened by sb56637 (sb56637) - Friday, 02 May 2014, 20:50 GMT
Last edited by Balló György (City-busz) - Thursday, 31 July 2014, 17:26 GMT
Opened by sb56637 (sb56637) - Friday, 02 May 2014, 20:50 GMT
Last edited by Balló György (City-busz) - Thursday, 31 July 2014, 17:26 GMT
|
Details
The "Power" module of the Cinnamon System Settings is
currently broken. Therefore, hibernate/suspend/screensaver
settings can not be adjusted. Upon trying to open it from
the console it fails with this error:
---------------- Loading Power module /usr/bin/python2: symbol lookup error: /usr/lib/cinnamon-control-center-1/panels/libpower.so: undefined symbol: up_client_get_can_hibernate ---------------- The Mint/Cinnamon developers will not want to fix this bug since it only affects the newer upower 0.99 version that Arch uses. Please integrate the following patch to panels/power/cc-power-panel.c : https://github.com/linuxmint/cinnamon-control-center/commit/5d718737b41584076b0626b570afd99b1e3a6d5c This patch has been tested to work and fixes the problem for Arch. Thanks. |
This task depends upon
Closed by Balló György (City-busz)
Thursday, 31 July 2014, 17:26 GMT
Reason for closing: Fixed
Additional comments about closing: cinnamon-control-center 2.2.10-2
Thursday, 31 July 2014, 17:26 GMT
Reason for closing: Fixed
Additional comments about closing: cinnamon-control-center 2.2.10-2
Python module
Loading Power module
/usr/bin/python2: symbol lookup error: /usr/lib/cinnamon-control-center-1/panels/libpower.so: undefined symbol: up_client_get_can_hibernate
This causes cinnamon-settings to exit and no panel is displayed.
$ pacman -Qi cinnamon-control-center
Name : cinnamon-control-center
Version : 2.2.7-1
Description : The Control Center for Cinnamon
Architecture : x86_64
URL : https://github.com/linuxmint/cinnamon-control-center
Licences : GPL
Groups : None
Provides : None
Depends On : cinnamon-settings-daemon cinnamon-translations
cinnamon-menus libgnomekbd network-manager-applet
Optional Deps : gnome-color-manager: for color management tasks [installed]
Required By : cinnamon
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 6034.00 KiB
Packager : Balló György <ballogyor+arch@gmail.com>
Build Date : Mon 12 May 2014 01:24:05 UTC
Install Date : Thu 15 May 2014 06:50:01 UTC
Install Reason : Explicitly installed
Install Script : Yes
Validated By : Signature
patch to fix
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index fb8e1b4..43bd2f4 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -934,10 +934,18 @@ disable_unavailable_combo_items (CcPowerPanel *self,
-1);
switch (value_tmp) {
case CSD_POWER_ACTION_SUSPEND:
+#if ! UP_CHECK_VERSION(0,99,0)
enabled = cc_login1("CanSuspend") || up_client_get_can_suspend (self->priv->up_client);
+#else
+ enabled = cc_login1("CanSuspend");
+#endif
break;
case CSD_POWER_ACTION_HIBERNATE:
+#if ! UP_CHECK_VERSION(0,99,0)
enabled = cc_login1("CanHibernate") || up_client_get_can_hibernate (self->priv->up_client);
+#else
+ enabled = cc_login1("CanSuspend");
+#endif
break;
default:
enabled = TRUE;
Quote from leigh123linux on the issue upstream:
This issue isn't caused by upower-1.0 changes, in fact it's been deprecated since upower-0.9.20
http://cgit.freedesktop.org/upower/commit/?h=0.9&id=372c2f8d2922add987683a24b5d69902e05e2f97
and is fixed by this commit
https://github.com/linuxmint/cinnamon-control-center/commit/7d53209d99c6e5ea6c79d70a27ddef09298de7bf
something else is broken in arch, -1 for this patch being merged.
Issue was then closed upstream
from the upower sources libupower-glib/up-client.h
#ifdef UPOWER_ENABLE_DEPRECATED
gboolean up_client_get_can_hibernate (UpClient *client);
#endif
.....
#ifdef UPOWER_ENABLE_DEPRECATED
gboolean up_client_get_can_suspend (UpClient *client);
#endif
Unless upower is built with --enable-deprecated the functions will be undefined (cinnamon-control-centre does not check this at build or runtime) The patch checks against the current API version as upower does not provide a macro to check for versions greater than or equal to 0.92 and avoids using deprecated functions that may not be built. New patch attached to check at configure time if the deprecated functions are available (assumes if one of the deprecated functions is available the other will be ) Accidentally attached patch and can not delete duplicate. Do the maintainers want to discuss the patch / issue with upstream?
upower_deprecated.patch (1.6 KiB)
This is C code that gets compiled, not PHP code.
I have had no success so far and am not sure I am even being listened to any more.
Download it to a folder, go to that folder in the terminal and install it with "pacman -U ./cinnamon-control-center-2.2.9-1.1-x86_64.pkg.tar.xz" (without the quotes).
@Alad: I not going to put a patched package in the AUR that is going to be obsolete within the next few weeks. I also can't be bothered.
Issue here is that the Power Module of [cinnamon-control-center] is still broken in [community], though I am providing fixed version via my Google Drive.
Here's a patched version of 2.2.10: https://drive.google.com/folderview?id=0B_6_fEdsgx-laTR0eE1MWmRtRkk&usp=drive_web#list
https://aur.archlinux.org/packages/cinnamon-control-center-upower/