Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnome remap service fails to grab keyboard #5

Open
bradleyd opened this issue Mar 5, 2024 · 3 comments
Open

gnome remap service fails to grab keyboard #5

bradleyd opened this issue Mar 5, 2024 · 3 comments

Comments

@bradleyd
Copy link

bradleyd commented Mar 5, 2024

Hey, thanks for putting this out there.
I am running this on Arch and the keys are not working. Realized the service does not start with this error:

Mar 05 10:03:54 envy systemd[1]: Started GNOME -> macOS Remap.
Mar 05 10:03:54 envy systemd[1]: gnome-macos-remap.service: Scheduled restart job, restart counter is at 86.
Mar 05 10:03:44 envy gnome-shell[1651]: Window manager warning: Ping serial 3039649 was reused for window 0x600003, previous use was for window W3.
Mar 05 10:03:44 envy systemd[1]: gnome-macos-remap.service: Failed with result 'exit-code'.
Mar 05 10:03:44 envy systemd[1]: gnome-macos-remap.service: Main process exited, code=exited, status=1/FAILURE
Mar 05 10:03:44 envy xremap[15536]: Error: Failed to prepare input devices: No device was selected!
Mar 05 10:03:44 envy xremap[15536]: ------------------------------------------------------------------------------
Mar 05 10:03:44 envy xremap[15536]: Failed to grab device 'Keychron K10' at '/dev/input/event6' due to: Resource busy (os error 16)
Mar 05 10:03:42 envy xremap[15536]: Selected keyboards automatically since --device options weren't specified:
Mar 05 10:03:42 envy xremap[15536]: ------------------------------------------------------------------------------
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event9 : HD-Audio Generic HDMI/DP,pcm=7
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event8 : HD-Audio Generic HDMI/DP,pcm=3
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event7 : xremap
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event6 : Keychron K10
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event5 : Generic Blue Microphones
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event4 : Generic Blue Microphones Consumer Control
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event3 : Video Bus
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event2 : PC Speaker
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event18: Logitech MX Master 3S for Mac
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event16: HD-Audio Generic Front Headphone
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event15: HD-Audio Generic Line Out
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event14: HD-Audio Generic Line
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event13: HD-Audio Generic Rear Mic
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event12: HD-Audio Generic Front Mic
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event11: HD-Audio Generic HDMI/DP,pcm=9
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event10: HD-Audio Generic HDMI/DP,pcm=8
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event1 : Power Button
Mar 05 10:03:42 envy xremap[15536]: /dev/input/event0 : Power Button

Any ideas?

@petrstepanov
Copy link
Owner

Hi, after the install - can you specify the device explicitly in ~/.local/bin/gnome-macos-remap.sh. On line 4 change this

pkexec xremap remap /usr/local/share/gnome-macos-remap/config.yml

to this:

pkexec xremap remap --device /dev/input/event6 /usr/local/share/gnome-macos-remap/config.yml

and reboot?

@bradleyd
Copy link
Author

Thanks for getting back to me. That file does not exist in the repo or on my computer.

@bradleyd
Copy link
Author

OK, got it to work by it running as root. Moved unit file to global systemd dir and it now works. Maybe something with Arch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants