Display keeps turning on and off while using M1 MacBook Air in clamshell mode
I am using my m1 macbook air in clamshell mode and the display turns on and off every couple of minutes. I use a usb c dongle and connect my mouse and keyboard, ethernet cable, hdmi cable, speakers, and charging cable to it. Until recently it worked fine, but I got a usb c extension cable (one end is male and other is female) in order to hide the mess of cables under my desk but since then, the display has been having problems. It is not a consistent problem, sometimes it will be fine for an hour or two. Other times it turns on and off every other minute. Not sure if it is the cable or maybe because I have so many things connected to the usb c dongle, but would really appreciate any help. Thanks!
MacBook Air 13″, macOS 11.4