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

osu-lazer: fix runtime error and bump to 2020.1225.0 #106377

Merged
merged 2 commits into from Dec 26, 2020

Conversation

oxalica
Copy link
Contributor

@oxalica oxalica commented Dec 8, 2020

Motivation for this change

Fix #106030

Upstream changed to SDL2 backend by default in ppy/osu@285e62b , which cause cursor stuck on my system.
I have no idea how to fix the cursor issue. Anyone familiar with SDL2 and C# can help?
Currently, parameter --tk is added to wrapper to force using legacy osuTK backend.

It now uses new default SDL2 backend.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 106377 run on x86_64-linux 1

1 package built:
  • osu-lazer

@thiagokokada
Copy link
Contributor

Result of nixpkgs-review pr 106377 1

1 package built:
  • osu-lazer

Copy link
Contributor

@thiagokokada thiagokokada left a comment

Choose a reason for hiding this comment

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

Played one song it seems to be working well.

@thiagokokada
Copy link
Contributor

Upstream changed to SDL2 backend by default in ppy/osu@285e62b , which cause cursor stuck on my system.

Maybe it is missing some X11 libs? I can take a look, but it is probably better to merge this PR first.


makeWrapper $out/lib/osu/osu\! $out/bin/osu\! \
--set DOTNET_ROOT "${dotnet-netcore}" \
--suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}"
--suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" \
--add-flags --tk # FIXME: Default SDL2 has cursor issues.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make this flag optional (with default to true)? This way, it would be easier to debug this SDL issue (and also allow someone to force SDL/Tk if they want).

Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, I tested without this flag and seems to work fine for me. I am using i3wm, are you using a Wayland desktop maybe @oxalica ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@thiagokokada

Can we make this flag optional (with default to true)?

I'm not sure how to make an enable-by-default optional flag. Maybe check an environment variable like OSU_NO_DEFAULT_FLAGS?

Are you using a Wayland desktop?

No. I'm using KDE with almost default settings (X currently).

  services.xserver = {
    enable = true;
    layout = "us";
    dpi = 144;
    desktopManager.plasma5.enable = true;
    displayManager.sddm.enable = true;
  };

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure how to make an enable-by-default optional flag. Maybe check an environment variable like OSU_NO_DEFAULT_FLAGS?

I was thinking something like this:

++ optional withPython2 python2
++ optionals withPython3 [ python3 ncurses ]
++ optional withPHP73 php73-unit
++ optional withPHP74 php74-unit
++ optional withPerl530 perl530
++ optional withPerl532 perl532
++ optional withPerldevel perldevel
++ optional withRuby_2_5 ruby_2_5
++ optional withRuby_2_6 ruby_2_6
++ optional withRuby_2_7 ruby_2_7
++ optional withSSL openssl;

So we could have a flag, withTk, that when set would do something like this:

# Pseudo-code, I think string concat uses another operator
''
    makeWrapper $out/lib/osu/osu\! $out/bin/osu\! \
      --set DOTNET_ROOT "${dotnet-netcore}" \
      --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" \
" ++ with optional withTk "--add-flags --tk"

But well, if it is working with SDL2 now I don't see a reason to complicate.

@oxalica
Copy link
Contributor Author

oxalica commented Dec 25, 2020

I finally make it work by default by pressing Control-Alt-R. (Switch raw input, though it is not implemented on Linux and has no effect) I believe it's some setting errors during version bumping but unfortunately I doesn't backup the "error setting" and don't know what's happening here.

I checked the working setting of ~/.local/share/osu/framework.ini and the only line which maybe related is the one below. Hope it can help people who run into the same issue.

IgnoredInputHandlers = OsuTKRawMouseHandler

I reverted the flag --tk and now it uses default SDL.

@oxalica oxalica changed the title osu-lazer: fix runtime error osu-lazer: fix runtime error and bump to 2020.1225.0 Dec 25, 2020
@thiagokokada
Copy link
Contributor

I finally make it work by default by pressing Control-Alt-R. (Switch raw input, though it is not implemented on Linux and has no effect) I believe it's some setting errors during version bumping but unfortunately I doesn't backup the "error setting" and don't know what's happening here.

I checked the working setting of ~/.local/share/osu/framework.ini and the only line which maybe related is the one below. Hope it can help people who run into the same issue.

IgnoredInputHandlers = OsuTKRawMouseHandler

I reverted the flag --tk and now it uses default SDL.

Maybe it would be better to report this problem upstream?

@thiagokokada
Copy link
Contributor

Result of nixpkgs-review pr 106377 1

1 package built:
  • osu-lazer

@thiagokokada
Copy link
Contributor

Tested:

  • Login
  • Downloading a music with osu! direct
  • Playing songs (including one with video)

@thiagokokada
Copy link
Contributor

@SuperSandro2000 Can we have this merged 🤔 ?

@SuperSandro2000 SuperSandro2000 merged commit 81181e7 into NixOS:master Dec 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

osu-lazer-2020.1204.0 does not launch
3 participants