1

I have installed Kubuntu 18.04 LTS and I want to use NVIDIA driver from nvidia.com.

My graphics devices are:

$ lspci | grep "VGA"
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1c8d (rev a1)

I have installed their driver from multiuser session (without X), blacklisted nouveau through adding lines

blacklist nouveau
options nouveau modeset=0

into /etc/modprobe.d/blacklist.conf, the lines

rdblacklist=nouveau

into /etc/default/grub, made

# grub-mkconfig -o /boot/grub/grub.cfg
# update-initramfs -u
# reboot

After reboot I obtain black screen, while from other tty a can run nvidia-smi which returns correct result:

$ nvidia-smi
Fri Apr 12 20:33:11 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.43       Driver Version: 418.43       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| 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 GTX 1050    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   39C    P8    N/A /  N/A |     49MiB /  4040MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       840      G   /usr/lib/xorg/Xorg                             8MiB |
|    0       880      G   /usr/bin/sddm-greeter                         38MiB |
+-----------------------------------------------------------------------------+

so driver looks installed properly.

My configuration file and logs are here: xorg.conf, Xorg.0.log, dmesg, journalctl.

The xorg.conf file was taken from Linux Mint installed at the same laptop where graphics starts properly with nvidia driver installed from repositories. Usage of xorg.conf produced during installation of the driver gives the same black screen (apart from absence of loading modesetting in Xorg.0.log).

Is it possible to run graphics with the latest nvidia driver at my system?


Update 1

Additional information about my system:

$ mokutil --sb-state
SecureBoot disabled
Platform is in Setup Mode

$ ls /sys/firmware/efi
config_table efivars esrt fw_platform_size fw_vendor runtime runtime-map systab vars

# lshw -c video
  *-display
       description: VGA compatible controller
       product: GP107M [GeForce GTX 1050 Mobile]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:134 memory:de000000-deffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:df000000-df07ffff
  *-display
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 04
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:130 memory:dd000000-ddffffff memory:b0000000-bfffffff ioport:f000(size=64) memory:c0000-dffff

$ lsmod | grep nvidia
nvidia_drm             45056  3
nvidia_modeset       1085440  6 nvidia_drm
nvidia              17592320  221 nvidia_modeset
ipmi_msghandler       102400  2 ipmi_devintf,nvidia
drm_kms_helper        172032  2 nvidia_drm,i915
drm                   458752  8 drm_kms_helper,nvidia_drm,i915

Update 2

dkms status doesn't return anything:

$ dkms status
$

Update 3

I have reinstalled the driver then installed bbswitch-dkms. But result of starting X is the same.

Here are Xorg.0.log and results of previously shown commands where result has changed:

$ lsmod | grep nvidia
nvidia_uvm            798720  0
nvidia_drm             40960  3
nvidia_modeset       1085440  6 nvidia_drm
nvidia              17592320  222 nvidia_uvm,nvidia_modeset
ipmi_msghandler       102400  2 ipmi_devintf,nvidia
drm_kms_helper        172032  2 nvidia_drm,i915
drm                   458752  8 drm_kms_helper,nvidia_drm,i915

$ dkms status
bbswitch, 0.8, 4.18.0-17-generic, x86_64: installed
nvidia, 418.43, 4.18.0-17-generic, x86_64: installed

The xorg.conf is the same as previously. The output of mokutil, ls /sys/firmware/efi, lshw, nvidia-smi is the same as earlier.

I have found one more relevant log: /var/log/gpu-manager.log. Here are these files for Kubuntu and Linux Mint (where driver from repository runs X successfully): gpu-manager.log.Kubuntu, gpu-manager.log.Mint. From the second log it is seen that bbswitch is used also. This was the reason to install it at Kubuntu, but for now I don't know how to use it...

  • 1
    Please edit your question and post output of the following commands: 1. mokutil --sb-state 2. ls /sys/firmware/efi/ 3. sudo lshw -c video 4. dkms status and 5. lsmod | grep nvidia – Marmayogi Apr 14 at 15:46
  • The result of dkms status I'll be able to post just tomorrow, when I will have wired Internet to install dkms... – natasha Apr 14 at 16:40
0

I have cured this by installing nvidia-prime.

Now X start correctly,

$ glxinfo | head
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context, 
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile, 
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
    GLX_ARB_multisample, GLX_EXT_buffer_age,

$ glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
65344 frames in 5.0 seconds = 13068.664 FPS
66224 frames in 5.0 seconds = 13244.633 FPS
66325 frames in 5.0 seconds = 13264.833 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 54 requests (54 known processed) with 0 events remaining.

$ nvidia-smi | head
Tue Apr 16 16:10:47 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.43       Driver Version: 418.43       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| 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 GTX 1050    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   42C    P0    N/A /  N/A |    176MiB /  4040MiB |      4%      Default |
+-------------------------------+----------------------+----------------------+

$ mokutil --sb-state
SecureBoot disabled
Platform is in Setup Mode

$ ls /sys/firmware/efi
config_table  efivars  esrt  fw_platform_size  fw_vendor  runtime  runtime-map  systab  vars

# lshw -c video
  *-display                 
       description: VGA compatible controller
       product: GP107M [GeForce GTX 1050 Mobile]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:134 memory:de000000-deffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:df000000-df07ffff
  *-display
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 04
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:130 memory:dd000000-ddffffff memory:b0000000-bfffffff ioport:f000(size=64) memory:c0000-dffff

$ dkms status
bbswitch, 0.8, 4.18.0-17-generic, x86_64: installed
nvidia, 418.43, 4.18.0-17-generic, x86_64: installed

$ lsmod | grep nvidia
nvidia_drm             40960  9
nvidia_modeset       1085440  19 nvidia_drm
nvidia              17592320  895 nvidia_modeset
ipmi_msghandler       102400  2 ipmi_devintf,nvidia
drm_kms_helper        172032  2 nvidia_drm,i915
drm                   458752  13 drm_kms_helper,nvidia_drm,i915

The corresponding logs: Xorg.0.log, gpu-manager.log. X is run with xorg.conf presented earlier:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "nvidia"
    Inactive       "intel"
EndSection

Section "Device"
    Identifier     "intel"
    Driver     "modesetting"
    BusID      "PCI:0@0:2:0"
    Option     "AccelMethod" "None"
EndSection

Section "Screen"
    Identifier     "intel"
    Device     "intel"
EndSection

Section "Device"
    Identifier     "nvidia"
    BusID      "PCI:1@0:0:0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option     "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier     "nvidia"
    Device         "nvidia"
    Option     "AllowEmptyInitialConfiguration" "on"
    Option     "IgnoreDisplayDevices" "CRT"
EndSection

I was not able to start X with xorg.conf produced during installation of the nvidia driver.

So, to summarize, I have installed dkms, installed manually the driver (answering 'Yes' the question 'Would you like to register the kernel module sources with DKMS?...'), blacklisted nouveau, installed bbswitch-dkms, nvidia-prime, and changed xorg.conf to look like the one shown above. After these steps X started properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.