[Fixed] Two problems after yesterday's system update

You have a problem with Slackel? Post here and we'll do what we can to help.
Papasot
Posts: 231
Joined: 13 May 2016 22:32
Location: Patras, Greece

[Fixed] Two problems after yesterday's system update

Post by Papasot »

After a recent update (31 Nov 2020), wm-logout doesn't work anymore. The usual suspect for that problem used to be mozjs in the past (see here), but this time I don't think this is the case, because plugging a usb stick as normal user still works. If mozjs was the problem, I would expect both wm-logout and usb access won't work.
This is what I get when trying to logout with wm-logout:

Code: Select all

ap[~]$ wm-logout 
Traceback (most recent call last):
  File "/usr/bin/wm-logout", line 174, in <module>
    wmlogout = WMLogout()
  File "/usr/bin/wm-logout", line 42, in __init__
    self.gtk_init()
  File "/usr/bin/wm-logout", line 144, in gtk_init
    self.btn_suspend.set_sensitive(self.upower.SuspendAllowed())
  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 147, in __call__
    **keywords)
  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 653, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: No such method “SuspendAllowed”
My best guess would be the problem has to do with python or gtk. But those packages were not updated recently. Last update for both of them was at 23 November, it was related to KDE only, and the problem with wm-logout appeared yesterday, not after updating the system at 23 November. Plus I am using Openbox, not KDE.

Another problem that appeared at the same time is that I no longer see the keyboard layout icon in taskbar. Switching keyboard layouts with Alt+Shift still works but there is no indication of the layout used in the task bar. I did not change anything in ~/.config/openbox or ~/.config/fbpanel. I doubt this problem is related with wm-layout's problem, but they both appeared after yesterday's update. Both were working normally before that. The problems appears in both Slackel 32 and 64 Openbox.
Last edited by Papasot on 02 Dec 2020 20:58, edited 1 time in total.
djemos
Site Admin
Posts: 676
Joined: 15 Apr 2016 06:03

Re: Two problems after yesterday's system update

Post by djemos »

New upower is the problem. Try in lxterminal

Code: Select all

dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend
get the error

Code: Select all

Error org.freedesktop.DBus.Error.UnknownMethod: No such method “Suspend”
So i changed wm-logout and added powerkit for suspend. fbxkb rebuilded because it needs gdk-pixbuf2-xlib as a dep. After upgrade fbxkb, the keyboard icon appeared in the fbpanel

Code: Select all

sudo slapt-get -u
sudo slapt-get -i wm-logout fbxkb powerkit
Papasot
Posts: 231
Joined: 13 May 2016 22:32
Location: Patras, Greece

Re: Two problems after yesterday's system update

Post by Papasot »

djemos wrote:So i changed wm-logout and added powerkit for suspend. fbxkb rebuilded because it needs gdk-pixbuf2-xlib as a dep. After upgrade fbxkb, the keyboard icon appeared in the fbpanel
Both problems solved. There is a small annoyance remaining: wm-logout now asks for user's password to shutdown (unless I recently used another application that asks for password, like Gslapt or Gparted). So trying to shutdown by openbox's "Exit" menu asks for password, pretty much like a sudo command. Shutting down using the new powerkit widget doesn't require any password.
I looked at /etc/group and there is no new group named "powerkit", as I suspected. So something else is going on.
djemos
Site Admin
Posts: 676
Joined: 15 Apr 2016 06:03

Re: Two problems after yesterday's system update

Post by djemos »

wm-logout now asks for user's password to shutdown
Yes, i know. I tried to find a quick way to solve the problem, so user can reboot or shutdown its system.
I will look at it to solve it permanently.
djemos
Site Admin
Posts: 676
Joined: 15 Apr 2016 06:03

Re: Two problems after yesterday's system update

Post by djemos »

wm-logout is working now. I have changed the code to use consolekit for suspend and hibernate.
For reboot and shutdown consolekit is used as before.
Papasot
Posts: 231
Joined: 13 May 2016 22:32
Location: Patras, Greece

Re: Two problems after yesterday's system update

Post by Papasot »

Indeed, everything is working now. I liked powerkit but since it is not necessary anymore, I uninstalled it.
djemos
Site Admin
Posts: 676
Joined: 15 Apr 2016 06:03

Re: [Fixed] Two problems after yesterday's system update

Post by djemos »

Yes. Powerkit is not necessary anymore.
I did a change to be sure suspend and hibernate is detected if it is supported by the user system.
do a

Code: Select all

sudo slapt-get --clean
sudo slapt-get -u
sudo slapt-get -i --reinstall wm-logout
type
cat /usr/bin/wm-logout |grep yes
If you get this output, it is ok

Code: Select all

if self.consolekit.CanSuspend() == "yes":
if self.consolekit.CanHibernate() == "yes":
Papasot
Posts: 231
Joined: 13 May 2016 22:32
Location: Patras, Greece

Re: [Fixed] Two problems after yesterday's system update

Post by Papasot »

Everything works fine. Thank you Dimitri!
djemos
Site Admin
Posts: 676
Joined: 15 Apr 2016 06:03

Re: [Fixed] Two problems after yesterday's system update

Post by djemos »

The powerkit is needed for battery icon to appear in panel, if user wants it. Of course cony also display battery information.
I patched batti to run in current but icon is not changed when unplug and plug cord power on laptop. I have also tried other baterry programs but i don't like them.
Only powerkit is working fine and is well looking on the fbpanel.
Papasot
Posts: 231
Joined: 13 May 2016 22:32
Location: Patras, Greece

Re: [Fixed] Two problems after yesterday's system update

Post by Papasot »

djemos wrote:I patched batti to run in current but icon is not changed when unplug and plug cord power on laptop. I have also tried other baterry programs but i don't like them.
Only powerkit is working fine and is well looking on the fbpanel.
I noticed batti was updated today. And indeed icon is not changed when AC power is off. I like batti because it is simple and lightweight. Powerkit offers more functionality and works as expected when AC power is off, but it is considerably "heavier" to start: on my older netbook, powerkit's icon appears a few seconds after anything else in fbpanel. I also don't like the fact there is no obvious way to turn it off, other than uninstalling it. With batti I can just comment the corresponding line in ~/.config/openbox/autostart.sh and uncomment it whenever I wish. I have to read more about powerkit and see how I can turn it off temporarily.
At any rate, I will use powerkit for now (but I keep batti installed in case it will work well in the future).
Post Reply