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

script: Lenovo Legion Go display configuration #1624

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matte-schwartz
Copy link

Add support for the Lenovo Legion Go handheld, which features a rotated 1600x2560 panel that reports 60Hz and 144Hz modes in the EDID. VRR and HDR are not supported, and only one panel model is known to be in use.

Modes other than 60Hz and 144Hz have a small chance of causing a unresponsive touchscreen until another modeset is performed or have artifacts during modesetting, so extra modes are not included. The dynamic_modegen section is filled out in case users decide to add their own refresh rates in a local table.

This configuration has been tested with:

  • SteamOS Main 20241025.1000 with kernel 6.8.12-valve3
  • Arch Linux with kernel 6.12-rc5

Add support for the Lenovo Legion Go handheld, which features a rotated
1600x2560 panel that reports 60Hz and 144Hz modes in the EDID. VRR and
HDR are not supported, and only one panel model is known to be in use.

Modes other than 60Hz and 144Hz have a small chance of causing a locked
touchscreen until another modeset is performed or have artifacts during
modesetting, so extra modes are not included. The dynamic_modegen section
is filled out in case users decide to add their own refresh rates in a
local table.

This configuration has been tested with:
* SteamOS Main 20241025.1000 with kernel 6.8.12-valve3
* Arch Linux with kernel 6.12-rc5

Signed-off-by: Matthew Schwartz <[email protected]>
@sydarn
Copy link

sydarn commented Feb 7, 2025

Hi @matte-schwartz

Thank you for providing this! I am using it on SteamFork. Both modes works, but the frame limiter is bugged in the 60Hz mode. It's like there is an off-by-1 error in the divisor:
60fps -> 30fps
30fps -> 20fps
20fps -> 15fps

Do/did you experience this as well?
(144Hz frame limiter behaves correctly)
ps. I know that this logic is not from the script but from gamescope itself, just wanted to check if others also see the same problem.

@matte-schwartz
Copy link
Author

I'll take a look a bit later today and get back to you

@matte-schwartz
Copy link
Author

seems to work okay here:

hades-2-20250207113753

hades-2-20fps-20250207113924

are there any particular games it happens in? and does Steam Fork's kernel have matte-schwartz/linux@aad5901 and matte-schwartz/linux@a2bc993 ?

@sydarn
Copy link

sydarn commented Feb 7, 2025

Can you get 60Hz 60FPS?
Because the screenshots only show 30 and 20 FPS.

@matte-schwartz
Copy link
Author

hades-2-60fps-20250207114521

@sydarn
Copy link

sydarn commented Feb 7, 2025

Have it in all games I tested: Half Life 2, The Pathless, Tunic

@matte-schwartz
Copy link
Author

I'm not seeing the two patches I linked in Steam Fork's kernel: https://github.com/SteamFork/distribution/tree/main/PKGBUILD/linux

the Neptune kernel uses those two patches and they're necessary for the config system to work as you'd expect, but they are not upstream. Ideally we'd get those in an upstreamable state rather than rely on out-of-tree patches, but for now they are required.

if you want to check if the config system works with those patches, I'd recommend asking your distro maintainers to include those for testing, or trying out a Neptune kernel with the patches like https://steamdeck-packages.steamos.cloud/archlinux-mirror/jupiter-main/os/x86_64/linux-neptune-611-6.11.11.valve4-1-x86_64.pkg.tar.zst (and https://steamdeck-packages.steamos.cloud/archlinux-mirror/jupiter-main/os/x86_64/linux-neptune-611-headers-6.11.11.valve4-1-x86_64.pkg.tar.zst if you want)

@sydarn
Copy link

sydarn commented Feb 7, 2025

Thanks a bunch, I'll add those patches to the SteamFork kernel and try it :)

@sydarn
Copy link

sydarn commented Feb 7, 2025

It works! thanks again

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

Successfully merging this pull request may close these issues.

2 participants