Some ubuntu apps don't work when plugging gpu

I have freshly installed ubuntu 23 using a 4090. This is what is looks like when I try to open Firefox. I can move the window, resize, close it, even click links in the browser, it just looks terrible. However, If I reboot and unplug my 4090, it works well. Maybe I would like all linux’s graphics to work with the integrated graphics from my CPU (AMD 7950X) and just leave the GPU for machine learning which is what I want it for. Any idea how to solve? Any help is appreciated. I attach the output for
Note: apps like terminal, file explorer, settings, LibreOffice work, but others like firefox or app store don’t.


nvidia-bug-report.log.gz (422.8 KB)