Il 11/01/2024 05:10, Max Nikulin ha scritto:
On 10/01/2024 01:59, Valerio Vanni wrote:
Il 06/01/2024 17:38, Max Nikulin ha scritto:

I would expect something like "Stop" either from /Player or from org.mpris.kaffeine.

I too expected something similar: stop and play (play for resume)

Have you tried "tree" and "introspect" for org.mpris.kaffeine (not org.kde.kaffeine)? It works for mpv:

Yes, I tried, but I didn't see any "stop". There is a .Quit, but for this I already have "kill" command and I have to start it again.

valerio@newton:~$ busctl --user introspect org.mpris.kaffeine /
NAME                                TYPE      SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface -         -            -
.Introspect                         method    -         s            -
org.freedesktop.DBus.Peer           interface -         -            -
.GetMachineId                       method    -         s            -
.Ping                               method    -         -            -
org.freedesktop.DBus.Properties     interface -         -            -
.Get                                method    ss        v            -
.GetAll                             method    s         a{sv}        -
.Set                                method    ssv       -            -
.PropertiesChanged                  signal    sa{sv}as  -            -
org.freedesktop.MediaPlayer         interface -         -            -
.Identity                           method    -         s            -
.MprisVersion                       method    -         (qq)         -
.Quit                               method    -         -            -



busctl --user call org.mpris.MediaPlayer2.mpv \
     /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player \
     Stop

For this we don't need to look here:
"rmmod: ERROR: Module cx23885 is in use" seems enough to see that kernel module cannot be removed.

I am surprised by it. You have shown that kaffeine closes the device, so it should be possible to remove the kernel module:

Started with --lastchannel
Video stopped:
lrwx------ 1 valerio valerio 64  9 gen 19.51 6 -> /dev/dri/card0
lrwx------ 1 valerio valerio 64  9 gen 19.51 62 -> /dev/dri/renderD128
lrwx------ 1 valerio valerio 64  9 gen 19.51 7 -> /dev/dri/card0
lrwx------ 1 valerio valerio 64  9 gen 19.51 8 -> /dev/dri/card0
lrwx------ 1 valerio valerio 64  9 gen 19.51 9 -> /dev/dri/card0

no more /dev/dvb/, but still unable to remove module cx23885

My hypotheses:
- there are more kaffeine processes (ps xuwf)

No, it has only one.

- some external process is holding the device, e.g. pulseaudio or pipeware sound server. Tools that might help to find it: lsof or fuser (unsure concerning proper options)
- Some other IPC exposed by the driver and used by kaffeine.
- I have not idea if it is possible to create direct connection between the dvb device and the video card so that data pass without intermediate interaction with kaffeine.

fuser -a /dev/dvb/adapter0/demux0 shows nothing
lsof | grep /dev/dvb shows

10315 ? S 0:00 /lib/x86_64-linux-gnu/libexec/kf5/kioslave5 /usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/tags.so tags local:/run/user/1000/kaffeinerCGcGi.1.kioworker.socket

But after some minutes this process disappeared, and I could rmmod.
Perhaps with --lastchannel it's slower to release it?

Reply via email to