I am having this weird issue after upgrading to 20.04.

Whenever I plug-in my earphones, my laptop starts to behave weirdly. The first problem is that whenever I pause youtube videos, after a few moments they resume automatically. I am not sure whether there is a hidden knob somewhere to control this but I failed to find one. This is bugging me a lot because the only way around this is for me to go to the home page, and then come back to watch a video. Has anyone else experienced this ?

The other issues are that my cursor stops moving after a while in my code editor. If I keep pressing the up arrow or the down arrow, the cursor will stop moving after a while. All of this happens only when the earphone is plugged in. When I remove it, everything comes back to normal.

Any help will be greatly appreciated. Thanks.