All usb c ports are working flawlessly but charging keeps flickering on and off in irregular basis

This is a macbook pro 2018. All the usb ports are working with all other peripherals and the charger works also, but sometimes it keeps turning on and off (it keeps chiming to say it's charging, randomly, every minute or so) and sometimes it charges normally.

I tried to reset SCM and NVRAM. I'm thinking that this is a big sur thing and downgrade to catalina or the adapter is malfunctioning or maybe it is a logic board thing. What do you think?


Solution 1:

It turned out that the circuity of the power adaptor has some defects. Changed it and everything is working perfectly now.