We present a novel approach to maximizing the transmission rate in a MIMO relay system, where all nodes are equipped with multiple antennas and the relay is self-sustained by harvesting energy. We formulate an optimization problem and use dual-characterization to derive a closed-form solution for the optimal power splitting ratio and precoding design. We propose an efficient primal-dual algorithm to jointly optimize the power allocation at source and relay for transmission and the power splitting at relay for energy harvesting, and show that using non-uniform power splitting is optimal. Numerical results demonstrate the significant rate gain of non-uniform power splitting over traditional uniform splitting especially at low source transmit power. We also analyze our algorithm numerically and demonstrate its efficiency at reducing the run-time by several orders of magnitudes compared to a standard solver, \textcolor{blue}{and existing algorithms in literature