Thank you for posting on the HP Support Community.
A relatively warm power adapter is normal, especially when the laptop is in use while the battery is charging. However, if the adapter is quite hot, enough that it could hurt your hand after touching it for a few seconds then you need to consider replacing the Ac adapter.
Run hardware diagnostics test on battery and Charger:
Use the following steps to open the Component Tests menu.
Hold the power button for at least five seconds to turn off the computer.
Turn on the computer and immediately press Esc repeatedly, about once every second. When the menu appears, press the F2 key.
On the main menu, click Component Tests.
The Component Tests menu displays. Your Component Tests menu might be different, depending on the components installed on your computer.
To run both tests simultaneously, in the Component Tests menu, click Power Source, and then click Run once. Each component can also be tested individually.orr
AC Adapter Test:
The AC Adapter test provides an interactive test to determine if the AC power adapter is functioning properly. A good battery is required for this test. Before running the AC Adapter Test, HP recommends verifying that your computer can receive power by connecting a known working AC adapter.
Follow these steps to perform the AC Adapter Test.
In the Component Tests menu, click Power, and then click an AC Adapter Test.
Click Run once.
The AC Adapter Test begins.
When the test is complete, the results are displayed on the screen.
Follow these steps to perform the Battery Test:
In the Component Tests menu, click Power, and then click Battery.
Click Run once. The Battery Test begins.
When the battery test is complete, the results are displayed on the screen. For additional battery information, click Battery Details.
Hope this helps! Keep me posted for further assistance.
Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.