Error creating a MFX session: -9

Hi, I have a PC of the following specifications:
i5-4670, with intel HD 4600 graphics
AMD HD 6950
I’ve recently added a dGPU and it seems that after that, the built in encoder doesn’t work with KDEN anymore. It gives me this error every time I try to render with QSV:
[h264_qsv @ 00000251e3e51340] Error creating a MFX session: -9.
I have tried but nothing seems to be able to fix it. Is there a way to specify what device I want to render with? qsv_device doesn’t do anything either.
I can confirm QSV and the GPU is working, 2 monitors are outputted via the iGPU and OBS and emulators can render on the iGPU without loading the dGPU.