Chosen Solution
Every time i plug in my pc, the green light on the power brick turns off. but the light turns back on when its not plugged in to the pc, HP Pavilion 23-b034 All-in-One Desktop
Have you tried replacing the Bios Battery? It could be low battery.