Backport #6290 to stable5

@karlitschek @schiesbn @PVince81 @DeepDiver1975 needed for a customer who focuses on mobile devices.