Only load inputenc when tex is used. Lualatex and XeLaTeX don't need it. It conflicts with certain microtype configuration files.