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

gamescope: init at 3.11.33-jupiter-3.3-2 #181788

Merged
merged 1 commit into from
Aug 9, 2022
Merged

Conversation

nrdxp
Copy link

@nrdxp nrdxp commented Jul 17, 2022

Description of changes

Closes #162562

Based on @samueldr's version #162562 (comment)

All I did was update to the latest tag, add a pkgconfig file for stb, and add a small patch to stop meson from trying to load wlroots and libliftoff from it's src directory and instead rely on pkgconfig. That way we don't have to rely on copying sources as in the original.

I also figured out a way to add the cap_sys_nice capbility for NixOS systems to launch steam. But the change may be a bit contentious since I'd have to patch the steam derivation (since bubblewrap will fail without suid bit), so I'll save that for a seprate PR.

Note
I have not been able to successfully launch gamescope with the DRM backend from a VT. I have only been able to use it from a wayland session so far. Not sure if I just don't know the right flags to pass, or if this is a genuine upstream bug, or if it's an issue with Nvidia on a dual graphics laptop. Likely an upstream bug ValveSoftware/gamescope#498 (comment) It works by passing --disable-layers ValveSoftware/gamescope#560

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@samueldr
Copy link
Member

Were you able to launch it on DRM using 3.11.28-beta4, the version in the Jovian Experiments repo?

I was able to on the Steam Deck. Untested on any other hardware. (It was how I validated that touch input was broken when running embedded, but not on DRM.)

@zhaofengli
Copy link
Member

Still waiting for my Steam Deck to arrive, but could the touch problem be related to the --default-touch-mode flag? I was looking at the stock gamescope-session and it seems to pass a lot of flags:

gamescope \
        --generate-drm-mode fixed \
        --xwayland-count 2 \
        -w 1280 -h 800 \
        --default-touch-mode 4 \
        --hide-cursor-delay 3000 \
        --max-scale 2 \
        --fade-out-duration 200 \
        -e -R "$socket" -T "$stats" \
        -O '*',eDP-1 \
        --cursor-hotspot 5,3 --cursor ...

@samueldr
Copy link
Member

samueldr commented Jul 18, 2022

Nope, touch is because when running embedded (e.g. under X11 or Wayland) it relies on SDL's fallback touch input machinery, which will resolve to click events, but don't work correctly for e.g. Steam's interface. The touch events are broken way earlier than any of the wayland/x11 components that gamescope launches.

I have an almost-working bodge that proves all of that.

@nrdxp
Copy link
Author

nrdxp commented Jul 20, 2022

Were you able to launch it on DRM using 3.11.28-beta4, the version in the Jovian Experiments repo?

Unfortunately not, I've tried a number of different vesions but none launch successfully from a VT console, at least not with my Nvidia card, haven't really tested with the Intel chip.

update
decided to give it a go with the intel chip and that also failed on some vulkan assertion, so either my intel chip doesn't support some required vulkan feature or there is bug there as well. Retroarch works from a VT with either chip so I'm leaning toward the second 🤷

update 2
A little bit more digging revealed it is failing on xwayland init (only from a VT) 😞
ValveSoftware/gamescope#526 (comment)

@nrdxp
Copy link
Author

nrdxp commented Jul 20, 2022

Added the meta and removed some uneeded buildInputs. Also added a wrapper because of this call, though it's only used for a debug flag it doesn't really increase the closure size so I think it's fine.

@samueldr samueldr self-requested a review July 20, 2022 18:07
@samueldr samueldr dismissed their stale review July 20, 2022 18:08

(make the red × go away)

@nrdxp
Copy link
Author

nrdxp commented Jul 21, 2022

Finally figured out how to launch from a VT, probably useful information for others. Opened an issue to request to make the behavior automatic: ValveSoftware/gamescope#560

Rebased to resolve conflicts and removed the commit on stb since it looks like someone recently fixed that in a nicer way.

@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1 and removed 10.rebuild-darwin: 1 10.rebuild-darwin: 1-10 labels Jul 21, 2022
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you using alejandra to format? If so I highly recommend to switch back to nixpkgs-fmt because it creates code that is not compatible with the style in nixpkgs.

@nrdxp
Copy link
Author

nrdxp commented Jul 22, 2022

are you using alejandra to format? If so I highly recommend to switch back to nixpkgs-fmt because it creates code that is not compatible with the style in nixpkgs.

ah yeah, didn't even think about that, but your right, atm the format of nixpkgs is more in line with nixpkgs-fmt output. I'll reformat in a bit

@nrdxp nrdxp changed the title gamescope: init at 3.11.33-beta1 gamescope: init at 3.11.33-jupiter-3.3-2 Aug 8, 2022
@nrdxp
Copy link
Author

nrdxp commented Aug 8, 2022

any reviewers so far care to approve?

Copy link
Member

@rapenne-s rapenne-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine to me

tried with nvidia and intel, on Wayland and X

@github-actions
Copy link
Contributor

Successfully created backport PR #186347 for release-22.05.

zhaofengli added a commit to zhaofengli/Jovian-NixOS that referenced this pull request Aug 21, 2022
Package was added to nixpkgs in
<NixOS/nixpkgs#181788>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Packaging Request: GameScope
7 participants