Screen flicker while using MUX laptop in dgpu mode (NVIDIA hybrid)

Could you show the output of some commands:

lsmod | grep -iP 'nouveau|i915|nvidia'
pacman -Qs xf86-video
pacman -Qs nvidia

And those Arch wiki articles might provide some more insight.

Edit: have you tried using another kernel?

One thing to try: use kernel parameter module_blacklist=nouveau

  1. lsmod | grep -iP ā€˜nouveau|i915|nvidiaā€™:
    https://pastebin.com/cPnzhgph

  2. pacman -Qs xf86-video:
    https://pastebin.com/xyTpjnLZ

  3. pacman -Qs nvidia:
    https://pastebin.com/nfWxtMnh

I donā€™t use any older kernels because on all of them before 5.12 i couldnā€™t control my brightness on igpu mode and the flicker was still there.

Issue still persists after blacklistng nouveau drivers.

You have both nvidia and nvidia-dkms installed.
Only one of them is needed, and Iā€™d recommend keeping nvidia-dkms.

It is interesting to see if that helps anything, but worth doing anyway.

Oh, haha I thought the opposite while installing nvidia actually. The flickering wasnt going away so I thought Iā€™d try installing nvidia alongside dkms (i know sounds silly but I was grasping at straws here) and seeing if it did anything. But again, nothing changed so I uninstalled it.
Is there anything else that I could possibly try?
I also found this but couldnt make complete sense of it, maybe you could take a look?
https://01.org/linuxgraphics/gfx-docs/drm/gpu/vga-switcheroo.html

Some things come to mind, although you may have already tried them.

  • blacklist all unneeded graphics drivers (I assume you use only nvidia driver?)
  • check Arch wiki about your hardware and any related guides, there are lots of various tips

Yes, I blacklisted nouveau drivers + uninstalled nvidia drivers it did nothing.
I have also scoured the arch wiki many times over, its got loads and loads and loads of stuff on how to manage nvidia if you have a muxless machine, but has essentially nothing on muxed laptops and ways to troubleshoot the flickering.
Anyways, Iā€™ll have a thorough look at it again. Thanks for the help!