mojira.dev

Flisk

Assigned

No issues.

Reported

MCL-14466 Minecraft does not start when using the i3 window manager on Gentoo Duplicate MCL-11246 Launcher doesn't scale on 4K display Duplicate

Comments

I'm pretty sure this is actually entirely unrelated to my window manager and a duplicate of MCL-12973. Not sure why switching window managers coincided with this bug appearing again.

Sorry for the noise. Feel free to close this.

Some additional information: after changing the path of the Java executable from the default to /usr/lib64/openjdk-8/bin/java, the game starts. I'm not sure why the launcher is resolving the target of {{/usr/bin/java}} (this is a symlink in Gentoo, and as the run-java-tool message in the launcher log says, not supposed to be resolved by programs using Java), nor why this doesn't fail under GNOME.

I tried the timerslack tweaking workaround suggested in the earlier comments. Sadly, I saw barely any improvement: ~17 % with default timerslack vs ~15 % with 200000–1000000 ns, all on an Intel(R) Celeron(R) CPU G1610T @ 2.30GHz.

As part of my tests I wrote a small C program that applies a custom timerslack value to programs started through it. This may be useful for anyone who is seeing notable improvements with a tweaked timerslack value. The program requires neither root privileges nor manual intervention on server restarts.

#include <sys/prctl.h>
#include <error.h>
#include <errno.h>
#include <unistd.h>

int main(int argc, char **argv) {
        if (argc < 2)
                error(1, 0, "usage: %s <command> [<args>]", argv[0]);

        if (prctl(PR_SET_TIMERSLACK, 1000000L, 0L, 0L, 0L) != 0)
                error(1, errno, "prctl");

        execvp(argv[1], argv + 1);
        error(1, errno, "execvp");
}

Usage instructions:

  1. Install GCC if it's not on your system already (e.g., on Debian: sudo apt install gcc)

  2. Put the code above in a file (e.g. copy, cat > slack.c, paste, Ctrl+D to finish writing)

  3. Optionally tweak the timerslack value in the prctl() call to whichever value works best for you

  4. Compile it (gcc slack.c -o slack)

  5. Run your server through it by prepending the program to the command that starts your server:

    ./slack java -Xmx1G -Xms1G -jar server.jar

I can reproduce the issue in 2.1.5411.