WIP [Tutorial] How to run Minecraft: Java Edition on the nintendo switch with linux

Discussion in 'Switch - Exploits, Custom Firmwares & Soft Mods' started by NekoNoor, May 7, 2018.

  1. natinusala

    natinusala Win32 error 31 is not an error

    Member
    11
    Dec 1, 2012
    France
    I believe that's a issue in the X server configuration
     
  2. Centergaming

    Centergaming GBAtemp Advanced Fan

    Member
    5
    Apr 17, 2016
    United States
    How are you able to fix this issue if you don't mind me asking? :)

    — Posts automatically merged - Please don't double post! —

    Photo is totally fake.... or not.... IMG_2098.JPG
     
  3. Mnecraft368

    Mnecraft368 I hate my name.

    Member
    7
    Aug 8, 2015
    United Kingdom
    Photo was most likely fake or streamed
     
  4. level42

    level42 Member

    Newcomer
    2
    Apr 2, 2011
    Canada
    Has any progress on this been made?
     
  5. milomc123

    milomc123 GBAtemp Regular

    Member
    2
    Jun 26, 2018
    Ireland
    In the soul stone
  6. NekoNoor
    OP

    NekoNoor Member

    Newcomer
    3
    Oct 13, 2015
    Netherlands
  7. skedone

    skedone GBAtemp Fan

    Member
    4
    May 2, 2008
    United States
    Anyone tried the new native Linux launcher if anything the crash reports will be more detailed
     
  8. Yo_Homie

    Yo_Homie Newbie

    Newcomer
    1
    Dec 31, 2018
    United States
    I have been trying to get Minecraft to work on Ubuntu on the Switch. Ran into a linux.display.create error. eventually gave up. Here is my liblwjgl.so if you wanna try it with Arch.
     

    Attached Files:

    Last edited by Yo_Homie, Dec 31, 2018
  9. Xolono

    Xolono Member

    Newcomer
    1
    Apr 11, 2017
    With the new L4T Ubuntu, will this likely affect anything?
     
  10. uyjulian

    uyjulian Homebrewer

    Member
    8
    Nov 26, 2012
    United States
    United States
    Sure. Instead of nouveau graphics, we have nvidia graphics now.
     
  11. NekoNoor
    OP

    NekoNoor Member

    Newcomer
    3
    Oct 13, 2015
    Netherlands
    I installed L4T to mess around with it, I'll see if I can get it working on L4T
     
  12. Xolono

    Xolono Member

    Newcomer
    1
    Apr 11, 2017
    Hey there, I've also tried messing around with this, but my patience isn't great. Some people also said to try these steps, haven't had the chance to yet.
    Hopefully this helps

    "for the switch you need to compile LWJGL for arm64 as thats the only binary not letting MC run. I tried doing so but still no luck getting it to run. Search ChromeOS forums for this rather rpi as most rpis run 32-bit OSes rather 64-bit"
    "Minecraft only provides the libraries it needs for x86 systems, you'll probably have to compile them yourself for 64-bit ARM and convince the launcher to use them if you want to play Minecraft."
     
  13. Artur95

    Artur95 Member

    Newcomer
    1
    Sep 11, 2018
    Germany
    Deutschland
    But why does it run on a raspberry pi that is ARM too?

    Edit: nevermind, im dumb
     
    Last edited by Artur95, May 7, 2019
  14. Xolono

    Xolono Member

    Newcomer
    1
    Apr 11, 2017
    pi is ARM32, not ARM64
     
  15. Yo_Homie

    Yo_Homie Newbie

    Newcomer
    1
    Dec 31, 2018
    United States
    I finally managed to get different errors. I can't tell if it is further along than what NekoNoor got or not. Here is my log:
     

    Attached Files:

    Last edited by Yo_Homie, May 14, 2019
  16. chaoskagami

    chaoskagami Former CFW Dev

    Member
    9
    Mar 26, 2016
    United States
    ↑↑↓↓←→←→BA
    What you refer to as "PC" would be more adequeately described as the x86/amd64 architecture. The switch has a decent set of specs - enough to play "PC" games, but running games for an intel architecture through QEMU/whatever isn't using a hypervisor, but emulation.

    wine-hangover can achieve decent performance with some DirectX9 and OpenGL games, but isn't yet complete. Hangover effectively translates the graphics APIs to the native host and runs the rest through qemu, so there's still CPU overhead but GPU overhead is close to nonexistent.

    Using purely emulation the most you'll manage is running visual novels at an extremely slow speed. Software rendering is unfortunately disgustingly slow whether it's Windows' reference renderer or llvmpipe.

    Tiny edit; I've seen three situations in which this occurs, generally.
    1. ABI breakage (e.g. libraries are linked using incompatible versions and fail to work at runtime)
    2. Missing X11 cookies (but usually, this isn't a PixmapError)
    3. Broken Xorg. Unlikely here since you have a desktop.
    All-in-all, considering y'all seem to be sharing random shared objects instead of building the relevant libraries on a switch with build-essential and openjdk installed, ABI breakage seems most likely to me here.
     
    Last edited by chaoskagami, May 14, 2019
    uyjulian and coon-strudel like this.
  17. Yo_Homie

    Yo_Homie Newbie

    Newcomer
    1
    Dec 31, 2018
    United States
    Yes, I really have no idea what I should be doing to fix this. Guess I’ll be looking at what an ABI is this afternoon.

    P.S- Is there anyone here who is a little more familiar with java/lwjgl that could give some help (like a lot ).
     
    Last edited by Yo_Homie, May 15, 2019
  18. chaoskagami

    chaoskagami Former CFW Dev

    Member
    9
    Mar 26, 2016
    United States
    ↑↑↓↓←→←→BA
    Application Binary Interface, which is in contrast to API (Application Programming Interface, e.g. headers)

    Essentially, say a game loads SDL or equivalent to draw graphics. However, a recent version of this library changed a structure's format. The game accesses this structure directly when it should not, according to the documentation. As a result, the two things do not agree on what this structure is and it gets screwed up in memory, resulting in undefined behavior.

    In a nutshell, that's what ABI breakage is. If both were recompiled, the problem would go away (because API is still compatible), but using two binaries that weren't compiled against compatible API versions causes misbehavior that's often difficult to detect (ABI breakage.)

    What you should do to fix this is basically recompile everything Minecraft uses, on the target OS (Switch, Ubuntu or whatever distro you're running), in dependency order. You also need to make a custom profile for Minecraft in the launcher and override the libraries so it doesn't fall back on the ones Mojang provides, because those are unlikely to be compatible.
     
    Last edited by chaoskagami, May 15, 2019
  19. Yo_Homie

    Yo_Homie Newbie

    Newcomer
    1
    Dec 31, 2018
    United States
    Thank you for the great explanation! It would make sense to recompile everything it uses, but I sadly do not have the time nor skills to do that. I also think that the script used to load the game and all of its libraries, loads them all directly. That is why you have to capture the output from the (Default) launcher in the terminal and re-run it using the script with different libraries, making it not necessary to create a profile. When running it on the raspberry pi, I only had to use a special lwjgl.so and openal.so recompiled for that arm platform - That is why I figured all I would need to recompile is lwjgl for the switch and (provided the right modified run script and a proper version of java) it should be able to run. Obviously I was wrong. I'm not very familiar with Java or OpenGL or most things related to it; I just thought it would be cool to have Minecraft java running natively on the Nintendo Switch, but most of this is above my head. :(
     
    Last edited by Yo_Homie, May 16, 2019 at 4:46 PM
  20. chaoskagami

    chaoskagami Former CFW Dev

    Member
    9
    Mar 26, 2016
    United States
    ↑↑↓↓←→←→BA
    An old Minecraft ebuild that no longer works in Gentoo provided a shell script wrapper around java that would modify the java classpath it received to redirect everything to system libraries. If you can still override what version of java to use, you can probably still pull something similar. Minecraft has to pass all the java libraries to java in the argument list.
     
Loading...