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

Keyboard stops working after running pkexec swhkd #227

Open
saurabhsharan opened this issue Dec 10, 2023 · 6 comments
Open

Keyboard stops working after running pkexec swhkd #227

saurabhsharan opened this issue Dec 10, 2023 · 6 comments
Assignees

Comments

@saurabhsharan
Copy link

Version Information:

  • Distribution Information: Linux ss-archlinux 6.6.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 29 Nov 2023 00:37:40 +0000 x86_64 GNU/Linux
  • swhkd version: swhkd 1.3.0-dev

Describe the bug:
I am following the instructions to install and run swhkd. After I run pkexec swhkd, my keyboard becomes unresponsive and I have to reboot my machine to restore the keyboard.

Expected behavior:
Keyboard should continue working after running pkexec swhkd.

Actual behavior:
Keyboard stops working after running pkexec swhkd.

To Reproduce:
Following instructions from README, run swhks & followed by pkexec swhkd.

Additional information:
Anything else you'd like us to know ?

In case it's useful information: I installed swhkd using yay -S swhkd-git.

@Shinyzenith
Copy link
Member

Can we get some logs?

@Shinyzenith
Copy link
Member

I presume the kernel grab failed on your machine and the syscall logs would help, try strace and the swhkd logs too

@drkknigt
Copy link

I am facing the same issue .

  • Distro : Linux realme-5 6.6.7-x64v3-xanmod1 #0~20231213.g90d9158 SMP PREEMPT_DYNAMIC Wed Dec 13 22:16:19 UTC x86_64 x86_64 x86_64 GNU/Linux
  • swhkd version : 1.3.0-dev
    Following is the log output of pkexec swhkd -d
2023-12-17T11:05:40Z TRACE swhkd] Logger initialized.
[2023-12-17T11:05:40Z TRACE swhkd] Invoking UID: 1000
[2023-12-17T11:05:40Z TRACE swhkd] Setting process umask.
[2023-12-17T11:05:40Z ERROR swhkd] XDG_RUNTIME_DIR has not been set.
[2023-12-17T11:05:40Z TRACE swhkd] Reading /run/swhkd/swhkd_1000.pid file and checking for running instances.
[2023-12-17T11:05:40Z DEBUG swhkd] Previous PID: 53076
[2023-12-17T11:05:40Z WARN  swhkd] Running swhkd as root!
[2023-12-17T11:05:40Z DEBUG swhkd::perms] Setting initgroups...
[2023-12-17T11:05:40Z DEBUG swhkd::perms] Setting EGID...
[2023-12-17T11:05:40Z DEBUG swhkd::perms] Setting EUID...
[2023-12-17T11:05:40Z ERROR swhkd] XDG_CONFIG_HOME has not been set.
[2023-12-17T11:05:40Z DEBUG swhkd] Using config file path: "/etc/swhkd/swhkdrc"
[2023-12-17T11:05:40Z DEBUG swhkd::perms] Setting EGID...
[2023-12-17T11:05:40Z DEBUG swhkd::perms] Setting EUID...
[2023-12-17T11:05:40Z DEBUG swhkd::perms] Setting initgroups...
[2023-12-17T11:05:40Z TRACE swhkd] Attempting to find all keyboard file descriptors.
[2023-12-17T11:05:40Z TRACE swhkd] Other: Power Button
[2023-12-17T11:05:40Z TRACE swhkd] Other: Lid Switch
[2023-12-17T11:05:40Z DEBUG swhkd] Keyboard: AT Translated Set 2 keyboard
[2023-12-17T11:05:40Z TRACE swhkd] Other: Video Bus
[2023-12-17T11:05:40Z DEBUG swhkd] Keyboard: Logitech Wireless Keyboard PID:4023
[2023-12-17T11:05:40Z TRACE swhkd] Other: Logitech Wireless Mouse
[2023-12-17T11:05:40Z TRACE swhkd] Other: Wireless hotkeys
[2023-12-17T11:05:40Z TRACE swhkd] Other: HP WMI hotkeys
[2023-12-17T11:05:40Z TRACE swhkd] Other: HD-Audio Generic HDMI/DP,pcm=3
[2023-12-17T11:05:40Z TRACE swhkd] Other: ELAN071A:00 04F3:30FD Mouse
[2023-12-17T11:05:40Z TRACE swhkd] Other: ELAN071A:00 04F3:30FD Touchpad
[2023-12-17T11:05:40Z DEBUG swhkd] Keyboard: keyd virtual keyboard
[2023-12-17T11:05:40Z TRACE swhkd] Other: keyd virtual pointer
[2023-12-17T11:05:40Z TRACE swhkd] Other: HD-Audio Generic Mic
[2023-12-17T11:05:40Z TRACE swhkd] Other: HD-Audio Generic Headphone
[2023-12-17T11:05:40Z DEBUG swhkd] 3 Keyboard device(s) detected.
[2023-12-17T11:05:40Z ERROR swhkd] XDG_RUNTIME_DIR has not been set.
[2023-12-17T11:05:40Z ERROR swhkd] Could not open evdev device at /dev/input/mouse4: Inappropriate ioctl for device (os error 25)
[2023-12-17T11:05:40Z TRACE swhkd] Other: swhkd switches virtual output

@Shinyzenith
Copy link
Member

The logs seem fine, this slightly worries me ( did upstream linux break userspace? ) I have not updated any deps since last release I believe. If it's not too much of a hassle, could you guys try the latest LTS kernel once?

@drkknigt
Copy link

ok i found the culprit . It looks like keyd daemon is somehow interfering with swhkd. I disabled the daemon via systemd and now everything is working fine. is keyd not compatible with swhkd ?

@Shinyzenith
Copy link
Member

ok i found the culprit . It looks like keyd daemon is somehow interfering with swhkd. I disabled the daemon via systemd and now everything is working fine. is keyd not compatible with swhkd ?

This is interesting, we have had systemd users who also use swhkd but this situation never arrived.

Does this fix work for you? @saurabhsharan

I wonder if this is a regression of systemd or the kernel itself. Any runit users around who can test this hypothesis?

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

No branches or pull requests

5 participants