Unable to disable laptop screen when using KODI with HDMI, and some display bug

I am using an old laptop as my KODI machine, and it is put behind my TV and connected with HDMI.
I set up kodi according to Kodi - NixOS Wiki, with xserver.
In system display settings, I set it to display with HDMI. Everything works fine.

However, I noticed that whether the lid of the laptop is closed or not, the laptop screen is always on, displaying a little NixOS flake icon with grey background.
I notice that there is a “Blank other displays” option in the display settings. When I use the setting, the laptop screen turn off, which is exactly what I want.

However, at this point, when I reboot the system and go back to the KODI interface, it is trying to display BOTH the NixOS flake grey background screen and also the KODI interface ONLY on my HDMI screen, which makes the KODI interface waaaaay off the monitor which is unusable. At this point, the only way for me to unset the screen is remove the /home/kodi/.kodi/userdata/guisettings.xml file and reboot to make it generate a new one.

I was using kodi-standalone before in arch linux with X11, without any display manager, which can use the “Blank other displays” option just fine. However I cannot find a way to use the standalone version of kodi in NixOS.
I tested wayland but the screen problem is waay worse than x11.

I didn’t install the driver correctly, that’s the cause of the problem: