Improved Hardware detection with mdetect. Ticket #722