not-jan/apex-tux

Testing the Apex 7: No OLED Output, No Hotkeys

Opened this issue · 23 comments

thw26 commented

I didn't see this mentioned in other issues. I built the software from git on my Manjaro machine.

   Compiling apex-tux v1.0.3 (/home/thwright/Dev/apex-tux)
warning: unused import: `anyhow::anyhow`
 --> src/providers/music.rs:3:5
  |
3 | use anyhow::anyhow;
  |     ^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: `apex-tux` (bin "apex-tux") generated 1 warning (run `cargo fix --bin "apex-tux"` to apply 1 suggestion)
    Finished release [optimized] target(s) in 47.25s

When attempting to run it, I get the following error:

./target/release/apex-tux 
Error: hidapi error: hid_error is not implemented yet

rustc version: rustc 1.71.0-nightly (18bfe5d8a 2023-05-14)

Is there further information I can supply? Is this a known issue, or are there suggestions for fixing this?

...

did you really look into other closed issues ?

because I quickly found this

thw26 commented

I did, but I seemed to have overlooked the obvious one that applies. I will read through the issue and close if all is well. My apologies.

I'm sorry, i did quickly jump to the gun, don't worry

thw26 commented

I'm sorry, i did quickly jump to the gun, don't worry

It's okay. I know how frustrating such things can be. I appreciate pointing out what I missed. :)

FWIW, it is running now! Thanks. I had to do the same as the other user. I'll have to see what I can do and if I can get output to the screen.

I am running on an Apex 7 and I see the README says this is untested. (I'm not currently seeing it find my music player.) What info can I supply to verify it works on the Apex 7? Happy to open an Apex 7 testing issue if preferred.

What is your media player? I know that spotify on firefox doesn't works (Soundcloud works fine, maybe some DRM playback issue on firefox's part?) (you can use spotpris if that is your issue)

thw26 commented

Clementine. I looked at Arch Wiki which listed clementine. I'll give some others a try.

Here's what I'm seeing:

15:52:07 sudo ./apex-tux

19:52:09 [INFO] Registering MPRIS2 display source.
19:52:09 [INFO] Registering Clock display source.
19:52:09 [INFO] Registering Coindesk display source.
19:52:09 [INFO] Registering DBUS notification source.
19:52:09 [ERROR] Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
19:52:09 [INFO] Found 3 registered providers
19:52:09 [INFO] Trying to connect to DBUS with player preference: None
^C19:53:31 [INFO] Ctrl + C received, shutting down!

15:51:02 echo $DBUS_SESSION_BUS_ADDRESS

unix:path=/run/user/1000/bus

15:53:31 sudo DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus ./apex-tux

19:53:56 [INFO] Registering MPRIS2 display source.
19:53:56 [INFO] Registering Clock display source.
19:53:56 [INFO] Registering Coindesk display source.
19:53:56 [INFO] Registering DBUS notification source.
19:53:56 [ERROR] Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
19:53:56 [INFO] Found 3 registered providers
19:53:56 [INFO] Trying to connect to DBUS with player preference: None

Are there instructions on how to run the options?

thw26 commented

To clarify what I'm seeing:

The volume wheel works for volume and mute.

The multimedia key will start and stop Clementine but not VLC. Double click (next track) and triple click (previous click) works in both.

No OLED output.

Hitting ALT+SHIFT+A/D doesn't appear to produce any change. Perhaps the OLED is just off and needs flipped on? I'll keep playing.

did you compile it with cargo build --release ? that should have displayed the music provider.

for the hotkeys to work, the command should be cargo build --release --features hotkeys

thw26 commented

I did; recompiled with cargo build --release --features hotkeys, but no change in output on running or behavior.

I am on KDE Plasma, FWIW. Also, Youtube in Firefox can be controlled by the media key, but still no OLED output. (I had the SS logo before running apex-tux.) I've tried the UDEV rules at both locations in the README (https://github.com/FrankGrimm/apex7tkl_linux and https://gist.github.com/ToadKing/d26f8f046a3b707e9e4b9821be5c9efc).

This is weird, I guess you have tried restarting your computer ? (i also have manjaro kde, so that's why it's weird (but an apex 5, which shouldn't have much difference)) are you running in wayland by any chance ?

thw26 commented

X11. Attempting a reboot now.

that's really weird, I'm also using x11 so I don't know why it shouldn't work for you

thw26 commented

No change on reboot. Is the ERROR line about not receiving a reply referring to the lack of response from MPRIS?

Were the INFO lines about registering the hotkeys removed since the README was created? I find it strange they aren't mentioned when running the bin. Is there a way I can switch it to the clock option at CLI?

Yes I do think the error line is related to mpris.
I don't think the hotkeys option for compiling were ever mentionned, and I do think it should, by default, includes the hotkeys.

could you try running apex-tux as root? (it shouldn't "unbug" mpris nor the hotkeys, but atleast the screen)

thw26 commented

I get the same output and no content on the OLED. First run says it is running with this error:

20:28:38 [ERROR] Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead

But unlike my user, root has no DBUS_SESSION_BUS_ADDRESS env var set. Using the user's DBUS:

DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus ./apex-tux

20:29:46 [INFO] Registering MPRIS2 display source.
20:29:46 [INFO] Registering Clock display source.
20:29:46 [INFO] Registering Coindesk display source.
20:29:46 [INFO] Registering DBUS notification source.
20:29:46 [ERROR] Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
20:29:46 [INFO] Found 3 registered providers
20:29:46 [INFO] Trying to connect to DBUS with player preference: None

there is 3 weird things here :
your screen is blank (it should have the idle music screen)
it can't use dbus (not sure about that)
even though you recompiled it with hotkeys, they aren't loaded (maybe wrong executable ?)

I'm sorry, but I won't be able to help you anymore today as I'm going to sleep (live in France), tomorrow I'll try to compile it on my laptop (but I won't have my keyboard until 19h, so I won't be able to test everything)

You can try using the simulator instead of the real keyboard to make sure, that it's not your keyboard or USB connection. I'm fairly certain, that it's a DBUS issue on your end. The DBUS crate I'm using is https://github.com/diwic/dbus-rs

It does sound like you're running some kind of weird DBus setup.

thw26 commented

You can try using the simulator instead of the real keyboard to make sure, that it's not your keyboard or USB connection. I'm fairly certain, that it's a DBUS issue on your end. The DBUS crate I'm using is https://github.com/diwic/dbus-rs

It does sound like you're running some kind of weird DBus setup.

Okay. I will give that a test when I can. To my knowledge it is default Manjaro, but I suppose you never know!

Okay. I will give that a test when I can. To my knowledge it is default Manjaro, but I suppose you never know!

I developed apex-tux on an earlier version of Manjaro Gnome, so that should work. Make sure that you've correctly setup the udev rules.

Hi, @Socerest2 and I talked on discord because he had issues, and I managed to resolve some at least but not all.
To resume :

  • he has an apex 5 (same as I do), he's arch based (also the same as me)
  • he had issues compiling, because he didn't have rustup (solved easily)
  • the udev rule however didn't and doesn't works (I sent him my exact udev rules that I use, even tho it's made like a 5 years old, it works on my machine ™️).

So therefore, he has to run the software as root, and when running as root, the dbus doesn't works, and his keyboard's screen was black. I think the reason why is because the music provider doesn't display anything when the dbus doesn't works (maybe the provider bugs somewhere?), the "solution" to this, was to compile apex-tux with the hotkeys library, and just to not use (/skip) the music provider (I think there are mentions about not using dbus in the readme now that I think about it?) (the exact command to compile that I told him was cargo build --release --features hotkeys)

@jehendeoff Is it working with Apex 7?

Hi, I only have an apex 5 keyboard and do not know anyone with an apex 7, but while I can't test it, yes, it should.

@jehendeoff Yeah, it works in Apex Pro.

Thanks!