First round of backports

Can you test this on NVidia?