Mining ZCash on Ubuntu Linux

I didn’t quite believe that mining crypto currencies is viable as an individual, until I saw the news that AMD graphics cards were sold out because they’re good at mining Ethereum. To be convinced I tried to order AMD RX 570 from some online vendors, and they all cancelled my orders and refunded me shortly.

So even if I wanted to mine Ethereum I will have to wait indefinitely for the AMD cards to be re-stocked. At least I can buy some NVidia GTX 1070 cards and mine ZCash instead, before NVidia cards are sold out.

Here’s how to mine ZCash with NVidia cards on Ubuntu.

First, you need a wallet so I can receive payments, if there will be any.  It’s quite easy to install zcash on Arch Linux(because I run Arch on my laptop):

sudo pacman -S zcash
mkdir .zcash
echo "addnode=mainnet.z.cash" >~/.zcash/zcash.conf
echo "rpcuser=<your user>" >>~/.zcash/zcash.conf
echo "rpcpassword=`head -c 32 /dev/urandom | base64`" >>~/.zcash/zcash.conf

For other operating systems, see https://z.cash/download.html

Then you can download the bootstrap data with

zcash-fetch-params

It will download about 800MB, after finished, you can start your wallet with

zcashd

When it’s running, you can use zcash-cli command to create your wallet:

zcash-cli getnewaddress

There will be a long hash started with ‘t’, which is a transparent address, with which you can send and receive zcash. You don’t have to run your wallet and your miner on the same machine, but your miner will use the t address(you will get paid to your wallet).

Now onto your miner machine. You will need to install some dependencies for the miner:

sudo apt-get install nvidia-opencl-dev nvidia-375

System needs to be restarted to load the driver. You can load the driver without restarting too, eg. sudo modprobe nvidia-375. Then you can follow the post below to use the miner:

https://bitcointalk.org/index.php?topic=1707546.0

🙂

Install OS X Sierra on VirtualBox on Ubuntu

Following the guide below I installed Sierra in a VirutalBox VM running on Ubuntu quite easily.

How to Install macOS Sierra Final on VirtualBox on Windows

Update: sample vboxmanage commands.

 vboxmanage modifyvm Sierra --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
 vboxmanage setextradata Sierra "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
 vboxmanage setextradata Sierra "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
 vboxmanage setextradata Sierra "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
 vboxmanage setextradata Sierra "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
 vboxmanage setextradata Sierra "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1

 

在 Ubuntu 上搞定了 LOL(英雄联盟)

Workspace 1_061 Workspace 1_060

League of Legends(LOL/英雄联盟) 是个不错的小队竞技游戏, 玩的好了竟然还能拿到美国工作签证. 只是代码写的可能比较”另类”, 在 Wine 环境里跑的很是吃力. 我把图像质量调到中等, 依旧只能达到约 20FPS. 对比图像质量开到高等依旧流畅的 Elder Scroll: Skyrim, 代码质量的差异就可以想像了.

Screenshot from 2013-12-28 20:50:06 Screenshot from 2013-12-24 22:00:33

如果是初次安装 Wine, 需要如下 Windows DLLs:

winetricks winxp d3dx9 vcrun2005 vcrun2008 wininet corefonts

不习惯 CLI 的朋友也可以运行 winetricks 然后在对话框里勾选以上组件. 详情请参考 WineHQ.

另外 LOL 还用了一些独特的贴图类型, 以至于 Wine 还不会处理, 导致游戏中在商店买装备就会崩溃! 🙁 下面是解决方法之一:

https://bitbucket.org/Xargoth/tuxlol/wiki/Home 下载 tuxlol 补丁, 然后运行以下命令:

sudo apt-get install mono-runtime libmono-system-core4.0-cil
mono tuxlol.exe patch –dir “/home/[USERNAME]/.wine/drive_c/Riot Games/League of Legends”

顺便提及, 微软的 .NET 框架也有了开源的实施方案: mono, 而且支持 Linux & Mac OSX. 补丁作者看来是横跨 Windows 和 Linux 的高手.

就可以了. 游戏开始加载时, 系统会提示无响应… 选择”等待”即可. 这个过程一贯很慢.  🙂

玩游戏曾经是 Linux 的软肋

Workspace 1_055

尽管圣诞节临近, 我工作却是忙的出奇. 感觉公司的产品前一阶段留了不少隐患, 现在轮到修理的时候了.

不过还好, 再怎么忙也没人加班, 下班偶尔耽搁一会儿, 我还有些时间鼓捣游戏和 Linux. 原来买的正版 StarCraft II 因为没了 Windows 就有一段时间没碰了, 上个周末我把 SC2 在 Ubuntu 下用 Wine 装了一下, 和我以前’动动就得死’的 Wine 游戏体验完全不同的是, SC2 跑的还挺欢的, 300多单位参与的群殴发生时, FPS 估计不到 10 了, 但大多数情况下相当流畅. 可以想象最近 Wine 团队相当的努力. 下面是我用到的一些链接:

  1. Wine 1.7 on Ubuntu 13.04 including wine tricks http://www.tecmint.com/install-wine-on-ubuntu-and-linux-mint/
  2. AMD Catalyst Driver for Linux x64 http://support.amd.com/en-us/download/desktop?os=Linux%20x86_64

我的参考配置:

  1. Ubuntu 13.04 x64
  2. AMD HD7770 + Catalyst 13.11 beta6
  3. Wine 1.7.6
  4. StarCraft II HotS
  5. 1920 x 1200 @60Hz, medium (这个还不理想, Windows 下图像质量可以开高2档, 不过真打起来了, 也就没空看细节了)

对 Wine 我已刮目相看了.  🙂