Nvidia driver not working on Thinkpad + Debian, "unable to load info from any available system"

I’m trying to make nvidia driver to work on a Thinkpad T490 running Debian testing, kernel 5.2. This laptop has an Intel graphics card + nvidia GeForce mx250.

I’ve spent hours trying to make it work, but to no avail.

I tried installing the Debian’s package for the driver, nvidia-driver, as instructed by the Debian’s package nvidia-detect. This installed the nvidia driver version 430.50.
After the installation I tried ‘nvidia-settings’, but it consistently gives the error “unable to load info from any available system”.

I’ve also tried to install the driver obtained from Nvidia website (same version as above), but it was not working as well. In addition, it seems that 3D rendering became even slower. When this driver was installed, glxinfo prints the following, which seems strange, at least to me:

OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 8.0, 256 bits)

Without any driver installed, or with the driver from the Debian package, I get:

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics (Whiskey Lake 3x8 GT2)

This is what ‘inxi -G’ tells about the configuration:

Graphics:  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel 
           Device-2: NVIDIA GP108M [GeForce MX250] driver: nvidia v: 430.50 
           Display: server: X.org 1.20.4 driver: modesetting,nouveau,nvidia unloaded: fbdev,vesa tty: 150x44 
           Message: Advanced graphics data unavailable in console for root.

Every time I switched between the Debian packaged driver and Nvidia’s one I cleaned and purged all the previous installation files and packages.

I’ve also tried the Debian’s driver with kernel 4.19, but without success.

I’v also tried to configure the system with nvidia-xconfig, which creates a xorg.conf file, but the X server failed to start with this configuration (before that, there was no xorg.conf file at all).

Any thoughts on how to get this to work?

nvidia-bug-report.log.gz (1.02 MB)

Please make sure that secure boot is disabled in bios.
Please run nvidia-bug-report.sh as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post of yours will reveal a paperclip icon.
https://devtalk.nvidia.com/default/topic/1043347/announcements/attaching-files-to-forum-topics-posts/

Thanks, I’ve just attached the bug report. Secure boot is already disabled in the bios.

The driver loads fine but since this is a hybrid graphics system, you’ll have to configure it to use prime output:
https://devtalk.nvidia.com/default/topic/1022670/linux/official-driver-384-59-with-geforce-1050m-doesn-t-work-on-opensuse-tumbleweed-kde/post/5203910/#5203910

Thank you very much, I managed solving this issue using your instructions.

For those interested, I followed the instructions in the Arch wiki, https://wiki.archlinux.org/index.php/NVIDIA_Optimus#Use_NVIDIA_graphics_only, which is simply creating a simple Xorg.conf file and adding 2 lines to the ~/.xsession files (I’m starting X with startx; it might be slightly different when using a display manager). I’ve also added ‘nvidia-drm.modeset=1’ to the kernel parametrs in /etc/default/grub, following https://wiki.archlinux.org/index.php/NVIDIA#DRM_kernel_mode_setting