How to get Windows-only Primecoin (XPM) CPU miner jhPrimeminer.exe working in Linux

Note, these quick n’ dirty instructions are adapted from my first experience CPU mining Primecoin (XPM) on Linux Mint 15 (Olivia). They will almost certainly work for Ubuntu – you may need to do more work for Debian and other flavors of Linux.

  1. Download the appropriate version of the miner recommended by, currently  jhPrimeminer v3.3 (?) by rdebourbon as mentioned on – I presume that they really mean “3.3 or higher” since we’re up to 4.x now and all of this is very bleeding-edge.
    • The “appropriate version” is usually the latest one, with AVX if your processor supports it, or without if it doesn’t. The fastest way I found to determine CPU AVX support on Linux is less /proc/cpuinfo and see if ‘avx’ is in there.
  2. Install Wine 1.6. Wine 1.4, which comes with Linux Mint 15 and Ubuntu 13.04 Raring, won’t work; it’s missing dependencies in MSVCR110.DLL.
    1. Visit and follow the instructions for adding a PPA software source for (or whatever kind of repo) for your flavor of Linux. This was thankfully very easy in Linux Mint and should be similarly a snap in Ubuntu. Note that a lot of the version numbers and screen shots are out of date here – whatever.
    2. Install wine-1.6 – there are a bunch of weird packages with weird versions starting with 1.7 too, and some of those seem to get installed along with wine-1.6. At this point I stopped asking too many questions.
  3. Unpack the downloaded miner ZIP file, and run wine jhPrimeminer.exe – you should see some complaints from Wine, and then the jhPrimeminer.exe help output.  If you see the help output, it ran.  If you didn’t, you have problems.
    • In my case, running the miner totally hosed my terminal after it exited.  So, if that happens to you, do the following to get a nice usable terminal back:
      1. stty sane
      2. reset
  4. Run the Primecoin miner as normal, but prefix it with ‘wine’ and (maybe? haven’t tried this) with ‘nice’ if you want it to yield CPU more readily if you’re doing this on a desktop system.  For example, my command line is:
        wine jhPrimeMiner.exe -t 4 -o -u REDACTED -p REDACTED
    I note this command is taking up about 264MB physical memory so far.

We’ll see if it runs stably… so far it’s been 15 minutes… ;) So far, shows my worker as active, but I don’t have any XPM yet.

UPDATE: jhPrimeMiner is not totally stable when mining Primecoins (XPM) under Wine – and, from what I’ve heard, not under Windows either yet! Like I said, bleeding edge. Donate to the author! :) Anyway, once I fired it up, it managed to run for almost 3 days before freezing up while still consuming max CPU.

UPDATE 2: So far, I have not noticed any problems using ‘nice’ to tell the XPM miner to run at lower priority – you might want to do this on a desktop system where you sometimes need the CPU for other stuff, otherwise it cranks along with almost no hit to your PPS rate.  My command line:

    nice -n 10 wine jhPrimeminer.exe -t 4 -o -u REDACTED -p REDACTED

UPDATE 3: I’m told by some folks in the ypool chatbox that there are specific versions of the miner which run best with Wine, and there is a Linux port. Stay tuned for another post about that, but this will get you mining for now! :)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: