Whenever I open Krita my pen suddenly stops functioning properly. It moves to the right side of the screen and will only move up and down. Even after closing Krita then pen will still be stuck in that position. I thought it was my tablet and pen, so I uninstalled and re-installed the driver and it worked again with other programs, but then when I opened Krita, the pen started malfunctioning again. I uninstalled Krita and re-installed and the same issue occurred. I use an Ugee tablet monitor on Windows10.
I'm sorry, but Ugee tablets are about the most problematic out there (after Trust and Genius). We don't have the actual hardware to test with, but their drivers are horrifically buggy, and we just cannot work around the bugs. Please report a bug to Ugee... It's their stuff that's broken. Note: uninstalling and reinstalling Krita will never, ever make any difference, unless the problem is that an antivirus application has damaged some of the installed binaries.
Please try to reset the Ugee configuration or reinstall the Ugee drivers. We cannot do anything about this since we do not have access to the hardware. https://docs.krita.org/List_of_Tablets_Supported shows that nobody has reported a working setup with Ugee, though.