1. LarBob

    OP LarBob GBAtemp Fan
    Member

    Joined:
    Dec 29, 2013
    Messages:
    370
    Country:
    United States
    Here's what the end result looks like:

    I tested with Animal Crossing. It runs at about half speed at best. (If you saw this tutorial on Reddit already, I did not steal this guide. I posted it there as well.)

    I'm assuming you already have Arch running on your switch with SSH and Wi-Fi working. SSH isn't needed, but it's way easier to do this with SSH. If you don't have Arch set up, look here: https://gbatemp.net/threads/quick-tuto-how-to-boot-linux-on-your-switch.501918/ I would also suggest the precompiled version of the booting tools here https://github.com/SoulCipher/shofel2_linux

    Please comment if anything doesn't work as I might have forgotten something (I did most of this last night so I'm pretty much trying to remember the steps I took).

    First you should have the equivalent of build-essential or base-devel for your system.

    SSH into the Switch and sudo su into root. Now run

    Code:
    pacman -Syu alsa-lib bluez-libs cairo enet gcc-libs gdk-pixbuf2 glib2 glibc gtk2 hidapi libevdev libpng libpulse libsm libx11 libxi libxrandr libxxf86vm lzo mbedtls pango sfml zlib cmake git
    This will install Dolphin-emu's dependencies. Next, run

    Code:
    git clone https://github.com/dolphin-emu/dolphin.git dolphin-emu
    Which will clone Dolphin-emu's repository to your Switch. Move into the dolphin-emu directory.

    Code:
    cd dolphin-emu
    Now create a folder called Build and go into it.

    Code:
    mkdir Build && cd Build
    Configure the build

    Code:
    cmake ..
    After this is completed, run

    Code:
    make -j6
    to compile Dolphin. Now run

    Code:
    make install
    to install Dolphin on to the Switch.

    Run it by typing dolphin-emu in LXTerminal on the Switch and pressing enter. You can type by using the "Onboard" program. Press the Config button, go to the audio section, and tap where it says ALSA. Change this to disabled. Close Dolphin and go back to your ssh session. Run

    Code:
    nano ~/.config/dolphin-emu/Dolphin.ini
    and change where it says CPUCore = 1 to CPUCore = 4. This sets it to use the JIT64 DC, which is the fastest CPU interpreter for the Switch.

    Now you can relaunch Dolphin and load a game!

    Edit: To improve performance, try running

    Code:
    echo 0a > /sys/kernel/debug/dri/0/pstate
    (Thanks, @natinusala!)
     
    Last edited by LarBob, Apr 30, 2018
    ELY_M, Hondyn, ry755 and 9 others like this.
  2. souler92

    souler92 GBAtemp Fan
    Member

    Joined:
    Jan 5, 2017
    Messages:
    394
    Country:
    Netherlands
    my guess it is half speed because its running linux... i hope one day a natively(ish)emulator comes on the switch its fw


    still friggin awesome!
     
  3. JellyPerson

    JellyPerson https://discord.gg/BMVma8j
    Banned

    Joined:
    Jul 26, 2017
    Messages:
    1,164
    Country:
    Korea, North
    Typo:
    You meant CD dolphin-emu
     
    Mikazuki likes this.
  4. LarBob

    OP LarBob GBAtemp Fan
    Member

    Joined:
    Dec 29, 2013
    Messages:
    370
    Country:
    United States
    No, I didn't. "cd dolphin-emu" changes the directory to the dolphin-emu directory.
    http://linuxcommand.org/lc3_man_pages/cdh.html

    Dolphin runs very well on Linux on PCs and on many ARM Android phones. It's more due to how early in development the Switch Linux drivers are.
     
    Last edited by LarBob, Apr 28, 2018
    oji and CuriousTommy like this.
  5. Seriel

    Seriel Doing her best
    Member

    Joined:
    Aug 18, 2015
    Messages:
    3,154
    Country:
    United Kingdom
    AboodXD and Ericthegreat like this.
  6. LarBob

    OP LarBob GBAtemp Fan
    Member

    Joined:
    Dec 29, 2013
    Messages:
    370
    Country:
    United States
    OH! Wow, I think I'm blind. I thought he was referring to CD being lowercase as he put it in caps. I'm sorry @JellyPerson! Thank you for pointing that out. I've fixed it in the OP.
     
  7. ShadowOne333

    ShadowOne333 QVID PRO QVO
    Developer

    Joined:
    Jan 17, 2013
    Messages:
    10,226
    Country:
    Mexico
    Are there any configurations in Dolphin which might help speed up the games?
     
  8. bobmcjr

    bobmcjr GBAtemp Maniac
    Member

    Joined:
    Apr 26, 2013
    Messages:
    1,023
    Country:
    United States
    Animal Crossing is one of the lightest GC games available and if it's struggling, there's likely little that can be done.
    I ran Dolphin on a NVIDIA TK1 board a while back, and that did at least a solid 45 FPS, and failoverfl0w's switch port ran at a decent 40, so I would say the GPU drivers aren't working with this version right now.
     
  9. PikachuR77

    PikachuR77 GBAtemp Regular
    Member

    Joined:
    Feb 6, 2018
    Messages:
    135
    Country:
    United States
    Does the emulator recognize the joycons?
     
  10. cearp

    cearp 瓜老外
    Developer

    Joined:
    May 26, 2008
    Messages:
    8,377
    Country:
    Tuvalu
    it's more about linux recognizing them, not dolphin.
    if the tutorials people follow include setting up the joycons, it should be easy.

    it's bluetooth, maybe support isn't included yet?
     
    Last edited by cearp, Apr 29, 2018
  11. PikachuR77

    PikachuR77 GBAtemp Regular
    Member

    Joined:
    Feb 6, 2018
    Messages:
    135
    Country:
    United States
    Then does linux recognize the joycons?
     
  12. cearp

    cearp 瓜老外
    Developer

    Joined:
    May 26, 2008
    Messages:
    8,377
    Country:
    Tuvalu
    They're just bluetooth, I don't know if people have bluetooth working on linux for switch. If so we could use real mice and keyboards easily :)
     
  13. Raugo

    Raugo GBAtemp Advanced Fan
    Member

    Joined:
    Nov 22, 2014
    Messages:
    507
    Country:
    Spain
    Does it work well? I have compiled it and it works but when I launch a game it crashes.
     
  14. LarBob

    OP LarBob GBAtemp Fan
    Member

    Joined:
    Dec 29, 2013
    Messages:
    370
    Country:
    United States
    Make sure you changed the CPUCore option and disabled sound
     
  15. Raugo

    Raugo GBAtemp Advanced Fan
    Member

    Joined:
    Nov 22, 2014
    Messages:
    507
    Country:
    Spain
    Yes, I changed it. Maybe is a incompatibility with the game (Fire emblem) I will try with another game.
     
  16. SkillingCat

    SkillingCat Advanced Member
    Newcomer

    Joined:
    Nov 3, 2016
    Messages:
    87
    Country:
    France
    Yeah bluetooth is working fine for mouse/keyboard, I use my bluetooth keyboard so that I don't get mad every time I have to type a command in a terminal. ;)
     
    cearp likes this.
  17. ExploitTnT

    ExploitTnT Devy | YT: DevRin | dev_settings
    Member

    Joined:
    Jul 30, 2017
    Messages:
    150
    Country:
    Austria
    Help me with this problem
    [​IMG]
     
    Kobigov likes this.
  18. Kobigov

    Kobigov GBAtemp Regular
    Member

    Joined:
    Jan 10, 2018
    Messages:
    129
    Country:
    United States
    I get the same problem
     
  19. LarBob

    OP LarBob GBAtemp Fan
    Member

    Joined:
    Dec 29, 2013
    Messages:
    370
    Country:
    United States
    Make sure you have make installed.
     
    Kobigov likes this.
  20. Kobigov

    Kobigov GBAtemp Regular
    Member

    Joined:
    Jan 10, 2018
    Messages:
    129
    Country:
    United States
    It gives this now.

    Code:
    -- The C compiler identification is unknown
    -- The CXX compiler identification is unknown
    CMake Error at CMakeLists.txt:12 (project):
      No CMAKE_C_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting either the environment
      variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
      the compiler, or to the compiler name if it is in the PATH.
    
    
    CMake Error at CMakeLists.txt:12 (project):
      No CMAKE_CXX_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting either the environment
      variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
      to the compiler, or to the compiler name if it is in the PATH.
    
    
    -- Configuring incomplete, errors occurred!
    See also "/home/alarm/dolphin-emu/Build/CMakeFiles/CMakeOutput.log".
    See also "/home/alarm/dolphin-emu/Build/CMakeFiles/CMakeError.log".
    
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - [Tutorial], emulator), Install