Software get stuff trying to connect to DBUS when player preference is none
Closed this issue · 26 comments
I'm testing this software with my Apex 7 and running it I get this issue:
~/Projects/BuilderAI/b21ksharedservicesinr-294805-react-native bb_certifica…etManagement ?1 cd /etc/apex-tux ✔
/etc/apex-tux sudo apex-tux ✔
15:58:50 [INFO] Registering MPRIS2 display source.
15:58:50 [INFO] Registering Clock display source.
15:58:50 [INFO] Registering Coindesk display source.
15:58:50 [INFO] Registering Sysinfo display source.
15:58:50 [WARN] Couldn't find network interface `eth0`
15:58:50 [INFO] Instead, found those interfaces:
15:58:50 [INFO] enp2s0
15:58:50 [INFO] docker0
15:58:50 [INFO] lo
15:58:50 [INFO] wlp3s0
15:58:50 [WARN] Couldn't find sensor `hwmon0 CPU Temperature`
15:58:50 [INFO] Instead, found those sensors:
15:58:50 [INFO] acpitz temp1: 49°C (max: 49°C / critical: 120°C)
15:58:50 [INFO] amdgpu edge: 46°C (max: 46°C)
15:58:50 [INFO] iwlwifi_1 temp1: 40°C (max: 40°C)
15:58:50 [INFO] k10temp Tctl: 49°C (max: 49°C)
15:58:50 [INFO] nvme Composite HFM001TD3JX013N temp1: 37.85°C (max: 37.85°C / critical: 84.85°C)
15:58:50 [INFO] nvme Composite Samsung SSD 980 PRO 1TB temp1: 33.85°C (max: 33.85°C / critical: 84.85°C)
15:58:50 [INFO] nvme Sensor 1 HFM001TD3JX013N temp2: 37.85°C (max: 37.85°C)
15:58:50 [INFO] nvme Sensor 1 Samsung SSD 980 PRO 1TB temp2: 33.85°C (max: 33.85°C)
15:58:50 [INFO] nvme Sensor 2 HFM001TD3JX013N temp3: 45.85°C (max: 45.85°C)
15:58:50 [INFO] nvme Sensor 2 Samsung SSD 980 PRO 1TB temp3: 39.85°C (max: 39.85°C)
15:58:50 [INFO] Registering DBUS notification source.
15:58:50 [ERROR] Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
15:58:50 [INFO] Found 4 registered providers
15:58:50 [INFO] Trying to connect to DBUS with player preference: None
^C16:18:50 [INFO] Ctrl + C received, shutting down!
Is it the expected behavior?
I will test this with Firefox as the preferred player meanwhile.
Thank you
Yes, when running as root it cannot use dbus as (if I understood correctly) the socket is made for the current user.
I suggest that you try making the udev rules works (I don't have an apex 7 so I can't help you much) otherwise maybe try to chown the executable as root, and run it as the current user? (I have no idea there, just throwing suggestions)
I have to run it using sudo
cause it solves this issue.
Let me reformulate, dbus trying to connect even when the priority is none is normal.
The priority is in case you have multiple music player.
(you will still see those log lines, event when disabling mpris2, I just checked it, disabling it just disable the provider, making the music display inaccessible)
The issue that I see however is
[ERROR] Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
It's caused by running on a user that doesn't have a dbus session, which root usually doesn't have.
So, how can we solve this issue then?
/etc/apex-tux apex-tux ✔
Error: hidapi error: hid_error is not implemented yet
do you have the udev rule installed?
@jehendeoff how can I check it? I installed this from the AUR package, so I guess they are installed.
The rules from the AUR are not from this repo but should still work (only for 2 keyboard at least).
In order to have the udev from this repo, download the files here into /etc/udev/rules.d
(to be sure, please search how to install udev rules onto your distro)
The udev rules in the AUR are for the apex 7 TKL and the apex 7.
I'm testing an APEX 7 and yeah, the udev
rules are installed:
/etc/apex-tux ls ../udev/rules.d/ 1 ✘
90-mhwd-prime-powermanagement.rules 98-steelseries.rules
Can you try with the one from this repo, @Socerest2 tried it right now and it works for him (the one from the AUR, even adapted, doesn't work)
Can you try with the one from this repo, @Socerest2 tried it right now and it works for him (the one from the AUR, even adapted, doesn't work)
Well, the one used on AUR is the same used by Frank Grimm here.
yup and it doesn't work on apex 5 even when changing the product id, so please, try the rules from this repo
@jehendeoff I'm testing an APEX 5, I changed the udev
rules and also reboot the computer, It does not work.
First I think @not-jan should be made aware of this, the udev rule doesn't seem to be working.
Please wait while I copy the exact instructions I gave @Socerest2 for installing the same udev as the one on my machine (which should only work on an apex 5 (if it works on an apex 7 it's great but I don't expect it))
sent to Socerest2 on discord
Hi, sorry if I bother you, I'm on my computer with my keyboard, I just looked up my udev rules, and it seems I have both versions,
here's the one that I modified (I think it's the same one sent you)
97-steelseries.rules
SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="161c", MODE="0666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="161c", MODE="0666", GROUP="plugdev"
and I have the "automatic" one (I think I edited it a bit, not sure if it works tho)
98-steelseries.rules
ACTION=="add", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="161c" RUN+="/etc/udev/rules.d/steelseries-perms.py '%E{DEVNAME}'"
and the python code I use is (or at least should) not modified (will send you)
the python code I attached, is
this one
sent to Socerest2 on discord
Hi, sorry if I bother you, I'm on my computer with my keyboard, I just looked up my udev rules, and it seems I have both versions, here's the one that I modified (I think it's the same one sent you) 97-steelseries.rules
SUBSYSTEM=="input", GROUP="input", MODE="0666" SUBSYSTEM=="usb", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="161c", MODE="0666", GROUP="plugdev" KERNEL=="hidraw*", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="161c", MODE="0666", GROUP="plugdev"
and I have the "automatic" one (I think I edited it a bit, not sure if it works tho) 98-steelseries.rules
ACTION=="add", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="161c" RUN+="/etc/udev/rules.d/steelseries-perms.py '%E{DEVNAME}'"
and the python code I use is (or at least should) not modified (will send you)
the python code I attached, is
this one
Do I need to reinstall apex-tux
?
It still gives me the same issue.
you shouldn't need to, did you restart or did you reload? did you put both in (as I'm currently doing)?
you shouldn't need to, did you restart or did you reload? did you put both in (as I'm currently doing)?
/etc/apex-tux ls /etc/udev/rules.d INT ✘
90-mhwd-prime-powermanagement.rules 97-steelseries.rules 98-steelseries.rules steelseries-perms.py
/etc/apex-tux cat /etc/udev/rules.d/97-steelseries.rules ✔
SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="161c", MODE="0666", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="161c", MODE="0666", GROUP="plugdev"
/etc/apex-tux cat /etc/udev/rules.d/98-steelseries.rules ✔
ACTION=="add", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="161c" RUN+="/etc/udev/rules.d/steelseries-perms.py '%E{DEVNAME}'"
/etc/apex-tux sudo udevadm control --reload && sudo udevadm trigger ✔
[sudo] password for luisalaguna:
/etc/apex-tux
I tried cloning the repository and running from it, but it failed.
It has to be with udev
rules I think.
then, you don't need to recompile/install it, that is not an issue with the apex-tux executable, this is due to a misconfiguration of udev rules, did you try restarting your computer?
Then, you don't need to recompile/install it, that is not an issue with the apex-tux executable, this is due to a misconfiguration of udev rules, did you try restarting your computer?
yes, how can I find you in Discord guys?
that's weird, my discord is Jéhèndé#5755
bur right now I'm at work on my phone
Hi @ToadKing, I though I should mention you because you made the udev rule in the first place.
Do you any idea on how to debug this issue? He tried uninstalling it from the AUR (because I saw a service file so I thought that maybe it was in a background task), he tried different udev rules, restarting reloading, and nothing seems to works.
The easiest way to debug is to just run the script manaully and pass in the hidraw device as the parameter. Ideally with some changes to print messages on success/failure instead of changing the file permssions.
Like replace these lines:
if usagePage == 0x000C or usagePage >= 0xFF00:
os.chmod(hidraw, 0o666)
With this:
if usagePage == 0x000C or usagePage >= 0xFF00:
print('found!')
else:
print('not found!')
Then just run from the terminal:
sudo python path_to_script.py /dev/hidraw0
Just replace hidraw0 with the correct one from the Apex keyboard.
Thank you for responding so fast, we did not debug the udev rule (we edited Frank Grimm's udev rule to work with SalahAdDin, because he has an apex pro, not an apex 5/7), I will try to debug the rule on my computer later (because I think it doesn't works since I also need frank grimm's on top of yours)
@jehendeoff Thank you very much, guys!
Thank for your help guys, I just added some instructions to the readme file here.