Check to see if the camera appears in Device Manager; any unusual errors usually indicate a total module failure. That said, I encountered this issue on an 840 G3, where it showed up, but the actual CMOS sensor was faulty, and it never showed up as connected. If you see it, open the Camera app in Windows and see what you get -- if you get a black screen with it showing in device manager the sensor is bad but I have had it go bad where it shows, but Camera doesn't see it. If it doesn't show and you really want to be sure, try booting it into a Linux distro like Debian or Ubuntu. If it doesn't even work there the module is no good. If it's in Device Manager but not connecting in the camera app, the module itself has failed badly enough it will not show in Camera but the PC still sees it.
First thing I would check is the BIOS, then device manager:
If you see this the module is bad:
READ: My 640's camera is fine - I just flipped the shutter to hide my face.
I don't think it will be a thing on yours being a G2 as HP really added this with the G5 machines, but if your machine has a camera shutter it could be the issue -- make sure it isn't blocked off and if it isn't there that more or less confirms a bad sensor. Yours is too old for this, but the G11 does give alerts while old machines like the G9 did not - so you have to check; those machines just give a black image which looks like a bad sensor. See here for how it alerts you on the G11:
If you checked device manager and the camera is present and the issue is still present, you'll need a new camera module. Wether you think it is worth doing is up to you as these Win10 machines really only have 1 year left with ESUs (or 2 months without) it might be better to buy a external camera and save the money for a new computer.
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
0