You are not logged in.

#1 2017-05-09 08:53:16

papa6
Member
Registered: 2013-02-26
Posts: 26

(solved) polkit or udisks2 problem

Hi everybody,
For last weeks, I've been facing long delay for several program (firefox, libreoffice, gimp, and so on, even okular) to go on while they should write on my disk ("save as" for instance).

The error message is (in French) :

Error creating proxy: Erreur lors de l'appel de StartServiceByName pour org.gtk.vfs.UDisks2VolumeMonitor : Le délai d'attente est dépassé (g-io-error-quark, 24)

Which means in English :

Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.UDisks2VolumeMonitor: Timeout was reached

My system is updated. My last releases are :

Is it a bug ?
Or should I have to do something ?
Thanks

Last edited by papa6 (2017-06-26 16:08:10)

Offline

#2 2017-05-09 20:18:15

seth
Member
Registered: 2012-09-03
Posts: 49,980

Re: (solved) polkit or udisks2 problem

id polkitd

Is polkitd running? Can you start it explicitly as "sudo -u polkitd /usr/lib/polkit-1/polkitd"

Offline

#3 2017-05-09 20:46:03

papa6
Member
Registered: 2013-02-26
Posts: 26

Re: (solved) polkit or udisks2 problem

Thanks Seth, the problem seems be there...
polkit is running :

$ id polkitd
uid=102(polkitd) gid=102(polkitd) groupes=102(polkitd),26(proc)

and

$ sudo -u polkitd /usr/lib/polkit-1/polkitd
[sudo] Mot de passe de xxx : ok ;-)
Error switcing to user polkitd: Error clearing groups: Operation not permitted
Exiting with code 1

(Btw the "switcing" word would be strange)

Offline

#4 2017-05-09 21:05:11

seth
Member
Registered: 2012-09-03
Posts: 49,980

Re: (solved) polkit or udisks2 problem

No. As you say polkitd is running and leaving aside the typo, the message is actually ok, polkit expects to be run as root and then alters the UID/GID itself (what it lacks permissions for when run as polkitd)
This is all fine.

sudo systemctl status udisks2
sudo systemctl start udisks2

The service is dbus activated (ie. something want to use it, that's noticed and the service starts implicitly) - what fails. So the above checks whether the actual service is running and otherwise attempts to start it the native way.
You could then "sudo systemctl enable udisks2", but that doesn't explain the failure in post #1 ...

Offline

#5 2017-05-10 10:16:10

papa6
Member
Registered: 2013-02-26
Posts: 26

Re: (solved) polkit or udisks2 problem

Ok, the udisks2.service wasn't enabled or started. Now, it's done.

But there is still the failure in post #1.

It looks like a bug. Do I report it ?

Offline

#6 2017-05-10 14:17:23

seth
Member
Registered: 2012-09-03
Posts: 49,980

Re: (solved) polkit or udisks2 problem

Sounds more like a dbus issue.

loginctl session-status
loginctl user-status
echo $DBUS_SESSION_BUS_ADDRESS

Offline

#7 2017-05-11 10:54:42

papa6
Member
Registered: 2013-02-26
Posts: 26

Re: (solved) polkit or udisks2 problem

ok, thanks seth if that can help:

$ sudo loginctl session-status
c1 - papa6 (1000)
           Since: Thu 2017-05-11 08:37:40 CEST; 4h 9min ago
          Leader: 409 (login)
            Seat: seat0; vc1
             TTY: tty1
         Service: login; type tty; class user
           State: active
            Unit: session-c1.scope
                  ├─ 409 login -- papa6
                  ├─ 471 -bash
                  ├─ 477 /bin/sh /usr/bin/startx
                  ├─ 499 xinit /home/papa6/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt1 -auth /tmp/serverauth.ZBaBRMA8rG
                  ├─ 500 /usr/lib/xorg-server/Xorg -nolisten tcp :0 vt1 -auth /tmp/serverauth.ZBaBRMA8rG
                  ├─ 504 fluxbox
                  ├─ 508 xterm
                  ├─ 547 bash
                  ├─ 548 xterm
                  ├─ 550 bash
                  ├─ 560 xterm
                  ├─ 562 bash
                  ├─1040 kdeinit5: Running...
                  ├─1041 /usr/lib/kf5/klauncher --fd=8
                  ├─3115 /usr/lib/firefox/firefox
                  ├─3259 geany
                  ├─3262 /bin/bash
                  ├─3266 sudo loginctl session-status
                  ├─3267 loginctl session-status
                  └─3268 loginctl session-status

mai 11 12:42:41 arch64 sudo[3228]: pam_unix(sudo:session): session opened for user root by papa6(uid=0)
mai 11 12:43:37 arch64 sudo[3228]: pam_unix(sudo:session): session closed for user root
mai 11 12:43:46 arch64 sudo[3234]:   papa6 : TTY=pts/2 ; PWD=/home/papa6 ; USER=root ; COMMAND=/usr/bin/loginctl user-status
mai 11 12:43:46 arch64 sudo[3234]: pam_unix(sudo:session): session opened for user root by papa6(uid=0)
mai 11 12:44:35 arch64 sudo[3234]: pam_unix(sudo:session): session closed for user root
mai 11 12:44:36 arch64 sudo[3237]:   papa6 : TTY=pts/2 ; PWD=/home/papa6 ; USER=root ; COMMAND=/usr/bin/loginctl user-status
mai 11 12:44:36 arch64 sudo[3237]: pam_unix(sudo:session): session opened for user root by papa6(uid=0)
mai 11 12:45:17 arch64 sudo[3237]: pam_unix(sudo:session): session closed for user root
mai 11 12:47:18 arch64 sudo[3266]:   papa6 : TTY=pts/2 ; PWD=/home/papa6 ; USER=root ; COMMAND=/usr/bin/loginctl session-status
mai 11 12:47:18 arch64 sudo[3266]: pam_unix(sudo:session): session opened for user root by papa6(uid=0)
$ sudo loginctl user-status
papa6 (1000)
           Since: Thu 2017-05-11 08:37:40 CEST; 4h 10min ago
           State: active
        Sessions: *c1
          Linger: no
            Unit: user-1000.slice
                  ├─session-c1.scope
                  │ ├─ 409 login -- papa6
                  │ ├─ 471 -bash
                  │ ├─ 477 /bin/sh /usr/bin/startx
                  │ ├─ 499 xinit /home/papa6/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt1 -auth /tmp/serverauth.ZBaBRMA8rG
                  │ ├─ 500 /usr/lib/xorg-server/Xorg -nolisten tcp :0 vt1 -auth /tmp/serverauth.ZBaBRMA8rG
                  │ ├─ 504 fluxbox
                  │ ├─ 508 xterm
                  │ ├─ 547 bash
                  │ ├─ 548 xterm
                  │ ├─ 550 bash
                  │ ├─ 560 xterm
                  │ ├─ 562 bash
                  │ ├─1040 kdeinit5: Running...
                  │ ├─1041 /usr/lib/kf5/klauncher --fd=8
                  │ ├─3115 /usr/lib/firefox/firefox
                  │ ├─3259 geany
                  │ ├─3262 /bin/bash
                  │ ├─3273 sudo loginctl user-status
                  │ ├─3274 loginctl user-status
                  │ └─3275 loginctl user-status
                  └─user@1000.service
                    ├─at-spi-dbus-bus.service
                    │ └─609 /usr/lib/at-spi2-core/at-spi-bus-launcher
                    ├─dbus.service
                    │ ├─559 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
                    │ └─608 /usr/lib/GConf/gconfd-2
                    ├─gvfs-daemon.service
                    │ ├─564 /usr/lib/gvfs/gvfsd
                    │ └─569 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
                    └─init.scope
                      ├─465 /usr/lib/systemd/systemd --user
                      └─467 (sd-pam)

mai 11 12:43:46 arch64 sudo[3234]: pam_unix(sudo:session): session opened for user root by papa6(uid=0)
mai 11 12:44:35 arch64 sudo[3234]: pam_unix(sudo:session): session closed for user root
mai 11 12:44:36 arch64 sudo[3237]:   papa6 : TTY=pts/2 ; PWD=/home/papa6 ; USER=root ; COMMAND=/usr/bin/loginctl user-status
mai 11 12:44:36 arch64 sudo[3237]: pam_unix(sudo:session): session opened for user root by papa6(uid=0)
mai 11 12:45:17 arch64 sudo[3237]: pam_unix(sudo:session): session closed for user root
mai 11 12:47:18 arch64 sudo[3266]:   papa6 : TTY=pts/2 ; PWD=/home/papa6 ; USER=root ; COMMAND=/usr/bin/loginctl session-status
mai 11 12:47:18 arch64 sudo[3266]: pam_unix(sudo:session): session opened for user root by papa6(uid=0)
mai 11 12:47:21 arch64 sudo[3266]: pam_unix(sudo:session): session closed for user root
mai 11 12:48:31 arch64 sudo[3273]:   papa6 : TTY=pts/2 ; PWD=/home/papa6 ; USER=root ; COMMAND=/usr/bin/loginctl user-status
mai 11 12:48:31 arch64 sudo[3273]: pam_unix(sudo:session): session opened for user root by papa6(uid=0)
$ echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/run/user/1000/bus

Offline

#8 2017-05-11 13:11:52

seth
Member
Registered: 2012-09-03
Posts: 49,980

Re: (solved) polkit or udisks2 problem

Looks legit, but why did you sudo the command?
What does your xinitrc look like?

Offline

#9 2017-05-11 13:53:35

papa6
Member
Registered: 2013-02-26
Posts: 26

Re: (solved) polkit or udisks2 problem

Sorry, I sudo because I've seen "ctl" (loginctl) and I thought it was better.

$ loginctl user-status
papa6 (1000)
           Since: Thu 2017-05-11 08:37:40 CEST; 6h ago
           State: active
        Sessions: *c1
          Linger: no
            Unit: user-1000.slice
                  ├─session-c1.scope
                  │ ├─ 409 login -- papa6
                  │ ├─ 471 -bash
                  │ ├─ 477 /bin/sh /usr/bin/startx
                  │ ├─ 499 xinit /home/papa6/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt1 -auth /tmp/serverauth.ZBaBRMA8rG
                  │ ├─ 500 /usr/lib/xorg-server/Xorg -nolisten tcp :0 vt1 -auth /tmp/serverauth.ZBaBRMA8rG
                  │ ├─ 504 fluxbox
                  │ ├─ 508 xterm
                  │ ├─ 547 bash
                  │ ├─ 548 xterm
                  │ ├─ 550 bash
                  │ ├─ 560 xterm
                  │ ├─ 562 bash
                  │ ├─1040 kdeinit5: Running...
                  │ ├─1041 /usr/lib/kf5/klauncher --fd=8
                  │ ├─3115 /usr/lib/firefox/firefox
                  │ ├─3259 geany
                  │ ├─3262 /bin/bash
                  │ ├─3362 gimp-2.8 /tmp/mozilla_papa60/URBAN DAY AFFICHE A3.jpg
                  │ ├─3376 /usr/lib/gimp/2.0/plug-ins/script-fu -gimp 12 11 -run 0
                  │ ├─4220 loginctl user-status
                  │ └─4221 less
                  └─user@1000.service
                    ├─at-spi-dbus-bus.service
                    │ └─609 /usr/lib/at-spi2-core/at-spi-bus-launcher
                    ├─dbus.service
                    │ ├─ 559 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
                    │ ├─ 608 /usr/lib/GConf/gconfd-2
                    │ └─3526 /usr/lib/dconf/dconf-service
                    ├─gvfs-daemon.service
                    │ ├─ 564 /usr/lib/gvfs/gvfsd
                    │ ├─ 569 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
                    │ ├─3499 /usr/lib/gvfs/gvfsd-trash --spawner :1.2 /org/gtk/gvfs/exec_spaw/0
                    │ ├─3516 /usr/lib/gvfs/gvfsd-network --spawner :1.2 /org/gtk/gvfs/exec_spaw/1
                    │ └─3524 /usr/lib/gvfs/gvfsd-dnssd --spawner :1.2 /org/gtk/gvfs/exec_spaw/2
                    ├─gvfs-metadata.service
                    │ └─3365 /usr/lib/gvfs/gvfsd-metadata
                    └─init.scope
                      ├─465 /usr/lib/systemd/systemd --user
                      └─467 (sd-pam)

mai 11 13:04:30 arch64 systemd[465]: Started Virtual filesystem metadata service.
mai 11 13:17:50 arch64 dbus-daemon[559]: Activating via systemd: service name='org.gtk.vfs.UDisks2VolumeMonitor' unit='gvfs-udisks2-volume-monitor.s
mai 11 13:17:51 arch64 systemd[465]: Starting Virtual filesystem service - disk device monitor...
mai 11 13:18:21 arch64 dbus-daemon[559]: Activating service name='ca.desrt.dconf'
mai 11 13:18:22 arch64 dbus-daemon[559]: Successfully activated service 'ca.desrt.dconf'
mai 11 13:19:21 arch64 systemd[465]: gvfs-udisks2-volume-monitor.service: Start operation timed out. Terminating.
mai 11 13:19:21 arch64 systemd[465]: Failed to start Virtual filesystem service - disk device monitor.
mai 11 13:19:21 arch64 systemd[465]: gvfs-udisks2-volume-monitor.service: Unit entered failed state.
mai 11 13:19:21 arch64 systemd[465]: gvfs-udisks2-volume-monitor.service: Failed with result 'timeout'.
mai 11 13:19:50 arch64 dbus-daemon[559]: Failed to activate service 'org.gtk.vfs.UDisks2VolumeMonitor': timed out

My .xinitrc only contains "exec startfluxbox"
Btw, my /usr/lib/systemd/ is :

drwxr-xr-x 13 root root 4096  8 févr. 10:24 /usr/lib/systemd/

Offline

#10 2017-05-11 14:08:02

seth
Member
Registered: 2012-09-03
Posts: 49,980

Re: (solved) polkit or udisks2 problem

https://wiki.archlinux.org/index.php/Xinit

Note: At the very least, ensure that the last if block in /etc/X11/xinit/xinitrc is present in your .xinitrc file to ensure that the scripts in /etc/X11/xinit/xinitrc.d are sourced.

Offline

#11 2017-05-11 20:38:04

papa6
Member
Registered: 2013-02-26
Posts: 26

Re: (solved) polkit or udisks2 problem

seth wrote:

Note: At the very least, ensure that the last if block in /etc/X11/xinit/xinitrc is present in your .xinitrc file to ensure that the scripts in /etc/X11/xinit/xinitrc.d are sourced.

I am not sure about what you called the last block.

I've changed my .xinitrc, but it still doesn't work:

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

exec startfluxbox

Offline

#12 2017-06-26 16:09:20

papa6
Member
Registered: 2013-02-26
Posts: 26

Re: (solved) polkit or udisks2 problem

Solved : there was an error in my fstab...
Now, that's ok, thanks smile

Last edited by papa6 (2017-06-26 16:10:18)

Offline

Board footer

Powered by FluxBB