[SOLVED] SMPlayer missing tray icon (was: throws an error for --use-tray-icon)

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
rodia77
Level 2
Level 2
Posts: 89
Joined: Wed Sep 04, 2019 3:25 pm

[SOLVED] SMPlayer missing tray icon (was: throws an error for --use-tray-icon)

Post by rodia77 »

So, I'm using SMPlayer running on the MPV engine and I want it to go to the tray rather than shutdown on close.

After adding --use-tray-icon to the .desktop file, I'm getting this:

Image

The log:

Code: Select all

/usr/bin/mpv --no-quiet --terminal --no-msg-color --input-ipc-server=/tmp/smplayer-mpv-114f --msg-level=ffmpeg/demuxer=error --video-rotate=no --no-config --no-fs --hwdec=no --sub-auto=fuzzy --no-input-default-bindings --input-vo-keyboard=no --no-input-cursor --cursor-autohide=no --no-keepaspect --wid=54525969 --monitorpixelaspect=1 --osd-level=1 --osd-scale=1 --osd-bar-align-y=0.6 --sub-ass --embeddedfonts --sub-ass-line-spacing=0 --sub-scale=1 --sub-font=Arial --sub-color=#ffffffff --sub-shadow-color=#ff000000 --sub-border-color=#ff000000 --sub-border-size=0.75 --sub-shadow-offset=2.5 --sub-font-size=50 --sub-bold=no --sub-italic=no --sub-margin-y=8 --sub-margin-x=20 --sub-codepage=ISO-8859-2 --sub-pos=100 --volume=105 --cache=auto --screenshot-template=cap_%F_%p_%02n --screenshot-format=jpg --screenshot-directory=/home/[username]/Pictures/smplayer_screenshots --audio-pitch-correction=yes --volume-max=150 --ytdl --script-opts=ytdl_hook-ytdl_path=yt-dlp --term-playing-msg=MPV_VERSION=${=mpv-version:}
INFO_VIDEO_WIDTH=${=width}
INFO_VIDEO_HEIGHT=${=height}
INFO_VIDEO_ASPECT=${=video-params/aspect}
INFO_VIDEO_FPS=${=container-fps:${=fps}}
INFO_VIDEO_FORMAT=${=video-format}
INFO_VIDEO_CODEC=${=video-codec}
INFO_DEMUX_ROTATION=${=track-list/0/demux-rotation}
INFO_AUDIO_FORMAT=${=audio-codec-name}
INFO_AUDIO_CODEC=${=audio-codec}
INFO_AUDIO_RATE=${=audio-params/samplerate}
INFO_AUDIO_NCH=${=audio-params/channel-count}
INFO_LENGTH=${=duration:${=length}}
INFO_DEMUXER=${=current-demuxer:${=demuxer}}
INFO_SEEKABLE=${=seekable}
INFO_TITLES=${=disc-titles}
INFO_CHAPTERS=${=chapters}
INFO_TRACKS_COUNT=${=track-list/count}
METADATA_TITLE=${metadata/by-key/title:}
METADATA_ARTIST=${metadata/by-key/artist:}
METADATA_ALBUM=${metadata/by-key/album:}
METADATA_GENRE=${metadata/by-key/genre:}
METADATA_DATE=${metadata/by-key/date:}
METADATA_TRACK=${metadata/by-key/track:}
METADATA_COPYRIGHT=${metadata/by-key/copyright:}
INFO_MEDIA_TITLE=${=media-title:}
INFO_STREAM_PATH=${stream-path}
 --audio-client-name=SMPlayer --term-status-msg=STATUS: ${=time-pos} / ${=duration:${=length:0}} P: ${=pause} B: ${=paused-for-cache} I: ${=core-idle} VB: ${=video-bitrate:0} AB: ${=audio-bitrate:0} --use-tray-icon

Error parsing option use-tray-icon (option not found)
Setting commandline option --use-tray-icon= failed.
Exiting... (Fatal error)
Can anyone think of a fix for that?

I haven't decided yet if it's a dealbreaker and enough of a reason for me to go shopping for a different player. I think I was getting the same error with the SMPlayer engine but I'm determined to use MPV in this config anyway.

inxi:

Code: Select all

System:
  Kernel: 6.5.0-14-generic x86_64 bits: 64 compiler: N/A
    Desktop: Cinnamon 5.6.8 tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0
    Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Machine:
  Type: Laptop System: LENOVO product: 82B1 v: Lenovo Legion 5 15ARH05H
    serial: <superuser required> Chassis: type: 10 v: Lenovo Legion 5 15ARH05H
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN
    serial: <superuser required> UEFI: LENOVO v: FSCN18WW date: 01/01/2021
Battery:
  ID-1: BAT0 charge: 55.7 Wh (100.0%) condition: 55.7/60.0 Wh (92.9%)
    volts: 17.1 min: 15.4 model: Celxpert L19C4PC0 type: Li-poly
    serial: <filter> status: Full cycles: 38
Memory:
  RAM: total: 15.48 GiB used: 3.09 GiB (19.9%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: 8-core model: AMD Ryzen 7 4800H with Radeon Graphics bits: 64
    type: MT MCP smt: enabled arch: Zen 2 rev: 1 cache: L1: 512 KiB L2: 4 MiB
    L3: 8 MiB
  Speed (MHz): avg: 1502 high: 2900 min/max: 1400/2900 boost: enabled
    cores: 1: 1400 2: 1400 3: 1400 4: 1400 5: 1400 6: 1400 7: 1400 8: 1400
    9: 1400 10: 2900 11: 1544 12: 1400 13: 1400 14: 1400 15: 1400 16: 1400
    bogomips: 92634
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] vendor: Lenovo
    driver: nvidia v: 470.223.02 pcie: speed: 2.5 GT/s lanes: 8 bus-ID: 01:00.0
    chip-ID: 10de:2191 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: nvidia
    unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 143 s-size: 341x191mm (13.4x7.5")
    s-diag: 391mm (15.4")
  Monitor-1: DP-2 res: 1920x1080 hz: 144 dpi: 142
    size: 344x194mm (13.5x7.6") diag: 395mm (15.5")
  OpenGL: renderer: NVIDIA GeForce GTX 1660 Ti/PCIe/SSE2
    v: 4.6.0 NVIDIA 470.223.02 direct render: Yes
Audio:
  Device-1: NVIDIA TU116 High Definition Audio driver: snd_hda_intel
    v: kernel pcie: speed: 8 GT/s lanes: 8 bus-ID: 01:00.1 chip-ID: 10de:1aeb
    class-ID: 0403
  Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor
    vendor: Lenovo driver: N/A pcie: speed: 16 GT/s lanes: 16 bus-ID: 06:00.5
    chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 06:00.6 chip-ID: 1022:15e3
    class-ID: 0403
  Sound Server-1: ALSA v: k6.5.0-14-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: 1000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie:
    speed: 5 GT/s lanes: 1 bus-ID: 04:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF: wlp4s0 state: up mac: <filter>
  IF-ID-1: <filter> state: unknown speed: N/A duplex: N/A mac: N/A
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 5-3:3 chip-ID: 8087:0029 class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 2 state: up address: <filter>
    bt-v: 3.0 lmp-v: 5.2 sub-v: 237e hci-v: 5.2 rev: 237e
Drives:
  Local Storage: total: 1.38 TiB used: 77.37 GiB (5.5%)
  ID-1: /dev/nvme0n1 vendor: SK Hynix model: HFS512GD9TNI-L2A0B
    size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 11010C10 temp: 38.9 C scheme: GPT
  ID-2: /dev/nvme1n1 vendor: Crucial model: CT1000P5SSD8 size: 931.51 GiB
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: P4CR311
    temp: 35.9 C scheme: GPT
Partition:
  ID-1: / size: 365.69 GiB used: 77.32 GiB (21.1%) fs: ext4
    dev: /dev/nvme1n1p3
  ID-2: /boot/efi size: 256 MiB used: 51.7 MiB (20.2%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 43 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 375 Uptime: 1h 35m wakeups: 1 Init: systemd v: 249 runlevel: 5
  Compilers: gcc: 11.4.0 alt: 11/12/9 Shell: Bash v: 5.1.16
  running-in: gnome-terminal inxi: 3.3.13
Last edited by rodia77 on Tue Mar 26, 2024 4:25 pm, edited 2 times in total.
KodiakCanoe
Level 3
Level 3
Posts: 120
Joined: Wed Nov 23, 2022 12:30 am

Re: SMPlayer throws an error for --use-tray-icon

Post by KodiakCanoe »

rodia77 wrote: Sun Dec 24, 2023 10:08 am So, I'm using SMPlayer running on the MPV engine and I want it to go to the tray rather than shutdown on close.
I'm using SMPlayer 19.10.2 from the repo. On the main toolbar if I click "Options" I can put a checkmark in "Show icon in system tray". Closing the main window minimizes to tray but it stops playing. Clicking the tray icon instead, minimizes to tray and keeps playing. I can right-click the tray icon to play/pause/next etc.
rodia77
Level 2
Level 2
Posts: 89
Joined: Wed Sep 04, 2019 3:25 pm

Re: SMPlayer missing tray icon (was: throws an error for --use-tray-icon)

Post by rodia77 »

^^^
Thanks a mill for that hint, I went through the preferences after the install but missed that item.

Unfortunately for me, it's one issue leading to another: when I tick that option, the systray icon doesn't show. When I hit the close button, I'm getting the notification "SMPlayer is still running here" -- the app is running but still no icon and I don't seem to have a way to bring it back other than pkill and restart.

For similar issues I found advice to install sni-qt (not in the repo) or libappindicator1 (didn't help). I'm running out of ideas...
KodiakCanoe
Level 3
Level 3
Posts: 120
Joined: Wed Nov 23, 2022 12:30 am

Re: SMPlayer missing tray icon (was: throws an error for --use-tray-icon)

Post by KodiakCanoe »

rodia77 wrote: Sun Dec 24, 2023 2:16 pm systray icon doesn't show.
I just tried it on Mint 20.3 and 21.1, both using the Traditional/Classic panel. It seems to be working OK here so I'm not sure what the problem could be. Good luck though!
Reddog1
Level 7
Level 7
Posts: 1939
Joined: Wed Jun 01, 2011 2:12 pm

Re: SMPlayer missing tray icon (was: throws an error for --use-tray-icon)

Post by Reddog1 »

I wonder -- did you try changing to a different desktop iconset?

Just a weird thought...........

Or did you try removing and then reinstalling smplayer from the Package Manager?
rodia77
Level 2
Level 2
Posts: 89
Joined: Wed Sep 04, 2019 3:25 pm

Re: SMPlayer missing tray icon (was: throws an error for --use-tray-icon)

Post by rodia77 »

KodiakCanoe wrote: Sun Dec 24, 2023 3:34 pm I just tried it on Mint 20.3 and 21.1, both using the Traditional/Classic panel. It seems to be working OK here so I'm not sure what the problem could be. Good luck though!
Thanks!
Reddog1 wrote: Sun Dec 24, 2023 3:50 pm I wonder -- did you try changing to a different desktop iconset?

Just a weird thought...........

Or did you try removing and then reinstalling smplayer from the Package Manager?
So the situation is, I have two similar but not identical setups, and the issue affects both the machines. On Machine 1 I have SMPlayer 23.6.0 from their original PPA, but on Machine 2 it's 21.10.0 from the Mint's repo. I have now upgraded both to Victoria, so the icon sets have changed but the problem is still there. When I click the "Show icon in system tray", an icon (I think a generic one, hard to notice) momentarily appears in the tray but doesn't stay there.

My text scaling factor is set to 1.4, which enables the "Large text" in Accessibility, but getting it back to 1.0 doesn't do anything come to the SMPlayer's behaviour. The one last thing I can think of is resetting the panel (I have custom icon sizes both on the left and right side), but that will defeat the purpose of having the system adjusted to my needs.
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: SMPlayer missing tray icon (was: throws an error for --use-tray-icon)

Post by Hoser Rob »

I use smplayer, it's been my default for years. But I've never used the smplayer system tray and I use KDE, which handles that sort of thing for media programs itself, so I don't need it anyway. I can't find any systray option in smplayer > preferences at all. It's on a Debian based system and the smplayer version is 23.6.0. But it seems to me that if that option isn't there, there's a reason.

I looked at the mpv manual (https://mpv.io/manual/stable/) and searched for "use-tray-icon". Nothing. Then just 'tray'. Still nothing.

Can you provide a link for where you found that parameter? There's a ton of outdated info on the web and that feature may have been dropped.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
rodia77
Level 2
Level 2
Posts: 89
Joined: Wed Sep 04, 2019 3:25 pm

Re: SMPlayer missing tray icon (was: throws an error for --use-tray-icon)

Post by rodia77 »

Hoser Rob wrote: Mon Dec 25, 2023 11:40 am I use smplayer, it's been my default for years. But I've never used the smplayer system tray and I use KDE, which handles that sort of thing for media programs itself, so I don't need it anyway. I can't find any systray option in smplayer > preferences at all. It's on a Debian based system and the smplayer version is 23.6.0. But it seems to me that if that option isn't there, there's a reason.

I looked at the mpv manual (https://mpv.io/manual/stable/) and searched for "use-tray-icon". Nothing. Then just 'tray'. Still nothing.

Can you provide a link for where you found that parameter? There's a ton of outdated info on the web and that feature may have been dropped.
It's not in Preferences, it's directly in the Options menu:

Image

The use-tray-icon parameter doesn't seem to be supported.
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: SMPlayer missing tray icon (was: throws an error for --use-tray-icon)

Post by Hoser Rob »

rodia77 wrote: Mon Dec 25, 2023 12:23 pm
Hoser Rob wrote: Mon Dec 25, 2023 11:40 am I use smplayer, it's been my default for years. But I've never used the smplayer system tray and I use KDE, which handles that sort of thing for media programs itself, so I don't need it anyway. I can't find any systray option in smplayer > preferences at all. It's on a Debian based system and the smplayer version is 23.6.0. But it seems to me that if that option isn't there, there's a reason.

I looked at the mpv manual (https://mpv.io/manual/stable/) and searched for "use-tray-icon". Nothing. Then just 'tray'. Still nothing.

Can you provide a link for where you found that parameter? There's a ton of outdated info on the web and that feature may have been dropped.
It's not in Preferences, it's directly in the Options menu....
Jeez, I didn't look there. Like I said I've never used it with SMPlayer and KDE handles that just fine by default anyway.

However I just tried it and it works here. Again, I'm using it in MX 21 KDE which is Debian Stable based, so I'd expect the same result in LMDE. The SMPlayer version here is 23.6.0.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
rodia77
Level 2
Level 2
Posts: 89
Joined: Wed Sep 04, 2019 3:25 pm

Re: SMPlayer missing tray icon (was: throws an error for --use-tray-icon)

Post by rodia77 »

FWIW, resetting panel settings didn't work.
rodia77
Level 2
Level 2
Posts: 89
Joined: Wed Sep 04, 2019 3:25 pm

Re: SMPlayer missing tray icon (was: throws an error for --use-tray-icon)

Post by rodia77 »

FWIW, the same issue affects Audacious: after enabling File > Settings > Plug-ins > Status Icon and its Close to the system tray, and closing the window, the process is still running but no systray icon visible. Puzzling.
rodia77
Level 2
Level 2
Posts: 89
Joined: Wed Sep 04, 2019 3:25 pm

Re: [SOLVED] SMPlayer missing tray icon (was: throws an error for --use-tray-icon)

Post by rodia77 »

I've found the culprit: it's the "Hide system tray icons for compatible players" setting of the Sound 150% applet. Solved.
Post Reply

Return to “Software & Applications”