I've been having trouble with ubuntu and my gpu stopping working together periodically. I primarily use my gpu with darktable and it usually works perfectly but I periodically get notifications when launching darktable that a gpu isn't available. This at least usually happens after closing up my laptop but I'm not 100% sure it hasn't happened after just closing darktable but keeping the computer open. So far the only way I've found to get the gpu going again is to reboot the computer. I'm pretty certain this is a system rather than darktable issue as I also have davinci resolve installed which only will launch with a functional gpu and it won't launch when darktable isn't able to use the gpu(davinci resolve launches properly when darktable can use the gpu). The gpu I'm using is a geforce rtx 3050 mobile using nvidia driver metapackage from navidia-driver-510.

Any ideas on how to get my gpu working properly consistently? Thanks