Prime offloaded opengl programs break after sleep

old-ish laptop with 960M, prime offload works well, set up all according to wiki, (using kde(wayland) if that makes a difference)

However if there was an offloaded opengl program running when laptop goes to sleep - after sleep random textures (including fonts) turn into white squares

tried nvidia.powerManagement.enable = true; - this totally break laptop sleep for me

before nixos i used ubuntu+X11 on the same laptop, and there was no such problem (though overall nvidia on linux always has one problem or another)