For anyone who is looking for a solution to their problem with newer Nvidia cards and the regression that you need to reboot to switch graphics: https://github.com/matthieugras/Prime-Ubuntu-18.04
I solved the problem by using bbswitch instead of nouveau to switch off the graphics cards and communication to a socket of a simple Rust program which kills the Xserver, and unloads the nvidia kernel modules without having to reboot.
For anyone who is looking for a solution to their problem with newer Nvidia cards and the regression that you need to reboot to switch graphics: /github. com/matthieugra s/Prime- Ubuntu- 18.04
https:/
I solved the problem by using bbswitch instead of nouveau to switch off the graphics cards and communication to a socket of a simple Rust program which kills the Xserver, and unloads the nvidia kernel modules without having to reboot.