There is not a lot to do since the software we used to use for this (laptop mode, tlp) all got incorporated into the kernel.
Ubuntu comes with software and drivers for nVidia and that is installed by default. At the top panel it will have the nVidia software where you can switch between Intel for power saving and nVidia for performance. Example where you can pick from the panel:
(from the OMG Ubuntu article on this)
And from within "NVIDIA settings" you also have the "on demand" option:
(from a Forbes article on this).
Personal experience: my HP Omen on nVidia with a Geforce GTX 1050 I can watch video using performance mode for about 4 hours so a couple of releases ago I stopped bothering using power save mode :) If I really need more than 4 hours of travelling (I commute a lot) I will pick power saving but will also bring my charger along.
1 downside: you need to log back it for the change to take effect.
Mind though that there is more to it.
- turning off bluetooth
- turning off WIFI. That is if you do not use it on the road
- dismount (/eject) external media: usb, sd, connections to phones.
will help a lot too.
One thing I used to do when the power saving option where even more bad was to install more than 1 desktop where I picked one that has a very low foot print by itself and use that for on the road. But nowadays that is not needed either anymore for me personally.
Had to wait for Ubuntu to refresh the battery calculation: 5h30 on Ubuntu 20.04 at 99% battery life with power performance, browsing the web so but not watching video.