How to Disable and Enable the NVIDIA GPU from command line?

Asked by Umesh

I am using the OS Ubuntu "18.04.5 LTS (Bionic Beaver)" on an HP machine with NVIDIA graphics card. My applications can run both with and without GPU. I want to test and compare the results on the same box with and without GPU. So I want to run the test on the box once with GPU and once run the same test again by disabling the GPU and compare the results.

So, I want to understand how can I disable the GPU from command prompt and after the completion of the test again enable the GPU.

Please help me with the steps/commands.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

The recommended way of usage is having the NVidia GPU disabled and to enable it for a single command with https://wiki.ubuntu.com/Bumblebee#Usage

You might also need to do the steps in https://itectec.com/ubuntu/ubuntu-bumblebee-doesnt-work-on-ubuntu-18-04/

Revision history for this message
Umesh (umeshkalyani) said :
#2

If we can have command that can disable and enable the GPU, that would be great.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

You do. Read the link given....

Can you help with this problem?

Provide an answer of your own, or ask Umesh for more information if necessary.

To post a message you must log in.