Electronicks / JoyShockMapper

A tool for PC gamers to play games with DualShock 4s, JoyCons, and Pro Controllers. Gyro aiming, flick stick.
Other
371 stars 20 forks source link

[Bug] No Icon On System Tray For JSM On Wayland #128

Open Jazztache opened 1 month ago

Jazztache commented 1 month ago

Hello! Currently, on KDE Plasma + Arch Linux there is no icon for JoyShockMapper. It's currently just a red 'no' sign on the taskbar.

JSM Output

~ # sudo joyshockmapper
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
Welcome to JoyShockMapper version v3.5.4!
[AUTOLOAD] "~ : zellij" in focus: create AutoLoad\konsole.txt to autoload for this application.
AUTOLOAD is available. Files in /root/.config/JoyShockMapper/AutoLoad/ folder will get loaded automatically when a matching application is in focus.
1 device connected
Resetting all mappings to defaults
There is no OnReset.txt file to load.
There is no OnStartup.txt file to load.
MUP: true
MUP processes event OnPress
Pressing down on key NONE

(joyshockmapper:20114): libappindicator-WARNING **: 12:36:54.363: Unable to get the session bus: Error spawning command line “dbus-launch --autolaunch=cdc45719613e4a08b83bb539f3a1364f --binary-syntax --close-stderr”: Child process exited with code 1

(joyshockmapper:20114): LIBDBUSMENU-GLIB-WARNING **: 12:36:54.363: Unable to get session bus: Error spawning command line “dbus-launch --autolaunch=cdc45719613e4a08b83bb539f3a1364f --binary-syntax --close-stderr”: Child process exited with code 1

System Information:

OS: Arch Linux x86_64 
Host: MS-7C76 1.0 
Kernel: 6.10.10-arch1-1 
Shell: fish 3.7.1 
Resolution: 1920x1080, 1920x1080 
DE: Plasma 6.1.5 
WM: KWin 
Theme: [Plasma], Breeze-Dark [GTK2], Breeze [GTK3] 
Icons: oxygen [Plasma], breeze-dark [GTK2/3] 
Terminal: konsole 
CPU: Intel i7-10700K (16) @ 5.100GHz 
GPU: NVIDIA GeForce RTX 2060 
Memory: 6552MiB / 15911MiB
Jazztache commented 1 month ago

Screengrab of taskbar: image

Jazztache commented 1 month ago

Update: The X11 version of Plasma does show an icon. This is on my main PC. My laptop is running Wayland, so that may have something to do with it.

Jazztache commented 1 day ago

Update: After copying the icons from dist/linux in the source code to /usr/share/icons/hicolor/24x24/status, the icon works with joyshockmapper, but not sudo joyshockmapper. This is very odd. I also recommend updating the PKGBUILD to make sure that the icons are installed.

Jazztache commented 16 hours ago

I've investigated this further.

~ # sudo joyshockmapper
Welcome to JoyShockMapper version v3.5.4!
AUTOLOAD is available. Files in /root/.config/JoyShockMapper/AutoLoad/ folder will get loaded automatically when a matching application is in focus.
0 devices connected
Resetting all mappings to defaults
There is no OnReset.txt file to load.
There is no OnStartup.txt file to load.

(joyshockmapper:62945): libappindicator-WARNING **: 12:57:56.302: Unable to get the session bus: Error spawning command line “dbus-launch --autolaunch=0078fea237c046dc89f0c650ffb7cf40 --binary-syntax --close-stderr”: Child process exited with code 1

(joyshockmapper:62945): LIBDBUSMENU-GLIB-WARNING **: 12:57:56.302: Unable to get session bus: Error spawning command line “dbus-launch --autolaunch=0078fea237c046dc89f0c650ffb7cf40 --binary-syntax --close-stderr”: Child process exited with code 1
^CQUIT

~ # dbus-launch --autolaunch=0078fea237c046dc89f0c650ffb7cf40 --binary-syntax --close-stderr
Autolaunch requested, but X11 support not compiled in.
Cannot continue.
~ # sudo dbus-launch --autolaunch=0078fea237c046dc89f0c650ffb7cf40 --binary-syntax --close-stderr
Autolaunch requested, but X11 support not compiled in.
Cannot continue.
~ # 

It seems like a Wayland issue, because X11 isn't support under dbus. This is very strange, as it works when using it without sudo permissions. Oddly enough both with and without sudo permissions, the dbus launch command fails, which means the icon cannot be loaded for some reason.