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

[Linux] Keyboard not working in several games #2614

Open
3 tasks done
Sidefix opened this issue May 31, 2024 · 5 comments
Open
3 tasks done

[Linux] Keyboard not working in several games #2614

Sidefix opened this issue May 31, 2024 · 5 comments
Labels
input:keyboard Keyboard issue

Comments

@Sidefix
Copy link

Sidefix commented May 31, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

Is your issue present in the latest beta/pre-release?

  • This issue is present in the latest pre-release

Describe the Bug

I have configured Sunshine on a Linux Ubuntu 2310 installation, working perfectly as intended in most games.

For example, Cyberpunk 2077, Armello, Rimworld, Deep Rock Galactic, Dying Light 2, all work fine.

However there is an issue in a very small handful of games that I have not been able to identify a link for. In Against the Storm, Death Must Die and Songs of Conquest, the keyboard input simply does not work.

The keyboard is fine and interacts outside of Sunshine with no issues, or in other games as stated above. It does not matter if I start game X first or last or any combination. In some games the keyboard input simply refuses to work.

Expected Behavior

The keyboard should work as intended with any application.

Additional Context

Ubuntu 23.10
Sunshine 0.23.1 (issue occurred with older versions as well)
Proton-GE 9-5 (issue occurred with older versions as well)
X11 capture
Nvidia driver 555.42.02 (issue occurred with older versions as well)

Host Operating System

Linux

Operating System Version

23.10

Architecture

64 bit

Sunshine commit or version

0.23.1

Package

Linux - deb

GPU Type

Nvidia

GPU Model

RTXA2000

GPU Driver/Mesa Version

555.42.02

Capture Method (Linux Only)

X11

Config

log_path = /home/u/sunshine/configs/sunshine.log
nv_preset = p1
sunshine_name = ReVision
channels = 2
nvenc_preset = 7
fps = [60]
file_apps = /home/u/sunshine/configs/apps.json
resolutions = [
    1440x900
]
file_state = /home/u/sunshine/configs/sunshine_state.json
nv_rc = vbr
ping_timeout = 30000
min_log_level = 5
output_name = 0
global_prep_cmd = [{"do":"","undo":"/home/u/sunshine/configs/killSunshine.sh"}]
origin_web_ui_allowed = pc
credentials_file = /home/u/sunshine/configs/sunshine_state.json
nvenc_twopass = full_res
nvenc_spatial_aq = enabled

Apps

No response

Relevant log output

n/a
@Sidefix
Copy link
Author

Sidefix commented May 31, 2024

I should add that only the keyboard is affected, and so far only the games mentioned above have been identified to be affected.

Mouse works perfectly fine in everything.

@ReenigneArcher ReenigneArcher added the input:keyboard Keyboard issue label May 31, 2024
@gschintgen
Copy link
Contributor

Please post the regular logs (at level info) nonetheless.

At loglevel "debug" sunshine logs every mouse movement and every keypress. Please inspect those logs too and post an excerpt. (Annotated with what you pressed and if it worked or not.)

If I remember correctly there are some X-specific codepaths, so you could also try changing the capture method to KMS. As a second test you could also switch (temporarily) to Wayland instead of X (again with KMS).

@ReenigneArcher
Copy link
Member

There is a new input library that we're getting ready to migrate to. It might be worth testing that PR.

@Sidefix
Copy link
Author

Sidefix commented Jun 3, 2024

@gschintgen

[2024:06:03:12:30:27]: Debug: --begin keyboard packet-- keyAction [00000003] keyCode [804A] modifiers [00] flags [00] --end keyboard packet-- [2024:06:03:12:30:27]: Debug: --begin keyboard packet-- keyAction [00000004] keyCode [8048] modifiers [00] flags [00] --end keyboard packet-- [2024:06:03:12:30:27]: Debug: --begin keyboard packet-- keyAction [00000004] keyCode [8043] modifiers [00] flags [00] --end keyboard packet-- [2024:06:03:12:30:27]: Debug: --begin keyboard packet-- keyAction [00000004] keyCode [8045] modifiers [00] flags [00] --end keyboard packet-- [2024:06:03:12:30:27]: Debug: --begin keyboard packet-- keyAction [00000004] keyCode [8049] modifiers [00] flags [00] --end keyboard packet-- [2024:06:03:12:30:27]: Debug: --begin keyboard packet-- keyAction [00000004] keyCode [804E] modifiers [00] flags [00] --end keyboard packet--

Looks like the keyboard packets are sent... hmm.

@ReenigneArcher do you mean the latest nightly/dev build?

@gschintgen
Copy link
Contributor

@gschintgen

[2024:06:03:12:30:27]: Debug: --begin keyboard packet-- keyAction [00000003] keyCode [804A] modifiers [00] flags [00] --end keyboard packet-- [2024:06:03:12:30:27]: Debug: --begin keyboard packet-- keyAction [00000004] keyCode [8048] modifiers [00] flags [00] --end keyboard packet-- [2024:06:03:12:30:27]: Debug: --begin keyboard packet-- keyAction [00000004] keyCode [8043] modifiers [00] flags [00] --end keyboard packet-- [2024:06:03:12:30:27]: Debug: --begin keyboard packet-- keyAction [00000004] keyCode [8045] modifiers [00] flags [00] --end keyboard packet-- [2024:06:03:12:30:27]: Debug: --begin keyboard packet-- keyAction [00000004] keyCode [8049] modifiers [00] flags [00] --end keyboard packet-- [2024:06:03:12:30:27]: Debug: --begin keyboard packet-- keyAction [00000004] keyCode [804E] modifiers [00] flags [00] --end keyboard packet--

So the issue is on the receiving end, which is not really surprising. Did you check with a different display server or capture method? (BTW are there any free games that are affected?)

Looks like the keyboard packets are sent... hmm.

@ReenigneArcher do you mean the latest nightly/dev build?

The new input library should be the one from #2606 . Test builds can be retrieved from github actions. Here's the appimage for example: https://github.com/LizardByte/Sunshine/actions/runs/9378855742/artifacts/1569733361 (AppImages should work fine on Ubuntu.)

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

No branches or pull requests

3 participants