pop-os / shell

Pop!_OS Shell
GNU General Public License v3.0
4.77k stars 262 forks source link

Media Keys not working with Kodi in pop shell #1549

Open valerioa opened 1 year ago

valerioa commented 1 year ago

(1) Issue/Bug Description:

Media Keys (Play/Pause/Next Track/Prev Track) do not work with Kodi using Pop shell

(2) Steps to reproduce (if you know): Open Kodi. Start a video. Press Play/Pause/Next Track/Prev Track - A 'prohibited' traffic sign appears on the screen. No action is taken.

(3) Expected behavior:

Media Keys should work.

(4) Distribution (run cat /etc/os-release):

NAME="Pop!_OS" VERSION="22.04 LTS" ID=pop ID_LIKE="ubuntu debian" PRETTY_NAME="Pop!_OS 22.04 LTS" VERSION_ID="22.04" HOME_URL="https://pop.system76.com" SUPPORT_URL="https://support.system76.com" BUG_REPORT_URL="https://github.com/pop-os/pop/issues" PRIVACY_POLICY_URL="https://system76.com/privacy" VERSION_CODENAME=jammy UBUNTU_CODENAME=jammy LOGO=distributor-logo-pop-os

(5) Gnome Shell version:

42.3.1-2ubuntu1pop1~1660592271~22.04~ca01bf8

(6) Pop Shell version (run apt policy pop-shell or provide the latest commit if building locally):

pop-shell: Installed: 1.1.0~1667482449~22.04~30bf682 Candidate: 1.1.0~1667482449~22.04~30bf682 Version table: *** 1.1.0~1667482449~22.04~30bf682 1001 1001 http://apt.pop-os.org/release jammy/main amd64 Packages 1001 http://apt.pop-os.org/release jammy/main i386 Packages 100 /var/lib/dpkg/status

(7) Where was Pop Shell installed from:

standard pop-os installation

(8) Monitor Setup (2 x 1080p, 4K, Primary(Horizontal), Secondary(Vertical), etc):

1 x 1080p

(9) Other Installed/Enabled Extensions:

None

(10) Other Notes:

This is vey reproducible for me. I have 1 laptop and 1 desktop with pop-os. In both media keys are disabled.

Is there a workaround? I found several workarounds for gnome-shell WITHOUT pop-shell, but they do not work with pop-shell

valerioa commented 1 year ago

For future googlers, I will answer my own question:

gsd-media-keys (a gnome-settings-daemon plugin) collects media keys event and dispatches them to MPRIS-aware clients. If no MPRIS-aware client is available, gsd-media-keys will display the (/) sign ( 'action-unavailable-symbolic')

By default, VLC Matrix (19.4) is not MPRIS-aware on ubuntu/pop-os.

Steps to solve the problem - by making Kodi Matrix 19.4 MPRIS-aware (only on Linux) 1) Quit kodi

2) Install the Linux-tools repository info with:

wget https://raw.github.com/wastis/LinuxAddonRepo/master/repository.linuxaddons-1.0.1.zip
unzip -d ~/.kodi/addons repository.linuxaddons-1.0.1.zip 

3) start Kodi

4) accept Linux repository

5) install add-on Services/MediaPlayerRemoteInterface

Play/Pause/FF/RR now works.