You are not logged in.
Hello
This is related to this.
https://bbs.archlinux.org/viewtopic.php … 5#p2165005
I thought it is totally solved but I spoke too soon!
Just to be exact "dbus launch" causes the issue with running mpDris2 through xinitrc.
None of them was the cause of mpDris2 not functioning through its user service!
I have tested with these three services so far and they function as a new instance but not as service. (playerctld, mpd-mpris, mpDris2(These there are --user services.))
I checked their status while running but nothing was there to help me.
These are the running services and I believe they're functioning as they should!
[best8oy@DIAMOND ~]$ systemctl --type=service --state=running
UNIT LOAD ACTIVE SUB DESCRIPTION
dbus-broker.service loaded active running D-Bus System Message Bus
getty@tty1.service loaded active running Getty on tty1
NetworkManager.service loaded active running Network Manager
nvidia-persistenced.service loaded active running NVIDIA Persistence Daemon
optimus-manager.service loaded active running Optimus Manager Commands Daemon
polkit.service loaded active running Authorization Manager
rtkit-daemon.service loaded active running RealtimeKit Scheduling Policy Service
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running User Login Management
systemd-resolved.service loaded active running Network Name Resolution
systemd-udevd.service loaded active running Rule-based Manager for Device Events and Files
user@1000.service loaded active running User Manager for UID 1000
[best8oy@DIAMOND ~]$ systemctl list-unit-files --type=service --state=enabled
UNIT FILE STATE PRESET
getty@.service enabled enabled
NetworkManager-dispatcher.service enabled disabled
NetworkManager-wait-online.service enabled disabled
NetworkManager.service enabled disabled
nvidia-persistenced.service enabled disabled
optimus-manager.service enabled disabled
systemd-resolved.service enabled enabledWhat could possibly be the cause??
Last edited by BEST8OY (2024-04-17 14:51:48)
Offline
I think those are user services, right? So they would not be listed in the system services. Add the "--user" flag:
https://wiki.archlinux.org/title/Systemd/User
EDIT: nevermind - you noted in your post that these indeed are user services and you even mentioned the "--user" flag. But the command output you showed did not include the --user flag. So what's the question??
Last edited by Trilby (2024-04-17 13:44:56)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
That running services list will be for the system bus, rerun those with --user to get the user bus.
FFF5...
Last edited by V1del (2024-04-17 13:44:39)
Offline
Okay
I test with playerctld.service
[best8oy@DIAMOND ~]$ systemctl list-unit-files --user --type=service --state=enabled
UNIT FILE STATE PRESET
pipewire-pulse.service enabled enabled
pipewire.service enabled enabled
playerctld.service enabled enabled
wireplumber.service enabled enabled
xdg-user-dirs-update.service enabled enabled
5 unit files listed.
[best8oy@DIAMOND ~]$ systemctl --user --type=service --state=running
UNIT LOAD ACTIVE SUB DESCRIPTION
dbus-:1.2-org.mpris.MediaPlayer2.playerctld@1.service loaded active running dbus-:1.2-org.mpris.MediaPlayer2.playerctld@1.service
dbus-broker.service loaded active running D-Bus User Message Bus
pipewire-pulse.service loaded active running PipeWire PulseAudio
pipewire.service loaded active running PipeWire Multimedia Service
wireplumber.service loaded active running Multimedia Service Session Manager
xdg-permission-store.service loaded active running sandboxed app permission store
Legend: LOAD → Reflects whether the unit definition was properly loaded.
ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
SUB → The low-level unit activation state, values depend on unit type.
6 loaded units listed.
[best8oy@DIAMOND ~]$ systemctl --user status playerctld.service
○ playerctld.service - Keep track of media player activity
Loaded: loaded (/usr/lib/systemd/user/playerctld.service; enabled; preset: enabled)
Active: inactive (dead) since Wed 2024-04-17 17:15:42 +0330; 1min 16s ago
Process: 178778 ExecStart=/usr/bin/playerctld daemon (code=exited, status=0/SUCCESS)
Main PID: 178778 (code=exited, status=0/SUCCESS)
CPU: 12ms
Apr 17 17:15:42 DIAMOND systemd[665]: Starting Keep track of media player activity...
Apr 17 17:15:42 DIAMOND playerctld[178778]: playerctld successfully started with DBus service activation
Apr 17 17:15:42 DIAMOND systemd[665]: Finished Keep track of media player activity.As you can see playerctld is running but it doesn't function and if I run a new instance of playerctld it function as it should
Last edited by BEST8OY (2024-04-17 13:52:56)
Offline
As you can see playerctld is running but it doesn't function and if I run a new instance of playerctld it function as it should
What do you mean it "doesn't function". That's not an error message. And is it actually running? Can you find it with `pgrep`?
The service file might need to be adjusted. Honestly, I'm not sure of the best practices for service files for traditional daemons that fork themselves as playerctld seems to do ("modern" trends seem to discourage this behavior). Personally I'd just launch these from xinitrc directly (as one would do for urxvtd or similar traditional daemon processes).
Last edited by Trilby (2024-04-17 14:06:59)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
What do you mean it "doesn't function". That's not an error message. And is it actually running? Can you find it with `pgrep`?
The service file might need to be adjusted. Honestly, I'm not sure of the best practices for service files for traditional daemons that fork themselves as playerctld seems to do ("modern" trends seem to discourage this behavior).
Well playerctld should detect latest player that its status is changed!
The service can't do it and I should run a new instance of playerctld for it to work.(detect latest player)
I guess this is something related to playerctl because all these services I'm trying to run try to utilize playerctl
For example "playerctl -l" shows no output with mpd-mpris as service
But If I run a new instance of mpd-mpris through terminal "playerctl -l" shows "mpd"
How I deducted it's playerctl issue?
Well look at this
[best8oy@DIAMOND ~]$ systemctl --user status mpd-mpris.service
● mpd-mpris.service - mpd-mpris: An implementation of the MPRIS protocol for MPD
Loaded: loaded (/usr/lib/systemd/user/mpd-mpris.service; disabled; preset: enabled)
Active: active (running) since Wed 2024-04-17 17:33:11 +0330; 1min 51s ago
Main PID: 199983 (mpd-mpris)
Tasks: 9 (limit: 9140)
Memory: 5.8M (peak: 7.2M)
CPU: 162ms
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/mpd-mpris.service
└─199983 /usr/bin/mpd-mpris -no-instance
Apr 17 17:33:11 DIAMOND systemd[665]: Started mpd-mpris: An implementation of the MPRIS protocol for MPD.
Apr 17 17:33:11 DIAMOND mpd-mpris[199983]: 2024/04/17 17:33:11 mpd-mpris running
Apr 17 17:33:38 DIAMOND mpd-mpris[199983]: 2024/04/17 17:33:38 Volume changed to 100
Apr 17 17:34:39 DIAMOND mpd-mpris[199983]: 2024/04/17 17:34:39 Volume changed to 50
Apr 17 17:34:41 DIAMOND mpd-mpris[199983]: 2024/04/17 17:34:41 Volume changed to 100
Apr 17 17:34:57 DIAMOND mpd-mpris[199983]: 2024/04/17 17:34:57 Volume changed to 50
Apr 17 17:35:01 DIAMOND mpd-mpris[199983]: 2024/04/17 17:35:01 Volume changed to 100It shows mpd-mpris is actually connected to mpd (detecting volume changes) but playerctl is unable to detect it(mpd)!
As for playerctld, it seems to be broken; it's running but why is it saying finished tracking?
[best8oy@DIAMOND ~]$ systemctl --user status playerctld
○ playerctld.service - Keep track of media player activity
Loaded: loaded (/usr/lib/systemd/user/playerctld.service; enabled; preset: enabled)
Active: inactive (dead) since Wed 2024-04-17 17:48:51 +0330; 12s ago
Process: 219725 ExecStart=/usr/bin/playerctld daemon (code=exited, status=0/SUCCESS)
Main PID: 219725 (code=exited, status=0/SUCCESS)
CPU: 4ms
Apr 17 17:48:51 DIAMOND systemd[665]: Starting Keep track of media player activity...
Apr 17 17:48:51 DIAMOND playerctld[219725]: playerctld DBus service is already running
Apr 17 17:48:51 DIAMOND systemd[665]: Finished Keep track of media player activity.
[best8oy@DIAMOND ~]$ pgrep playerctld
219331The normal output of playerctld should be like this
[best8oy@DIAMOND ~]$ playerctld
(playerctld:222066): playerctl-WARNING **: 17:50:51.355: could not get properties for active player: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: No such interface ?org.mpris.MediaPlayer2.TrackList?
(playerctld:222066): playerctl-WARNING **: 17:50:51.357: could not get properties for active player: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: No such interface ?org.mpris.MediaPlayer2.Playlists?Last edited by BEST8OY (2024-04-17 14:24:31)
Offline
I guess just adding them to my xinitrc is the way to go! No headache!
Offline
I have to add
When running "playerctld daemon" it works as it should (detect the latest player) (it shows as /usr/bin/playerctld with parent:systemd and user:best8oy in "btop")
But when I have a oneshot service for playerctld (ExecStart=/usr/bin/playerctld daemon) and it shows the exact same information in "btop" but playerctld doesn't seem to work!
I'm so confused about the reason!
Last edited by BEST8OY (2024-04-17 15:59:33)
Offline