Displays Monitor, keyboard, mouse don't turn on

hi
when i start my pc , it turns on but sometimes my monitor, keyboard, and mouse don't turn on , and another thing i noticed is the CPU fan wouldn't spin as fast as it should. But if i restart the computer , then everything works just fine.