On laptops with hybrid cards the outputs are mostly hard wired to the dGPU and have no connection to the iGPU. Therefore (roughly saying) it is needed to create a sink which will passthrough the screen over the CPU, what does not seem to be implemented in xwayland for now.
At the stage of my knowledge, xwayland does not support having 2 GPUs for displaying. So you have to use the iGPU or dGPU, while offloading should work.
So to be clear: If you need the HDMI output, then you have to use the Nvidia card alone and disable the Intel one. Also you need to be sure, that nvidia is set to modesetting.
However, could you shine some lights for me how I can disable the intel one? My laptop does not have a MUX switch and if the internal screen is connected to intel GPU, it seems there’s no way to do this?
I tried your method and the “install” command in the link. Your method doesn’t seem to have an effect as the module is still loaded. I think this may due to the intel driver is required for the hybrid graphics to work. the install function will simply fail to boot to login screen.
Another way I thought maybe I can workaround is to login to a Xorg session. However, when I un-comment /etc/gdm/custom.conf
my gdm will not load properly. There will be only a flashing underscore on the top left of the screen. Would you have any idea why this took place?