Skip to content
Learn MikuMikuDance – MMD Tutorials – Free 3D Animation Software

Learn MikuMikuDance – MMD Tutorials – Free 3D Animation Software

Download Free Animation Software – Let's Learn How to Do Everything!

  • Step-by-Step MMD instructions
  • DOWNLOADS
  • Troubleshoot, Fix MMD
  • Site Contents
  • Reggie Replies Q&A
  • Homework!
  • What IS MMD?
    • Download MikuMikuDance Newest Latest Version of MMD
  • “HOW TO”
    • Raycast RAY-MMD Effect Tutorials
  • BONUS PAGES
    • Why convert PMD models to PMX?
  • HALL of CHAMPIONS
  • Tutorial Categories
  • About
    • Privacy Policy
  • Toggle search form
  • Posing MMD Models Using Reference Images Animation Shortcuts
  • PMD Editor Basics, now in English – Modify Your MMD Models! Nuts & Bolts
  • Crazy Animation Creation yields fun video and good practice! "the making of" my video
  • New to MikuMikuDance? LearnMMD is The Instruction Manual for MMD! MMD Tutorials
  • What kind of laptop should I buy for running MMD? Random Thoughts & Visions
  • MMD Little Car Models offer racing fun!
    MMD Little Car Models Download offers racing thrills! Downloading New Models
  • Rin With and Without the ToonDX Effect!
    Using the ToonDX Effect for MikuMikuDance. ARIZONA
  • The MMD 7.39 VIEW MENU Options MENU Option Descriptions

Running MikuMikuDance in Linux using Wine and DXVK

Posted on December 28, 2020April 23, 2022 By parkeerwacht 22 Comments on Running MikuMikuDance in Linux using Wine and DXVK

How do I run MMD on Linux? Does MikuMikuDance run on Linux? How do I run MMD using Wine on Linux? Can I use MME on Linux? How do I use DXVK with MMD? How do I run MMD on Ubuntu?

How to run MikuMikuDance in Linux using Wine and DXVK

Hey everyone, it is parkeerwacht here! It has been a while since I have written for the pages here at LearnMMD! But I am back with a special tutorial. How to run MMD in Linux! And “no”, not some alternate version of MMD: run the full 64-bit Windows version (9.32 as of this writing) including MME!

Ok, so a little story before we begin: Since I have always been interested in the technical aspect of MMD, and also computers in general, I like challenges! So I switched to Linux as my main operating system about a year ago, as of writing this. I have a problem however: I can no longer use MMD! MikuMikuDance only runs on Windows. Because I can play my Windows games using DirectX just fine, using Wine and DXVK, I thought could I do the same for MMD? And the answer is YES!

For this tutorial, I searched the internet and found multiple sources (I will cite these)… I combined them into this one guide for MMD specifically. Also I found a script on a Japanese website. I looked into its code and I did some testing. I wrote my own script based of that one. I also found a resource to do it manually. The script only automates things. ANYWAY enough rambling about… LET’S GET STARTED!!!

Also lets put some credit to the people who helped me with the information:

  • Midnight Express Ginga81(ginga81)
  • petite philosophie (Nicovideo, YouTube, Twitter)

Without them I would not have been able to write this.

Now a little thing before we begin, I need to start with a disclaimer:

We are going to mess around with the Linux terminal. Make sure you know what you are doing! All the scripts I listed are provided “as is”. If for some reason they do not work, try to troubleshoot them yourself. This is due to the constant updates to wine, winetricks and DXVK. If it is completely broken let me know and I will update them. Use this tutorial and the scripts at your own risk. This guide only works for MMD+MME. It is not compatible with PMXe!
ALSO NOTE: IF YOU ARE SENSITIVE TO FLASHING IMAGES DO NOT USE MMD IN LINUX. FLASHING ARTIFACTS MAY OCCUR!!!

The following instructions are written for Ubuntu (and derived distro’s) IF you run something else follow the instructions for your distro instead. For my install script, I listed all the commands so you can follow them for your distro.

First of all check if your system is compatible with the requirements for MMD, Vulkan and DXVK

Requirements:

  • 64-bit System.
  • Operating system: Ubuntu 18.04 or newer, I recommend 20.04
    (Note: Other Linux distro’s will probably work fine if they are debian based. However I have done my testing on Ubuntu 20.04)
  • an AMD or Nvidia Graphics card that supports Vulkan. (here is a list of supported cards: https://en.wikipedia.org/wiki/Vulkan_(API)#Compatibility )
  • Recommended: at least 2 monitors (I will explain why later)
  • Knowledge of the Linux terminal

Here is a screenshot of my install:

Step 1 Setting up Vulkan.

Note: If you already got all the drivers and software installed to run Vulkan applications on your system you can skip this step.

What is Vulkan?

Vulkan is a graphical computing API much like DirectX and OpenGL etc. (very simplified) Now since Linux does not support DirectX, we need to find another way. Vulkan has less latency than OpenGL, and is generally more efficient. It is also compatible across multiple platforms.

1. Installing Drivers

Before we can use Vulkan we need to install some drivers first. PLEASE FOLLOW INSTRUCTIONS CAREFULLY!!!!!!!

DO NOT FORGET THE FOLLOWING COMMAND:

We need to set up the system so it accepts x86 packages. Do this via:

sudo dpkg --add-architecture i386

For AMD cards

Make sure you are running either AMDVLK or AMDGPU-pro (DO NOT INSTALL BOTH)

I recommend using AMDVLK. I had the best experiences with this driver. The AMDGPU-pro package from AMD tends to break some games/applications using Vulkan. I have not tested AMDGPU-pro drivers , only AMDVLK.

Follow the instructions on this page under install with pre-build driver:

https://github.com/GPUOpen-Drivers/AMDVLK#install-with-pre-built-driver

For Nvidia cards

see instructions below for installing Vulkan dependencies

2. Installing Vulkan dependencies

To install Vulkan on your system I highly suggest following the steps on this page for your version of Ubuntu (or other distro) and GPU.

here is the link: https://github.com/lutris/docs/blob/master/InstallingDrivers.md

Installing vulkan

Step 2 Installing Wine

NOTE: If you already have the latest wine-staging version on your system you can skip this step.

What is Wine?

Wine stands for Wine Is Not an Emulator. It is a compatibility layer that is able to run Windows programs on other operating systems, like Linux and macOS. This has a huge performance boost compared to running a virtual machine. It translates all the Windows API calls on the fly so Linux can understand these. This saves a lot of memory usage and performance hits. Plus you can integrate Windows applications in your desktop environment [source]

We need this program so we can run Windows programs on Linux. MMD is a Windows only program.

Installing Wine

We need to install Wine-staging (latest version) to be able to run MMD with DXVK.

Note: If you already got the latest version of wine-staging installed, you can skip this step. If you have a different variant of Wine installed, uninstall it and reinstall with wine-staging

MAKE SURE TO INSTALL THE STAGING BRANCH!!

Before you setup anything, run this command if you haven’t done so already:

sudo dpg --add-architecture i386

ONLY FOR UBUNTU 18.04 USERS!!! IF YOU HAVE 19.10 OR NEWER SKIP TOWARDS SETTING UP WINE.

You need to set up FAudio first. This package is not in Ubuntu’s package manager but it is a dependency for Wine. To install follow these commands:

wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/i386/libfaudio0_19.07-0~bionic_i386.deb

wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/amd64/libfaudio0_19.07-0~bionic_amd64.deb

sudo dpkg -i libfaudio0_19.07-0~bionic_*.deb

If you get an error saying missing dependencies, enter the following command:

sudo apt -f install

Now go to the next part

Setting up wine

Follow the instructions on this page:

https://wiki.winehq.org/Ubuntu

MAKE SURE TO INSTALL WINE-STAGING!!!!

installing wine-staging

Now you have Wine installed

You can test it by typing the following command

wine --version

Step 3 Setting up Japanese locale.

We need to set up Japanese locale on the system to make sure MMD runs properly. This also allows you to unzip your models and such (due to them being zipped in the Japanese language format). We need to install the Japanese language pack for this

To install this you enter the following command.

sudo apt install language-pack-ja

installing language packs

Unzip script

For all your models, accessories, effects, motion data etc. you need to use this script to unpack it.

This will preserve all the original Japanese filenames etc. and this is important for your models and effects, for example.

Most archive formats are supported!

Dependencies for the script:

p7zip-full p7zip-rar convmv

to install them run this command:

sudo apt install p7zip-full p7zip-rar convmv

once these are installed you go to your MMD folder in a terminal and run the following commands:

wget https://learnmmd.com/wp-content/uploads/2020/12/linux-unzip-tool.tar.gz
tar -xf linux-unzip-tool.tar.gz
chmod +x Decompress-as-Japanese.sh

instructions on how to use will appear on screen once you run it.

Run the file using:

./Decompress-as-Japanese.sh

Step 4 Setting up Winetricks

NOTE: EVEN IF YOU HAVE WINETRICKS INSTALLED FOLLOW THE STEPS BELOW.

To use Winetricks we need to set up a few dependencies first.

These packages are aria2 binutils, cabextract, fuseiso, p7zip-full, policykit-1, unrar, unzip, xdg-utils, xz-utils and zenity

install them with the following:

sudo apt install aria2 binutils cabextract fuseiso p7zip-full policykit-1 unrar unzip xdg-utils xz-utils zenity

My autoinstall script will setup winetricks for us.

Step 5 setting up MMD

UPDATE 29-08-2021: I have updated the script after doing some research. The script now also installs all the fonts needed for MMD. (Thanks to INFINITY)
UPDATE 23-04-2022: After doing further research I have patched the install script. It will now correctly install quartz.dll & Updated DXVK version as well. (Thanks INFINITY)

Now we get to the MMD side of things.

For MMD we are gonna set up a special wineprefix named WineMMD64, this will be a hidden folder in the home directory.

I have found a script online that does everything that is needed for MMD to run automatically. (credit to Ginga8) This one is slightly outdated with the latest winetricks and ubuntu builds. I have modified it to work with the latest winetricks and setup DXVK for us.

Download and extract my scripts using the following commands.

CD <Path to your MMD folder>
wget https://learnmmd.com/wp-content/uploads/2022/04/WineMMD64.tar.gz
tar -xf WineMMD64.tar.gz
chmod +x WineMMD64Setup

Now you can run it using the following command:

bash WineMMD64Setup

This might take a while depending on your internet speed.

If the installation fails you can delete the folders .WineMMD64 and mmdtemp in your home directory. and try again. (if you cannot see it, press ctrl+h to reveal hidden folders)

Sometimes Winetricks will fail downloading one of the required libraries. (you can try deleting the winetricks folder in /home/<username>/.cache this will have winetricks re-download all the files)

If the installation fails again, try to look for errors and search them online or ask in the comments below.

Step 6 download and set up MMD + MME

Once you have done the last step, we can finally download and set up MMD

You can download the latest versions from the Download page here on LearnMMD or the VPVP page (on the VPVP page, you want item 1.4) and the latest version of MME (v037 as of this writing).

  • Use the unzip tool from earlier to unzip both archives. (this is to preserve the Japanese characters)
  • put MMD into a folder of choice.
  • Install MME as normal by putting the 3 DLL files in the same folder as MikuMikuDance.exe
  • Put the MikuMikuDance file included in the archive downloaded before in the same folder as MikuMikuDance.exe
  • Make it executable with the following command:
chmod +x MikuMikuDance

Step 7 Launching MMD and doing final fixes

Now that everything is set up to go, get ready to run it for the first time!

If you got the script from the last step you can run it from the terminal.

Go to your MMD folder in a terminal window and run:

bash MikuMikuDance

Alternatively you can start MMD with:

LANG=ja_JP.UTF-8 WINEPREFIX=~/.WineMMD64 wine MikuMikuDance.exe

Once you are in MMD you will see a garbled mess. This is an issue that is not on MMD’s end, it has to do with how Wine renders the window (I think)

MMD is a garbled mess when running in wine by default

If you get the following message:

This means MME could not start due to an error. Now this can mean many things.

When this happens MMD will crash afterwards.

I experienced this error for a while, these are some things to look for to fix this:

  • Check if you got the proper GPU drivers installed.
  • Check if your GPU Supports Vulkan/DXVK
  • Delete the folder: ~/.WineMMD64 and the contents of the folder ~/.cache/winetricks/ Then run the script again.
  • Try to install without DXVK, to do that hit CRTL-C when the script asks to press enter to install DXVK. Then delete the folder ~/mmdtemp.
  • This can also be a problem on Wine’s end. To fix try the above to install without DXVK. This usually happens after Wine updates. Please let me know in the comments if this happens!

Fixing MMD

Now here is where the multi monitor setup I mentioned at the start comes in handy.

To fix the issues we have do the following:

  • Go to the VIEW dropdown menu, select SEPARATE WINDOW. This will put your render window and controls on different windows. If you’ve got 2 monitors you can split them over 2 like I do.
  • Open up the MME Effect mapping window, select the tool dropdown and click “Skip Device Validation” this is for compatibility issues with some effects. (Credit to petite philosophie)
  • When it says MikuMikuDance.exe is not responding when loading files. Just let it wait, this may take a bit depending on what you are loading.

Here are some images: (Click on the images for the full size)

When MMD shows this, just let it wait. It is loading.

Here is how it looks on my system:

(Click image for full-size)

Summary

SO! here you go! Now you can run MikuMikuDance on Linux! Using Wine and DXVK we were able to set everything up.
My scripts will set up a special Wineprefix with all the required libraries installed. Have fun with MMD!

Known issues and notes

Nothing is perfect. What we are doing here is using a workaround, with several compatibility layers to run a Windows program on Linux. Like you have already seen, the render window of MMD is broken. You have to use separate screen to make it work. It is purely visual.

Some MME effects don’t like DXVK either. Although using DXVK has been able to make many effects like Raycast run much smoother. Yes Ray-MMD does run using this method. I haven’t tested many effects but most should run.

If you run into issues and you want to reinstall, Rename .WineMMD64 in your home directory to something else and re-run the script.

This guide does not work for PMXe! it required different libries setup

I want to know what does and doesn’t run, when it comes to models and effects. Put your experiences in the comments.


– SEE BELOW for MORE MMD TUTORIALS…


— — —


– _ — –


Visit the LearnMMD.com Homepage! Plenty of Mikumikudance instruction and info!

More MMD Tutorials...

Add MME Lighting Effect illuminates model against dark stages

How can I add an MME lighting effect to my MMD animation? How can I ...read more

Create 450-Frame MMD animation from scratch!

How do I create a 450-Frame MMD animation from scratch? How do I start making ...read more

No more boring MMD Camerawork - Keep it moving!

MMD Camerawork can be so boring. How can I add life to my MMD animations? ...read more

Rio Carnival Miku is my latest MMD Model Adoration Slideshow video

Where can I download the Rio Carnival Miku MMD model? How can I make an ...read more

Solved? White screen covers MMD stage Intel Gen 12 Processor blocks MMD stage

I just got a new computer with an Intel Gen 12 Processor and it will ...read more

Make MMD Background AVI Using AviUtl WMV Files

How do I make a background video for MikuMikuDance? MMD does not see my background ...read more

Linux running MMD, MMD Tutorials, Parkeerwacht Tags:DXVK, Linux, mikumikudance, MMD, MME, Wine

Post navigation

Previous Post: Making more complicated MMD dance motions – Some new notes…
Next Post: Loading Background AVI Files into MMD (2021 Edition)

Related Posts

  • Using Raycast MMD like a pro! "the making of" my video
  • MME FunyaFunya Effect adds wavy psychedelia to your MMD scene! FunyaFunya Effect
  • When you add background AVI files, you can motion trace!
    Loading Background AVI Files into MMD (2021 Edition) Add Background Pictures and AVI
  • Free Download MikuMikuDance MMD
    Download MikuMikuDance Easily make YouTube MMD Music Videos MMD Basics
  • Adjust the Shadows in MikuMikuDance KillerBeer
  • The Making of: Sleepover Gone Wrong (REMAKE) "the making of" my video

More Related Articles

Anticipation is the Second Principle of Animation. Anticipation
Ghost Effect for MME How to Use the Ghost Effect for MME! ARIZONA
MMD Cell Phone Screen Video MMD Cell Phone Screen Video Creation… just for that vertical screen! Cell-Phone Video
Motion Reference Videos Available FREE Online Animation Resource
How to Use the Squash and Stretch Effect for MMD. ARIZONA
A better MMD followcam in PMXE with physics and IK bones Animation Shortcuts

Comments (22) on “Running MikuMikuDance in Linux using Wine and DXVK”

  1. ZenMiX says:
    August 11, 2021 at 9:22 am

    Thank you for this tutorial! MMD and effects works fine for me (Arch Linux). I have one problem: I can’t render videos at all. Saving pictures is working but when i try to render video it gives me error about file writer. I don’t know what I’m missing

    Reply
    1. ZenMiX says:
      August 12, 2021 at 3:59 pm

      I solved it! So, i manually installed vcredist and found out that i was stuck at installing “quartz” (command wine64 regsvr32 /S quartz.dll gave status 5). Through some digging on Internet i find that devenum.dll caused it. Quartz needs 32 AND 64bit devenum, but devenum is installing only 32 bit version (there’s solution: https://github.com/Winetricks/winetricks/issues/1263#issuecomment-587971449 ). I got file, replaced it in “system32” folder, and command works fine. Also I changed “./winetricks” to “winetricks” because first one doesn’t work for me. Last thing, I deleted MMPlus, it also caused my problem. 32bit MMD immidiately crashes, maybe i just need to change WINEPREFIX to 32 bit, but 64 bit version works fine, effects too (tested Ray-MMD and some simple effects). System Info if need: Linux 5.13.4-arch1-1 x86_64 | Wine 6.13. Maybe this will be useful for someone. Again thank you for this tutorial and sorry for disturbing.

      Reply
      1. Reggie_Dentmore says:
        August 12, 2021 at 9:14 pm

        Hey… that’s great! … Thank you for all of that good info… like you said: I hope other users find it helpful.

        — Reggie

        Reply
      2. parkeerwacht says:
        August 24, 2021 at 11:00 am

        I am going to test out if everything is still ok. Wine update tend to break things. I will update the post if needed.

        Reply
      3. parkeerwacht says:
        August 25, 2021 at 9:27 am

        ok so after testing MMD is artifacting all over the place when I try to render to AVI. and I edited my script so it pauses each step to kinda debug things. Seems like this could be related. Thank you for posting it. I might have to find a way to implement it before it sets it up. Winetricks puts out an error with missing DLL devenum.dll. I have an install CD of Windows XP X64 which I can use to extract the DLL from. but I am ofc not allowed to redistribute it I believe. Hence why I use an install script. so I do not have to redistribute any microsoft DLL’s etc.

        Reply
        1. parkeerwacht says:
          April 23, 2022 at 5:53 am

          I have updated the script and such so quartz will install. the script will always use latest winetricks.

          Reply
    2. parkeerwacht says:
      April 23, 2022 at 6:17 am

      Not sure about the error since I do not have a system with arch. However I ran into similar issues as well. I have now updated the install script that it should install the required DLL correctly.

      Reply
  2. Infinity says:
    July 13, 2021 at 10:46 am

    So mmd works! It is just missing the Latin font (not the Japanese)
    Any clues?

    I use Ubuntu 21.04 and have also tried 20.04

    Reply
    1. Infinity says:
      July 13, 2021 at 11:20 am

      so instead of using the script i used winetricks with winehq 6.12 devel and just installed all the fonts with ms in front. This guide should be updated to use a wine preset instead of a script.

      Reply
    2. Infinity says:
      July 13, 2021 at 11:21 am

      so instead of using the script i used winetricks with winehq 6.12 devel and just installed all the “MS” fonts. This guide should be updated to use a wine preset instead of a script.

      Reply
      1. Reggie_Dentmore says:
        July 13, 2021 at 1:10 pm

        Thnak you for your input! … much appreciated! … I am adding your note into the text of the article so as to help future readers… Thanks!
        — Reggie

        Reply
      2. Reggie_Dentmore says:
        July 13, 2021 at 1:39 pm

        I added your note to the article… Please take a look and let me know if I have put it in the right place… or if there is a better location for that note… Thank you!

        Reply
        1. parkeerwacht says:
          July 13, 2021 at 1:51 pm

          Thank you for the notice, I will test this myself and I will update accordingly. Give me a couple of days to do so.

          Reply
      3. parkeerwacht says:
        July 13, 2021 at 1:53 pm

        Thanks I will update everything accordingly. I will do some testing of my own and I will update the post in due time.

        Reply
      4. parkeerwacht says:
        August 24, 2021 at 11:03 am

        I tried this with a wineprefix, however using a pre-set up prefix broke after an update of wine. this was fixed by deleting it and setting it up again. Thank you for your comment regarding the fonts btw. I will add it to the script and test it. I still run MMD in japanese to fix broken filenames. but I will tinker around thank you!

        Reply
  3. giuls says:
    June 19, 2021 at 1:45 pm

    It’s possible to have this working for get PMXE on Linux. Tried to set up that, but it keeps saying me that Direct3D can’t be loaded.

    Reply
    1. Reggie_Dentmore says:
      June 19, 2021 at 3:48 pm

      I have forwarded all of your comments about Linux / PMXe to Parkeerwacht (the author)… I hope he is able to get back to you with some answers.

      Reply
    2. parkeerwacht says:
      August 24, 2021 at 11:11 am

      it can, the original script had support for it. however I never could get that part to work. I will look around, maybe I can figure it out. I might make a seperate post for it. for now PMXe is not supported sadly. but once I get the chance I will work on it.

      Reply
  4. giuls says:
    June 19, 2021 at 1:36 pm

    It’s possible to get PMXE working on Linux like this? I’m trying to make it work, but it doesn’t load the plugins + the 3D view.

    Reply
  5. giuls says:
    June 19, 2021 at 9:36 am

    Now, I wonder if it’s possible to run PMXE in Linux via WINE. I can open it, but the 3D window doesn’t open.

    Reply
  6. Rogue Ren says:
    March 26, 2021 at 9:47 pm

    What are the 3 dll files you need to put in the same folder as the .exe??? The linked page it just to the download of MMD

    Reply
    1. Reggie_Dentmore says:
      March 27, 2021 at 7:02 am

      The link is there… Here it is, again… when you “arrive”, scroll down just a couple of inches and see the links to download MME and MMEx64.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Download the latest version of MMD MikuMikuDance!Step-by-step instructions to help you make an MMD Music Video! bo-beep-bo-beep! LearnMMD's Step-by-Step MMD instructions for MikuMikuDance! Learn to make your own motions in MMD!
  • A better MMD followcam in PMXE with physics and IK bones Animation Shortcuts
  • Use the Silhouette Effect to create White Silhouettes!
    Creating White Silhouette Models in MikuMikuEffects ARIZONA
  • Download Reggie's pose collection ... includes his and pose collection!
    .vpd Pose Files help you demo new MMD Models VPD Files
  • LearnMMD's Video Dojo Expo Competition
    LearnMMD’s Video Dojo Expo 4: The Voting is Done!! Video Dojo Competition
  • RAY-MMD: Haku’s crazy light show [PART 1] MME Effects Tutorials
  • Video Dojo Expo 2 CHAMPIONS are chosen! CONTESTS
  • My Top 6 Favorite Miku Models! GloriaTheAnimator
  • Miku Miku Dance: Life Changing! Random Thoughts & Visions
See LearnMMD's write-up on how to be a GOOD MMDer... Keep the Faith-MMD!!
Keep the Faith-MMD... Learn how to be a GOOD MMDer!

Find out about writing for LearnMMD!

Copyright © 2022 Learn MikuMikuDance – MMD Tutorials – Free 3D Animation Software and Instructions..

Powered by PressBook Premium theme

Go to mobile version