PC locks after 2 minutes of not touching input devices
IIf a PC is locking or going to sleep, the first place to check is the Power and Battery Settings. Click the Windows button, and search for Settings, then choose Power & Battery. In the Screen and Sleep section, there are settings to adjust the timeouts.

If the computer is still locking, see if there is an application installed called Dell Optimizer. Open it and disable it. It contains a proximity sensor which locks your screen if it senses no one is close to the laptop.