NVIDIA-Linux-x86_64-418.113 wouldn't build

Hello. I’m using a discrete GeForce 740M and 418.113 seems to be the latest driver that supports it on Linux (centos 8 in my case)
After a regular kernel update (now 4.18.0-240.22.1.el8_3.x86_64) the driver stops building.
The following error occurs:
drmp.h no such file or directory (report is attached)
nvidia-bug-report.log.gz (103.6 KB)
Any suggestions? )
Thank you!

Please use the current 460 driver, the 418 driver being the last to support your 740M is only valid on Windows.

I tried. No luck. 460 driver doesn’t support 740M (at least for me)

  1. 418.113 is the only driver that the configurator suggests me on a download drivers page for 740M video card for Linux 64 bit
  2. When I manually choose the current 460 driver It doesn’t contain 740M in a list of supported devices on it’s Supported products tab .
  3. If I build and install it - my PC gets stuck with a black screen on a next boot.

In case it’s important - my PC has two videocards (Nvidia Optimus technology)
i915 and GeForce 740M

I guess you’re getting the black screen because the driver is working but you created an xorg.conf. You have a hybrid graphics system, the internal screen is driven by the intel gpu. So if you create an xorg.conf for the nvidia gpu, the intrenal screen is disabled.
Please don’t use the .run installer, uninstall it using the --unistall option, then use the driver from a repo like rpmfusion:
This will install the necessary config files for a hybrid graphics system:

Edit: also delete any xorg.conf you created.

Well I have a xorg.conf that disables intel and sets nvidia as a primary and always working device.
Could you please look on it? May be it’s possible to correct something minor to get the latest driver working?

Section “ServerLayout”
Identifier “Layout0”
Screen 1 “nvidia” 0 0
Inactive “intel”

Section “Monitor”
Identifier “Monitor0”
Option “DPMS”
Option “DPI” “96 x 96”

Section “Device”
Identifier “nvidia”
Driver “nvidia”
BusID “PCI:1:0:0”

Section “Device”
Identifier “intel”
Driver “modesetting”
BusID “PCI:0:2:0”

Section “Screen”
Identifier “nvidia”
Device “nvidia”
Monitor “Monitor0”
DefaultDepth 24
Option “UseDisplayDevice” “none”
SubSection “Display”
Depth 24
Virtual 1920 1080

Section “Screen”
Identifier “intel”
Device “intel”
Monitor “Monitor0”

Like said, I’d rather recommend using the repo driver, using the runfile installer without dkms you will have to reinstall it on every kernel update.

Please delete xorg.conf and create /etc/X11/xorg.conf.d/10-nvidia.conf

Section "OutputClass"
    Identifier "nvidia-prime"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "true"

then create two files optimus.desktop in /etc/xdg/autostart/ and /usr/share/gdm/greeter/autostart/ containing

[Desktop Entry]
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"

I did all of you said. I installed from NVIDIA-Linux-x86_64-460.67.run, created all the files you mentioned.
And I still getting a black screen and a total computer stuck.
Could you please review a bug report?
nvidia-bug-report.log.gz (1.0 MB)

The Xserver is correctly configured, so I guess the xrandr commands aren’t called. Did you create the optimus.desktop files in both locations? Did the directory /usr/share/gdm/greeter/autostart exist (location may change depending on distro)? Do you run the standard Gnome/GDM desktop?

Yes, all the paths are exactly the same as you mentioned, and all of the files with the exact context were created and placed in proper directories. And yes I’m using Gnome and GDM
I just want to test if the current driver is working ok with a minimum configuration before start playing with 3rd party repositories like rmfusion with complicated settings.
And it doesn’t work… For me…
Are there any ways to debug it? Some logs or something?
I really appreciate your help.

I’m pretty sure that a current 460 driver doesn’t support 740M in Optimus mode.
All I get with different configurations and installations - is a black screen.
I tried a lot of options, installation from a run. file, creating config files as you advised (nvidia,conf and optimus.desktop)
I also tried to completely uninstall the driver and install it from rpmfusion (and other) repositories as you also recomended.
I also tried to use my old xorg.conf that had been working for me for years which sets nvidia as a primary GPU, or without xorg.conf at all.
No luck. Just a black screen or a total PC freeze.
I still think that 418.113 is the only working driver for 704M but it doesn’t build against a new kernel from centos 8 repo and it needs to be patched like is was done for 440 driver and kernel 5.5 for the same reason - fatal error: drm/drmP.h: No such file or directory
And yes - an official Nvidia web site’s driver download page stays the same - the latest Linux driver for 740M is 418.113 and NOT 460.current…
Dear developers, could you please fix the driver and let it continue do it’s job please, cause now I completely lost nvidia graphics support on my rig.

I have 740M with Intel HD4000 laptop, 460.67 driver, 5.11.12 kernel. Everything works fine except resuming from suspend or hibernate. I use prime render offload configuration. I have only one xorg config file:
cat /etc/X11/xorg.conf.d/10-nvidia.conf
Section “ServerLayout”
Identifier “layout”
Option “AllowNVIDIAGPUScreens”

Well, I have Centos 8 and a default kernel from it’s official repo, now it’s 4.18.0-240.22.1 and I didn’t manage to get it work in any kind.

Also inability to resume from suspend sounds unusable to me. I often use a suspend mode.

I have a 740M running on the 465 driver and everything is working fine.
Please extend the command line of the optimus.desktop files to

Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto; logger 'nvidia prime set'"

make sure ‘logger’ is installed, then please provide a journal output
sudo journalctl -b0 >journal.txt
after reboot.

I had to make several reboots because when I boot with driver installed my PC fails to the black screen and I have to reboot in a single mode to remove the driver and then reboot again
Journal in CentOs keeps files in /run directory which is stored in memory and thus contains only last reboot which is useless in my case.
I attached /var/log/messages which has several reboots and may be useful for you.
messages (1.6 MB)

Besides other records I found these:
Apr 12 15:20:59 mike-mono /usr/libexec/gdm-x-session[1867]: (==) NVIDIA(0): Backing store enabled
Apr 12 15:20:59 mike-mono /usr/libexec/gdm-x-session[1867]: (==) NVIDIA(0): Silken mouse enabled
Apr 12 15:20:59 mike-mono /usr/libexec/gdm-x-session[1867]: () NVIDIA(0): DPMS enabled
Apr 12 15:20:59 mike-mono /usr/libexec/gdm-x-session[1867]: (II) Loading sub module “dri2”
Apr 12 15:20:59 mike-mono /usr/libexec/gdm-x-session[1867]: (II) LoadModule: “dri2”
Apr 12 15:20:59 mike-mono /usr/libexec/gdm-x-session[1867]: (II) Module “dri2” already built-in
Apr 12 15:20:59 mike-mono /usr/libexec/gdm-x-session[1867]: (II) NVIDIA(0): [DRI2] Setup complete
Apr 12 15:20:59 mike-mono /usr/libexec/gdm-x-session[1867]: (II) NVIDIA(0): [DRI2] VDPAU driver: nvidia
Apr 12 15:20:59 mike-mono /usr/libexec/gdm-x-session[1867]: (==) modeset(G0): Backing store enabled
Apr 12 15:20:59 mike-mono /usr/libexec/gdm-x-session[1867]: (==) modeset(G0): Silken mouse enabled
Apr 12 15:21:00 mike-mono /usr/libexec/gdm-x-session[1867]: (II) modeset(G0): Initializing kms color map for depth 24, 8 bpc.
Apr 12 15:21:00 mike-mono /usr/libexec/gdm-x-session[1867]: (
) modeset(G0): DPMS enabled
Apr 12 15:21:00 mike-mono /usr/libexec/gdm-x-session[1867]: (WW) modeset(G0): Option “DPI” is not used
Apr 12 15:21:00 mike-mono /usr/libexec/gdm-x-session[1867]: (WW) modeset(G0): Option “UseDisplayDevice” is not used
Apr 12 15:21:00 mike-mono /usr/libexec/gdm-x-session[1867]: /usr/libexec/Xorg: symbol lookup error: /usr/lib64/xorg/modules/drivers/modesetting_drv.so: undefined symbol: glamor_egl_get_driver_name
Apr 12 15:21:00 mike-mono /usr/libexec/gdm-x-session[1867]: Unable to run X server

May be it will be helpful

Well I did manage to save a journal log of an unsuccessful black-screen boot.
Here it is.
Will appreciate any help!
Thanks a lot!
journal.txt (368.9 KB) nvidia-bug-report.log.gz (1.1 MB)

This looks like some incomplete/broken mesa install or the like. Please uninstall the nvidia driver and check if you can get an output on the internal screen.

Of course I have to uninstall nvidia driver to be able to work with my PC at all.
Because with the driver I get nothing!! Just a black screen as I said many times. X server doesn’t start!
Without nvidia driver X serves starts without a hitch and uses intel i915 driver.
And I have only one screen - my rig a monoblock PC with a built-in display
And let me remind you that with older kernel and driver 418.113 all goes good. Driver is built and X server is running with nvidia GPU support.

There have been changes to the driver layout and libs meanwhile, most of all glvnd and especially its egl counterpart. So if centos 8 doesn’t support this, installing the runfile driver without thinking about the options to use, you’ll break it. That’s why I recommended using the repo driver.

Again, I tried repo driver. Same result.
And repodriver is seems much less aware about Centos kernel.
For e.g Centos has it’s current kernel modules installed in /lib/modules/4.18.0-240.22.1.el8_3.x86_64
While the repo driver installs nvidia driver in /lib/modules/4.18.0-240.22
It creates a new directory 4.18.0-240.22 and installs drivers there. Of course the kernel doesn’t see it until you have to manually copy them to the right directory 4.18.0-240.22.1.el8_3.x86_64
But anyway… The result is stays the same - a black screen.

People, you are official nvidia guys, aren’t you? Do you provide a tech support here? To be honest I don’t understand if I can get a some sort of support here.
I described my problem, sent you all logs I have. Could you please stop telling fortunes, find the reason and give me some exact advice? Are there driver developers here? Can they say what does the hecking undefined symbol: glamor_egl_get_driver_name mean at all?
Do they have CentOS? Would they just test the driver against a regular CentOs distro? Do they test the driver at all?
I have:

  1. Nvidia GPU
  2. Nvidia official driver.

They don’t work together. You have all the logs you asked for and I have followed all the steps you recommended.
What’s next?