A bounce in mining and energy shares has offset weakness in other parts of the ASX, after Wall Street drifted lower overnight.