How to dedicate the GPU to computing, and leave the graphics to Intel integrated device

Hello, I have have a working installation of TF2.1 under Ubuntu (details below)

$ nvidia-smi       # secondary monitor connected to my notebook
Mon Jan 20 15:40:48 2020  
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|   0  GeForce MX150       On   | 00000000:01:00.0 Off |                  N/A |
| N/A   63C    P0    N/A /  N/A |   1883MiB /  2002MiB |      8%      Default |
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|    0      1109      G   /usr/lib/xorg/Xorg                            28MiB |
|    0      1309      G   /usr/bin/gnome-shell                          46MiB |
|    0      1547      G   /usr/lib/xorg/Xorg                           196MiB |
|    0      1746      G   /usr/bin/gnome-shell                         193MiB |
|    0      4042      G   /usr/lib/firefox/firefox                       3MiB |
|    0      7253      G   ...uest-channel-token=10215247264308201648    21MiB |
|    0     29634      C   ...nv/versions/3.7.6/envs/dl/bin/python3.7  1381MiB |

(the last 2 lines refer to computing: jupyter and python, and take only 70% of the GPU)

[b]I would like to be able to reserve the nVIDIA GPU (GeForce 150 MX) to tensorflow, and leave graphics (xorg, gnome, etc.) to the Intel integrated device, and ideally to be able to switch the behaviour without rebooting or relogging.

I expect that I can create a suitable application profile in nvidia-settings, but I am afraid to mess things up. Is there a link to specific tutorial or doc with examples? I prefer to avoid gross mistakes that require reinstalling everything.[/b]

NB. Any other advice to solve the need, even not using nvidia-settings, is welcome

Update: I found but it seems to deal with desktop hw, rather than notebooks, and is now >2 years old

BTW, I might have already spoiled something, as I get the following error:

(nvidia-settings:30724): GLib-GObject-CRITICAL **: 15:46:46.524: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
GPU at BusId 0x1 doesn't have a supported video decoder

If it matters, some configuration details and comments:
Asus Vivobook S510UN (secureboot disabled in bios)
Ubuntu 18.04.3 (fresh install)
nvidia-driver-440 (from CUDA nvidia-repo)
CUDA10.1, CUDNN7.6.5, TENSORRT6.0.1.5 (from nvidia web)
python3.7.6 (with pyenv)
tensorflow2.1.0, etc… (with pip in dedicated virtualenv)

This looks like what you are looking for

I tried those instructions, and I am stuck with two issues:

$ software-properties-gtk 
ERROR:dbus.proxies:Introspect error on :1.163:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 100, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/", line 172, in __init__
  File "/usr/lib/python3/dist-packages/dbus/", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3/dist-packages/dbus/", line 145, in __call__
  File "/usr/lib/python3/dist-packages/dbus/", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.163 was not provided by any .service files

and (as already said above)

$ nvidia-settings 

(nvidia-settings:4133): GLib-GObject-CRITICAL **: 11:07:02.649: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
GPU at BusId 0x1 doesn't have a supported video decoder

In particular, although the GUI of nvidia-settings is shown, it lacks exactly the [PRIME Profiles] section highlighted in the liked linuxtable post, so I can’t proceed.

Any clue of what’s happening and where to start to fix it?