Is it the jack, the charger, or the battery?
First test with a known-good charger of the correct rating. If charging is still loose or intermittent and the port physically wobbles, the DC jack is the likely fault. A laptop that runs only on AC points to the battery instead, and no lights at all can be the charger.
- Charges only at an angle → DC jack
- Wobbly / hot / sparking port → DC jack
- Runs only on AC → battery
- No lights with known-good charger → charger/jack