Change:
Using AtLauncher to launch Minecraft 1.20.6 crashes immediately: <details<summarylog</summary[13/06/2024 11:48:21 AM] Checking for updated files! [13/06/2024 11:48:24 AM] Preparing for launch! [13/06/2024 11:48:24 AM] Launching pack Minecraft 1.20.6 (Vanilla) for Minecraft 1.20.6 [13/06/2024 11:48:24 AM] Logging into Minecraft! [13/06/2024 11:48:24 AM] Using Java runtime java-runtime-delta (Java 21.0.3) at path USERSDIR/runtimes/minecraft/java-runtime-delta/linux/java-runtime-delta [13/06/2024 11:48:24 AM] Launching Minecraft with the following arguments (user related stuff has been removed): [gamemoderun, USERSDIR/runtimes/minecraft/java-runtime-delta/linux/java-runtime-delta/bin/java, -Xmx4096M, -XX:MetaspaceSize=256M, -Duser.language=en, -Duser.country=US, -, -Dlog4j.configurationFile=USERSDIR/assets/logconfigs/client-, -XX:+UnlockExperimentalVMOptions, -XX:+UseG1GC, -XX:G1NewSizePercent=20, -XX:G1ReservePercent=20, -XX:MaxGCPauseMillis=50, -XX:G1HeapRegionSize=32M, -Xss1M, -, -, -, -, -, -Dminecraft.launcher.version=3.4.36.4, -cp, USERSDIR/libraries/com/github/oshi/oshi-core/6.4.10/oshi-core-, , --username, REDACTED, --version, 1.20.6, --gameDir, USERSDIR/instances/Minecraft1206, --assetsDir, USERSDIR/assets, --assetIndex, 16, --uuid, REDACTED, --accessToken, REDACTED, --userType, msa, --versionType, release, --width=854, --height=480] [13/06/2024 11:48:27 AM] [Datafixer Bootstrap/INFO] 222 Datafixer optimizations took 173 milliseconds [13/06/2024 11:48:29 AM] [Render thread/INFO] Environment: Environment[, , name=PROD] [13/06/2024 11:48:29 AM] [Render thread/INFO] Setting user: MINECRAFTUSERNAME [13/06/2024 11:48:29 AM] [Render thread/INFO] Backend library: LWJGL version 3.3.3+5 [13/06/2024 11:48:29 AM] ---- Minecraft Crash Report ---- [13/06/2024 11:48:29 AM] // Don't be sad, have a hug! <3 [13/06/2024 11:48:29 AM] [13/06/2024 11:48:29 AM] Time: 2024-06-13 11:48:29 [13/06/2024 11:48:29 AM] Description: Initializing game [13/06/2024 11:48:29 AM] [13/06/2024 11:48:29 AM] Failed to initialize GLFW, errors: GLFW error during init: [0x1000E]Failed to detect any supported platform [13/06/2024 11:48:29 AM] at (SourceFile:78) [13/06/2024 11:48:29 AM] at (SourceFile:846) [13/06/2024 11:48:29 AM] at ffh.<init(SourceFile:509) [13/06/2024 11:48:29 AM] at (SourceFile:223) [13/06/2024 11:48:29 AM] [13/06/2024 11:48:29 AM] [13/06/2024 11:48:29 AM] A detailed walkthrough of the error, its code path and all known details is as follows: [13/06/2024 11:48:29 AM]
[13/06/2024 11:48:29 AM] [13/06/2024 11:48:29 AM] -- Head -- [13/06/2024 11:48:29 AM] Thread: Render thread [13/06/2024 11:48:29 AM] Stacktrace: [13/06/2024 11:48:29 AM] at (SourceFile:78) [13/06/2024 11:48:29 AM] at (SourceFile:846) [13/06/2024 11:48:29 AM] at ffh.<init(SourceFile:509) [13/06/2024 11:48:29 AM] [13/06/2024 11:48:29 AM] -- Initialization -- [13/06/2024 11:48:29 AM] Details: [13/06/2024 11:48:29 AM] Modules: [13/06/2024 11:48:29 AM] Stacktrace: [13/06/2024 11:48:29 AM] at (SourceFile:223) [13/06/2024 11:48:29 AM] [13/06/2024 11:48:29 AM] -- System Details -- [13/06/2024 11:48:29 AM] Details: [13/06/2024 11:48:29 AM] Minecraft Version: 1.20.6 [13/06/2024 11:48:29 AM] Minecraft Version ID: 1.20.6 [13/06/2024 11:48:29 AM] Operating System: Linux (amd64) version 6.1.92 [13/06/2024 11:48:29 AM] Java Version: 21.0.3, Microsoft [13/06/2024 11:48:29 AM] Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft [13/06/2024 11:48:29 AM] Memory: bytes (468 MiB) / bytes (704 MiB) up to bytes (4096 MiB) [13/06/2024 11:48:29 AM] CPUs: 16 [13/06/2024 11:48:29 AM] Processor Vendor: AuthenticAMD [13/06/2024 11:48:29 AM] Processor Name: AMD Ryzen 7 5800H with Radeon Graphics [13/06/2024 11:48:29 AM] Identifier: AuthenticAMD Family 25 Model 80 Stepping 0 [13/06/2024 11:48:29 AM] Microarchitecture: Zen 3 [13/06/2024 11:48:29 AM] Frequency (GHz): 4.46 [13/06/2024 11:48:29 AM] Number of physical packages: 1 [13/06/2024 11:48:29 AM] Number of physical CPUs: 8 [13/06/2024 11:48:29 AM] Number of logical CPUs: 16 [13/06/2024 11:48:29 AM] Graphics card name: unknown [13/06/2024 11:48:29 AM] Graphics card vendor: unknown [13/06/2024 11:48:29 AM] Graphics card VRAM (MB): 0.00 [13/06/2024 11:48:29 AM] Graphics card deviceId: unknown [13/06/2024 11:48:29 AM] Graphics card versionInfo: version: a1 [13/06/2024 11:48:29 AM] Graphics card name: amdgpudrmfb [13/06/2024 11:48:29 AM] Graphics card vendor: unknown [13/06/2024 11:48:29 AM] Graphics card VRAM (MB): 0.00 [13/06/2024 11:48:29 AM] Graphics card deviceId: unknown [13/06/2024 11:48:29 AM] Graphics card versionInfo: version: c5 [13/06/2024 11:48:29 AM] Virtual memory max (MB): .45 [13/06/2024 11:48:29 AM] Virtual memory used (MB): 9594.43 [13/06/2024 11:48:29 AM] Swap memory total (MB): .00 [13/06/2024 11:48:29 AM] Swap memory used (MB): 0.00 [13/06/2024 11:48:29 AM] JVM Flags: 9 total; -Xmx4096M -XX:MetaspaceSize=256M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M -Xss1M [13/06/2024 11:48:29 AM] Launched Version: 1.20.6 [13/06/2024 11:48:29 AM] Launcher name: ATLauncher [13/06/2024 11:48:29 AM] Backend library: LWJGL version 3.3.3+5 [13/06/2024 11:48:29 AM] Backend API: Unknown [13/06/2024 11:48:29 AM] Window size: <not initialized[13/06/2024 11:48:29 AM] GL Caps: Using framebuffer using OpenGL 3.2 [13/06/2024 11:48:29 AM] GL debug messages: <disabled[13/06/2024 11:48:29 AM] Using VBOs: Yes [13/06/2024 11:48:29 AM] Is Modded: Probably not. Client jar signature and brand is untouched [13/06/2024 11:48:29 AM] Universe: 404 [13/06/2024 11:48:29 AM] Type: Client () [13/06/2024 11:48:29 AM] Locale: enUS [13/06/2024 11:48:29 AM] CPU: <unknown[13/06/2024 11:48:29 AM] # Game crashed! Crash report saved to: # USERSDIR/instances/Minecraft1206/crash-reports/crash-2024-06-1311.48.29- [13/06/2024 11:48:29 AM] Oh no. Minecraft crashed. Please check the logs for any errors and provide these logs when asking for support. </detailsSteps to reproduce the behavior: (from nixos-24.05 channel) by adding it to user packages in and then nixos-rebuild. AtLauncher. In "Create Pack", select 1.20.6 in the version list, and click "Create Instance". it successfully created the instance, in "Instances", click "Play" under the instance just created. crushes without showing any game interface. The log above appears. Launches the game as expected. Using proprietary NVIDIA driver on X11. OpenGL is enabled in <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. -- system: host os: multi-user?: sandbox: version: channels(root): nixpkgs: Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
That's weird. I'm not able to reproduce this issue with the same configuration you've mentioned: ATLauncher version Minecraft version Proprietary NVIDIA drivers on X11 As an initial debug attempt, could you run and see if that fixes your issue? If it does, then there's some missing library and I can try to find what that is.
Yes, it runs fine with steam-run.
Great, at least we have a temporary solution until I can fix this issue. Thanks for reporting this! I'll get to it as soon as I can.
I suspect that the latest upstream version may fix this issue. Could you please confirm this by trying out that version?
Not fixed. Neither 3.4.36.6 nor 3.4.36.8 fixes the issue. I also tried 3.4.36.9, but it's not good either. Launching with is still fine.
All right, so it's definitely something missing in the Nix expression. Will look into it.
I narrowed down the issue to the lib not being able to dynamically load. I it to while having nix-ld enabled as a workaround for myself. Additionally my mouse is always visible in front of the crosshair unless I also add . I have no idea if this issue exists under wayland.
Thanks for helping debug this, The package for ATLauncher has a function parameter called , could you try putting the libraries you mentioned within that? The syntax would look something like: I would try this myself but I can't reproduce the error. ATLauncher wouldn't run under Wayland at all (without ) as with all GUI apps built with Java.
Yep, that works perfectly.
could you please confirm that the above fix works for you as well? Meanwhile, I'll open a PR to fix this in the package itself.
It works.

Discussion:
<del> { copyDesktopItems , fetchurl , jre , lib , makeDesktopItem , makeWrapper , stdenvNoCC </del> <ins> { copyDesktopItems, fetchurl, jre, lib, makeDesktopItem, makeWrapper, stdenvNoCC, </ins> <del> , gamemodeSupport ? stdenvNoCC.isLinux , textToSpeechSupport ? stdenvNoCC.isLinux , additionalLibs ? [ ] </del> <ins> gamemodeSupport ? stdenvNoCC.isLinux, textToSpeechSupport ? stdenvNoCC.isLinux, additionalLibs ? [ ], </ins> <del> , # dependencies flite , gamemode , libglvnd , libpulseaudio , udev , xorg </del> <ins> # dependencies flite, gamemode, libglvnd, libpulseaudio, udev, xorg, </ins> }: stdenvNoCC.mkDerivation (finalAttrs: {

dontUnpack = true; <del> nativeBuildInputs = [ copyDesktopItems makeWrapper ]; </del> <ins> nativeBuildInputs = [ copyDesktopItems makeWrapper ]; </ins> installPhase = let <del> runtimeLibraries = [ libglvnd libpulseaudio udev xorg.libXxf86vm ] ++ lib.optional gamemodeSupport gamemode.lib ++ lib.optional textToSpeechSupport flite ++ additionalLibs; </del> <ins> runtimeLibraries = [ libglvnd libpulseaudio udev xorg.libX11 xorg.libXcursor xorg.libXxf86vm ] ++ lib.optional gamemodeSupport gamemode.lib ++ lib.optional textToSpeechSupport flite ++ additionalLibs; </ins> in '' runHook preInstall