Improved Hardware detection with mdetect 2. #722