Yes, this can fix the issue. Is it a permanent fix, probably not. I don't know what HP laptop you have, but I never recommend their 'consumer' level laptops. They are built as cheaply as possible, without some of the better frames, and components. Also, modern laptop manufacturing frequently does not put any chips in sockets, to make some of these issues easier, as that requires more height, and you as a consumer always want 'lighter, thinner', not 'easy to repair', or 'cheap to repair'.
The HP 'business calls' laptops however, are solid well built and frequently 'tanks' as far as laptops go. you just don't get as much for the money as you do with a consumer grade machine, but you do get a higher quality, better designed,longer lasting, laptop.
Personally, I'd have them replace the motherboard, but this can be almost the price of a new machine, so, it's personal choice.