This is usually caused by nvidia driver bug, try using low intensity dag loading or reduce your memclk( usually the pill crashes it, not the miner ).
Switching briefly from P2 to P0 is not a driver bug, that's how the P-states work on nvidia. There's a workaround on Windows, but Linux has no such settings. I'll try to check the GPU clocks when a dag is being switched to see whether my suspicions are correct.
All ethash miners experience the same issue, except Claymore.
Edit - looks like my suspicions are correct:
#Date Time gpu pwr temp sm mem enc dec mclk pclk
#YYYYMMDD HH:MM:SS Idx W C % % % % MHz MHz
20190519 14:27:01 0 159 67 100 100 0 0 5613 1531
20190519 14:27:02 0 159 67 100 100 0 0 5613 1531
20190519 14:27:03 0 159 67 100 100 0 0 5613 1531
20190519 14:27:04 0 159 67 100 100 0 0 5613 1531
20190519 14:27:05 0 159 67 100 100 0 0 5613 1531
20190519 14:27:06 0 159 67 100 100 0 0 5613 1531
20190519 14:27:07 0 160 67 100 100 0 0 5613 1531
20190519 14:27:08 0 63 66 0 0 0 0 5613 1544
20190519 14:27:09 0 69 65 3 0 0 0 6106 1556
20190519 14:27:10 0 < this is where it crashed
This is while the DAG switches to another one. Note the mclk column.
Yes there are settings to bypass that issue from P0 to P2 in linux while compute is idling. Not going to further discuss this because its not related to miner at all.