Go to the System Preferences option. 2. Enter into the Battery app. 3. Access the Power Adaptor. 4. Move the Slider to Never. 5. Disable the Automatic sleep option.