Uploading sketches sometimes works, sometimes doesn't

Thanks for the suggestion. I did think of it, of course, but when I reboot the PC, not only my Arduino editor, but all other activities are reset. It also takes some 10 minutes or more. Rebooting the PC every time it can't communicate over USB is not a satisfactory solution.