GPU not in use in Ubuntu 18.04.5 LTS


I am trying to install properly Ubuntu 18.04.5 LTS alongside Windows 10, and I am having a lot of issues to do that in my HP Omen 15-EN0002NS. To do so I have created the partitions and installed the drivers of nvidia following the steps in, however, I did not have any lightdm service running. This process was enough to make the latest Ubuntu 20.04 work, but I need Ubuntu 18.04 to run some particular things.

After trying for several days (looking at all the possible forums), I have almost given up, so I am asking for help through this post. The best installation I have achieved, executing nvidia-smi, returns de following:

deepak@omen:~$ nvidia-smi
Sat Jan 30 18:28:30 2021       
| NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     |
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|   0  GeForce GTX 165...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   40C    P0    16W /  N/A |      0MiB /  3911MiB |      0%      Default |
|                               |                      |                  N/A |
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|  No running processes found                                                 |

And in the settings window it tells me that I am using the graphic llvmpipe (LLVM 10.0.0, 128 bits), instead of the NVIDIA GPU. As I have seen in other posts that the bug report may be useful, I have already attached it nvidia-bug-report.log.gz (949.2 KB).

Moreover, I attach some outputs to some commands I have used when looking to other posts:

deepak@omen:~$ lspci | grep -i nvidia

01:00.0 VGA compatible controller: NVIDIA Corporation Device 1f95 (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 10fa (rev a1)

deepak@omen:~$ uname -m && cat /etc/*release
VERSION="18.04.5 LTS (Bionic Beaver)"
PRETTY_NAME="Ubuntu 18.04.5 LTS"

deepak@omen:~$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

deepak@omen:~$ uname -r

deepak@omen:~$ hashcat -I
hashcat (v4.0.1) starting...

OpenCL Info:

Platform ID #1
  Vendor  : NVIDIA Corporation
  Name    : NVIDIA CUDA
  Version : OpenCL 1.2 CUDA 11.2.109

  Device ID #1
    Type           : GPU
    Vendor ID      : 32
    Vendor         : NVIDIA Corporation
    Name           : GeForce GTX 1650 Ti
    Version        : OpenCL 1.2 CUDA
    Processor(s)   : 16
    Clock          : 1485
    Memory         : 977/3911 MB allocatable
    OpenCL Version : OpenCL C 1.2 
    Driver Version : 460.32.03

In addition, I have noticed that the amdgpu does not appear with the following command:

deepak@omen:~$ sudo lshw -c video | grep 'configuration'
       configuration: driver=nvidia latency=0
       configuration: latency=0

Finally, I wanted to point out that I have tried also with the 450 drivers and the same issue appears and installing with the .run file, when booting, a black screen apears.

Any help would be highly appreciated 😃. Currently, the gpu cannot be used and the resolution is 1024x768 (instead of 1920x1080) and cannot be changed.

The problem is not the nvidia gpu but the amd gpu. It’s fairly recent so it needs a recent kernel (>=5.6) and the matching firmware files. Please upgrade the HWE stack first to get the latest kernel available for 18.04.
Afterwards, please create a new nvidia-bug-report.log.

First of all many thanks for the fast reply.

After updating the kernel ubuntu is not able to boot properly. The new kernel version is 5.4.0-65.

Report: nvidia-bug-report.log.gz (98.6 KB)

That’s no bug-report.log but a html file of a github repo.

Sorry, as I could not boot Ubuntu I uploaded the file to github in the tty terminal and downloaded it incorrectly. Here you have the log file: nvidia-bug-report.log.gz (460.3 KB)

Currently, the nvidia driver is crashing the Xserver. Please blacklist it for now so you’ll have a desktop again. Create

blacklist nvidia

then run
sudo update-initramfs -u
and reboot.
Afterwards, you’ll have to install a kernel that supports the amd gpu and the firmware files:


Many many many thanks! It worked!!

For completeness, just so anyone facing the same problems has all the info here, I had to additionally blacklist nvidia in the grub file (/etc/default/grub) by doing:

GRUB_CMDLINE_LINUX_DEFAULT ="module.blacklist=nvidia,nvidia-current,nvidia_drm,nvidia_uvm,nvidia_modeset,nouveau"

After updating grub I could successfully enter my desktop and after installing the new kernel and the drivers, I removed the blacklist of nvidia, but somehow they were still not working after reboot. So, I uninstalled them and installed them again using the 450 drivers, and now nvidia-smi does show some process going on.

However, in the settings menu, AMD Renoir is still appearing instead of GTX 1650 Ti, and it does not seem right, but I am not sure:

I would really appreciate that you could take a look again to the report to check that everything is ok or I have to do something else so that everything is perfect: nvidia-bug-report.log.gz (263.4 KB) .

As I could not upload two media files, here I show some outputs of the terminal showing that both gpu’s seem to be working properly (apart from the issue mentioned in the previous message):

The Nvidia gpu is now in render offload mode, meaning primarily the amd gpu is used and if you want to run something on the nvidia, you’ll have to prepend



__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor

to use the nvidia gpu as primary, some tweaks have to be set:

Hi generix,

I saw the tweaks you mentioned but there you suggest to add amdgpu as PrimaryGPU, shouldn’t it be the opposite?

I have added in /usr/share/X11/xorg.conf.d/10-amdgpu.conf:

Option "PrimaryGPU" "no"

And added the following in /usr/share/X11/xorg.conf.d/10-nvidia.conf:

Option "PrimaryGPU" "yes"

After reboot it seems that the primary GPU is now set to the nvidia one, as desired, So, which is the difference with respect to all the changes you suggest in the other post? Am I doing something wrong?

Just in case, here you have the bug report: nvidia-bug-report.log.gz (284.7 KB)

Again thanks a lot for solving my issues, I really appreciate it! I spent days trying to make Ubuntu 18.04 work on my new laptop and you solved it very efficiently.

Actually I just realized that after logging in, a mouse cursor remains frozen at the bottom-right corner, while another cursor can move and operate, it is a subtle but annoying issue :S

Please read the linked post again, carefully. The amdgpu config file has to be changed to the modesetting driver and the nvidia config file to be primarygpu.
Using the modesetting driver works around the dual-pointer bug.

Yes, sorry, that worked!

Again, many thanks for your time and help.