
I and some family members own a small mining farm out in Montana. We have over 50 of these Jasminer X4 miners. Jasminer burst onto the mining scene last year with highly efficient ETC/ETH miners. The X4 we purchased comes in a 1u form factor and barely draws 300 watts from the wall. With the current crypto winter ongoing, I decided to see if hacking the Jasminer X4 is possible and will it go faster?
The Jasminer X4-1u

Jasminer is a subsidiary of a company in China called Sunlune. Sunlune’s first chip, the X4, is an FPGA with 5Gb of built-in memory, 1Tb Memory transfer speed, consumes 23 watts, and is designed to generate 65Mh/s per chip. The Jasminer x4 has 8 of these chips in a 1u form factor and can produce 520 Mh/s a second. It has a Zynq-7000 Programmable Soc daughter board to drive these eight chips. Lastly, to power all this, it has a 300-watt 1u power supply from Wingot. It’s a solid product, but it does have some shortcomings.
Power


The power supply in the X4 is a very cheap 300-watt unit from Wingot. Searching online doesn’t reveal much about the product, but the company does exist. The problem with this power supply is it barely supplies enough wattage to run the Jasminer. As seen in the photo above, when under full mining load, this power supply is on the razor’s edge of being at capacity. We’ve already had two power supplies fail, and I know we can do better at $100 a pop per replacement power supply. So let’s open her up and see what’s inside.
Internals and Swap out
Inside everything is pretty bog standard except for the power supply. The plug for the X4 is just another computer power cable that has been split and runs back into the actual power supply. Not sure why they didn’t flip the internals around 180 degree’s so that you plug directly into the unit. Also, every unit we have received is usually missing one fan. Why I have no idea, but maybe to cut some costs. The good news is that the power supply can be removed and needs to be replaced with a unit with three 6-pin power connectors. It just so happens I have a cheap RAIDMAX Vortex 600-watt power supply lying around. I swapped out the old one with the new power supply, but it did not automatically power on when I plugged it into the wall. I could jump the power supply and get the X4 up and running using a paperclip. So yes, you can swap the cheap Wingot power supply with a slightly cheaper 400-watt unit. With a 600-watt power supply inside, can it go faster?


Overclocking and Hacking
Just a quick note before I did any more testing, I moved the unit outside. It’s safer if anything blows up, and it’s also colder, sitting at 16 degrees Fahrenheit. Right off the bat, we will run into some limitations in how far we can push this unit. The two 6-pin PCIe connections can deliver 75 watts each, which means both combined can deliver 150 total watts. However, that 75-watts is with a very healthy safety margin. Without going too crazy, we should be able to supply a little more juice to the eight chips. First off, we need to get into the machine. Most ASIC manufacturers have disabled SSH via password and enabled public key only. From a security point of view, this is great, and I greatly approve; however, I would like to overclock when I want. Luckily for us, Jasminer enabled SSH via password and used the same username and password as the web interface!



Now that I am in, I need to figure out how it all works. I know the Jasminer runs a web interface, and I can set the frequency of the chips to either 200 or 225. However, looking in the usual places for a web server has come up empty. Instead of blindly looking around for files, why don’t I run top and see what is running? Running the Top command bore a lot of fruit. I know the primary x4 process is called jasminer, where the configs are located (/media/configs), and that it runs lighthttpd for a web server—looking at the lighthttpd config I have found that the webserver files are located in the /www/pages directory. Here is where things get interesting. When opening the pools.html file in VI, it looks like Sunlune initially allowed a frequency of up to 250 but commented the code out in production. It seemed like a simple test, so I removed the commented-out line and opened up the pool page to find that 250 was now an option.


Unfortunately, setting the frequency to 250 and applying was not to be. Once you click apply, it reverts to 200. Nothing is reported in the logs, so now to figure out where that 250 value is posted too. At the top of the pools, the file is a CGI call or common gateway interface. A CGI call allows a website to interact with an application. This call makes a post to an executable shell file called set_pools.sh. Opening that file, I find the problem immediately. The bottom of this file has an if statement that says if the value does not equal 200 or 225 set the value to 200. A quick edit removing this code should allow my 250 value to pass through. As you can see in the images below, with those two changes, I was able to overclock the unit an additional 25 to 250.


Results and Conclusion
When I made the changes above, the unit was already mining. The power usage jumped to 350 watts, and the miner crashed. I see why Sunlune disabled that setting with only a 300-watt power supply. I restarted the process and attempted to see the average hash rate. The results are below:
Stock | overclock | |
Freq | 225 | 250 |
Watts | 270-300 | 340-370 |
Mh/s | 450-500 | 500-560 |
Temp (c) | 37-45 | 40-50 |
While there is an improvement, it’s not great. Jasminer’s web interface does not show rejections, but in the miner logs, rejections did increase. Hashrate also fluctuated wildly. Another downside is that the edits to the HTML/CGI files get reverted to their original state after every reboot. However, the overclock stays in place, and this is because all that is being changed is the frequency value in the jasminer.conf file. Putting in higher or lower values will throw an error and default to 200. There is quite a lot of unused code lying about the system. In the future, I may release custom firmware for those who want to have a bit more control over their systems. Despite the poor overclock performance it’s good to see that the power supply can be swapped out for something a little more rugged. Until next time!