How to solve the problem of detecting non-HP batteries?

Discharge reset and update BIOS settings.

1. discharge reset: disconnect the external power supply, restart the computer, and use the battery until it cannot be turned on.

2. Update the BIOS settings: restart the computer, and press the corresponding key (usually F 10) to enter the BIOS settings interface. Ensure that the latest version of BIOS firmware is installed, and find "Leave", "Load Default Settings" or similar options to restore the default configuration. Save the changes, exit the BIOS setup interface, and then restart the computer.