Unable to start X. Failed to initialize DMA.

I’ve just finished my new uefi build using my old and trusted gtx970 and I just can’t get it to start the X server no matter what.
I’ve removed my old X11 configs and tried after running nvidia-xconfig for the sake of simplicity.
Nouveau is not installed (in fact I’ve even disabled DRM in the kernel build) and the nvidia modules seem to get loaded just fine otherwise, however as soon as I startx I get an error stating the following:

...
[    74.811] (EE) NVIDIA(GPU-0): Failed to initialize DMA.
[    74.811] (EE) NVIDIA(0): Failed to allocate push buffer
...

I could only find a few threads, mostly from here, regarding hw incompatibilities and outdated vbios online, and even flashed the latest bios for my card, though the very same error persists.

I was initially worried about getting a semi-decent framebuffer with nvidia-drivers and efi, though it seems I can’t even get X to work :S

Here’s my nvidia-bug-report (https://drive.google.com/file/d/1T1Uxhg98OuZ4_HLoJgg7495WHgC8Vq_G/view?usp=sharing) and the complete Xorg.0.log.

edit: Reposting Xorg.0.log here in case the link goes down

[    71.390] 
X.Org X Server 1.19.5
Release Date: 2017-10-12
[    71.390] X Protocol Version 11, Revision 0
[    71.390] Build Operating System: Linux 4.15.0-29-generic x86_64 Gentoo
[    71.390] Current Operating System: Linux kon14-desktop 4.14.65-gentoo-20180909 #8 SMP Sun Sep 9 06:27:18 EEST 2018 x86_64
[    71.390] Kernel command line: BOOT_IMAGE=/kernel-4.14.65-gentoo-20180909 root=/dev/mapper/gentoo-root ro real_root=UUID=d47025de-4fc0-4ef7-a3dc-198db57e2d89 crypt_root=UUID=9ba063e9-5627-4abf-b360-62c19815b9b7 dolvm rootfstype=ext4 keymap=dvorak root_trim=yes
[    71.390] Build Date: 07 September 2018  08:17:09PM
[    71.390]  
[    71.390] Current version of pixman: 0.34.0
[    71.390] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[    71.390] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    71.391] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Sep  9 14:40:03 2018
[    71.392] (==) Using config file: "/etc/X11/xorg.conf"
[    71.392] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    71.393] (==) ServerLayout "Layout0"
[    71.393] (**) |-->Screen "Screen0" (0)
[    71.393] (**) |   |-->Monitor "Monitor0"
[    71.393] (**) |   |-->Device "Device0"
[    71.393] (**) |-->Input Device "Keyboard0"
[    71.393] (**) |-->Input Device "Mouse0"
[    71.393] (==) Automatically adding devices
[    71.393] (==) Automatically enabling devices
[    71.393] (==) Automatically adding GPU devices
[    71.393] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    71.394] (WW) The directory "/usr/share/fonts/TTF/" does not exist.
[    71.394] 	Entry deleted from font path.
[    71.394] (WW) The directory "/usr/share/fonts/OTF/" does not exist.
[    71.394] 	Entry deleted from font path.
[    71.394] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[    71.394] 	Entry deleted from font path.
[    71.394] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[    71.394] 	Entry deleted from font path.
[    71.394] 	(Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[    71.394] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[    71.394] 	Entry deleted from font path.
[    71.394] 	(Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[    71.394] (==) FontPath set to:
	/usr/share/fonts/misc/
[    71.394] (==) ModulePath set to "/usr/lib64/xorg/modules"
[    71.394] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[    71.394] (WW) Disabling Keyboard0
[    71.394] (WW) Disabling Mouse0
[    71.394] (II) Loader magic: 0x562ff1e96ce0
[    71.394] (II) Module ABI versions:
[    71.394] 	X.Org ANSI C Emulation: 0.4
[    71.394] 	X.Org Video Driver: 23.0
[    71.394] 	X.Org XInput driver : 24.1
[    71.394] 	X.Org Server Extension : 10.0
[    71.395] (--) using VT number 2

[    71.395] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[    71.396] (--) PCI:*(0:9:0:0) 10de:13c2:1043:8508 rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/268435456, 0xf0000000/33554432, I/O @ 0x0000d000/128, BIOS @ 0x????????/524288
[    71.396] (II) LoadModule: "glx"
[    71.398] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[    71.403] (II) Module glx: vendor="X.Org Foundation"
[    71.403] 	compiled for 1.19.5, module version = 1.0.0
[    71.403] 	ABI class: X.Org Server Extension, version 10.0
[    71.403] (II) LoadModule: "nvidia"
[    71.403] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[    71.406] (II) Module nvidia: vendor="NVIDIA Corporation"
[    71.406] 	compiled for 4.0.2, module version = 1.0.0
[    71.406] 	Module class: X.Org Video Driver
[    71.407] (II) NVIDIA dlloader X Driver  396.54  Tue Aug 14 22:15:03 PDT 2018
[    71.407] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    71.412] (II) Loading sub module "fb"
[    71.412] (II) LoadModule: "fb"
[    71.413] (II) Loading /usr/lib64/xorg/modules/libfb.so
[    71.414] (II) Module fb: vendor="X.Org Foundation"
[    71.414] 	compiled for 1.19.5, module version = 1.0.0
[    71.414] 	ABI class: X.Org ANSI C Emulation, version 0.4
[    71.414] (II) Loading sub module "wfb"
[    71.414] (II) LoadModule: "wfb"
[    71.414] (II) Loading /usr/lib64/xorg/modules/libwfb.so
[    71.414] (II) Module wfb: vendor="X.Org Foundation"
[    71.414] 	compiled for 1.19.5, module version = 1.0.0
[    71.414] 	ABI class: X.Org ANSI C Emulation, version 0.4
[    71.414] (II) Loading sub module "ramdac"
[    71.414] (II) LoadModule: "ramdac"
[    71.414] (II) Module "ramdac" already built-in
[    71.416] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
[    71.416] (==) NVIDIA(0): RGB weight 888
[    71.416] (==) NVIDIA(0): Default visual is TrueColor
[    71.416] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[    71.416] (**) NVIDIA(0): Enabling 2D acceleration
[    71.416] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
[    71.416] (EE) NVIDIA(0):     log file that the GLX module has been loaded in your X
[    71.416] (EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If
[    71.416] (EE) NVIDIA(0):     you continue to encounter problems, Please try
[    71.416] (EE) NVIDIA(0):     reinstalling the NVIDIA driver.
[    71.790] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:9:0:0
[    71.790] (--) NVIDIA(0):     CRT-0
[    71.790] (--) NVIDIA(0):     DFP-0
[    71.790] (--) NVIDIA(0):     DFP-1
[    71.790] (--) NVIDIA(0):     DFP-2 (boot)
[    71.790] (--) NVIDIA(0):     DFP-3
[    71.790] (--) NVIDIA(0):     DFP-4
[    71.791] (II) NVIDIA(0): NVIDIA GPU GeForce GTX 970 (GM204-A) at PCI:9:0:0 (GPU-0)
[    71.791] (--) NVIDIA(0): Memory: 4194304 kBytes
[    71.791] (--) NVIDIA(0): VideoBIOS: 84.04.2f.00.5c
[    71.791] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[    71.795] (--) NVIDIA(GPU-0): CRT-0: disconnected
[    71.795] (--) NVIDIA(GPU-0): CRT-0: 400.0 MHz maximum pixel clock
[    71.795] (--) NVIDIA(GPU-0): 
[    71.799] (--) NVIDIA(GPU-0): DFP-0: disconnected
[    71.799] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
[    71.799] (--) NVIDIA(GPU-0): DFP-0: 330.0 MHz maximum pixel clock
[    71.799] (--) NVIDIA(GPU-0): 
[    71.799] (--) NVIDIA(GPU-0): DFP-1: disconnected
[    71.799] (--) NVIDIA(GPU-0): DFP-1: Internal TMDS
[    71.799] (--) NVIDIA(GPU-0): DFP-1: 165.0 MHz maximum pixel clock
[    71.799] (--) NVIDIA(GPU-0): 
[    71.799] (--) NVIDIA(GPU-0): DELL P2416D (DFP-2): connected
[    71.800] (--) NVIDIA(GPU-0): DELL P2416D (DFP-2): Internal DisplayPort
[    71.800] (--) NVIDIA(GPU-0): DELL P2416D (DFP-2): 960.0 MHz maximum pixel clock
[    71.800] (--) NVIDIA(GPU-0): 
[    71.802] (--) NVIDIA(GPU-0): DFP-3: disconnected
[    71.802] (--) NVIDIA(GPU-0): DFP-3: Internal TMDS
[    71.802] (--) NVIDIA(GPU-0): DFP-3: 165.0 MHz maximum pixel clock
[    71.802] (--) NVIDIA(GPU-0): 
[    71.802] (--) NVIDIA(GPU-0): DFP-4: disconnected
[    71.802] (--) NVIDIA(GPU-0): DFP-4: Internal TMDS
[    71.802] (--) NVIDIA(GPU-0): DFP-4: 330.0 MHz maximum pixel clock
[    71.802] (--) NVIDIA(GPU-0): 
[    71.804] (==) NVIDIA(0): 
[    71.804] (==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
[    71.804] (==) NVIDIA(0):     will be used as the requested mode.
[    71.804] (==) NVIDIA(0): 
[    71.805] (II) NVIDIA(0): Validated MetaModes:
[    71.805] (II) NVIDIA(0):     "DFP-2:nvidia-auto-select"
[    71.805] (II) NVIDIA(0): Virtual screen size determined to be 2560 x 1440
[    71.808] (--) NVIDIA(0): DPI set to (122, 121); computed from "UseEdidDpi" X config
[    71.808] (--) NVIDIA(0):     option
[    71.808] (--) Depth 24 pixmap format is 32 bpp
[    71.809] (II) NVIDIA: Using 6144.00 MB of virtual memory for indirect memory
[    71.809] (II) NVIDIA:     access.
[    74.811] (EE) NVIDIA(GPU-0): Failed to initialize DMA.
[    74.811] (EE) NVIDIA(0): Failed to allocate push buffer
[    74.934] (EE) 
Fatal server error:
[    74.934] (EE) AddScreen/ScreenInit failed for driver 0
[    74.934] (EE) 
[    74.934] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[    74.934] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    74.934] (EE) 
[    74.943] (EE) Server terminated with error (1). Closing log file.

edit: Must have missed the following, I thought I had specifically searched for such an error before :S

[    71.416] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
[    71.416] (EE) NVIDIA(0):     log file that the GLX module has been loaded in your X
[    71.416] (EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If
[    71.416] (EE) NVIDIA(0):     you continue to encounter problems, Please try
[    71.416] (EE) NVIDIA(0):     reinstalling the NVIDIA driver.

edit: regarding the glx vendor string listing xorg

[    71.396] (II) LoadModule: "glx"
[    71.398] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[    71.403] (II) Module glx: vendor="X.Org Foundation"

Rebuilt nvidia-drivers and others, now lists nvidia. The rest is the same.
I heard about recent xorg dropping some directories (ie /usr/lib64/xorg/modules/linux and extensions) and nvidia-drivers still using the old ones? the new log points to extensions/libglx.so and states Nvidia though, so I guess that’s unrelated.
I’ve used gentoo’s eselect opengl module to set my glx to nvidia’s though without X I can’t use glxinfo.
How should I verify this?

I guess that’s way too many edits for a single post.
I shared a drive foler with my kernel log, Xorg.0.log, Xorg.conf and others.
The Xorg.conf is merely an unedited conf generated by nvidia-xconfig.

https://drive.google.com/drive/folders/1-W9Hn6Ju6gianrkHn0SxY59cK9kjS97Z?usp=sharing

[    50.297] (II) NVIDIA:     access.
[    53.300] (EE) NVIDIA(GPU-0): Failed to initialize DMA.
[    53.300] (EE) NVIDIA(0): Failed to allocate push buffer
[    72.332] (EE) 
Fatal server error:
[    72.332] (EE) AddScreen/ScreenInit failed for driver 0
[    72.332] (EE) 
[    72.332] (EE)

The above remains the only useful part of the log as far as I can tell.

Problem persists across both 390.87 and 396.54.
I also successfully booted the proprietary drivers on a live image of Manjaro on the same hardware, therefore it can’t possibly be my hw setup or any bios setting causing any of this.

So I actually did get around to solving this in the end and even though it took me a while to get to do it, I thought I’d update this thread for anyone possibly coming across the same issue in the future.

In my case, it must have been support for AMD’s SME (Secure Memory Encryption) being enabled in the kernel config.
I’m not 100% certain whether it was SME as I also disabled Virtualization support (in the kernel) entirely in the process, even though it was already disabled in UEFI, just in case the drivers detected that and raised a red flag.
I know Nvdia certainly doesn’t like it when users try to use their consumer-tier gtx cards for virtualization, so I figured I might as well disable it in the config as I don’t intend to configure any such setup for the moment.

Had the same problem with Ryzen7 CPU, GTX 1060 videocard and nvidia-drivers 415.25 version installed on Gentoo Linux. Fixed by disabling AMD’s SME (Secure Memory Encryption) in kernel config and rebuilding the kernel.
Thanks for posting resolution, kon14!

I’m glad this post ended up helping somebody else :).

Make that two!
I’m running a ryzen 9 3900X with a 1070 on gentoo (kernel 4.19.66 at the moment) and had enabled SME on my kernel.
It would be good to know why this happens.
Thank you for posting you solution.

I ran into the same problem. Disabling SME for now did the trick. However, this is now a security issue.

NVIDIA, is there an ETA for fixing this bug?

Please NVIDIA fix it!

I want to be able to use SME with the nvidia drivers.

As NVIDIA staff does not seem to review forum threads, I opened a bug for this:
https://developer.nvidia.com/nvidia_bug/2865023

We have been able to reproduce issue locally.
Engineering team is working on it, will keep you updated on the same.

For what it’s worth, this continues to fix the problem today on the latest kernel (5.7.7) and the modern nvidia drivers (450.57).

Just found this thread in the forum after reporting this bug myself. So, what’s the status on this, is there an ETA for the fix? We really need this for one of our customers.

Bug report:
https://developer.nvidia.com/nvidia_bug/3076954

Interestingly, I got a reply there that this is not the right place to report the bug. Where is the bug tracker for NVIDIA GPUs / driver issues?

We’ve just tested this, the bug still persists with kernel 5.7.10 and nvidia drivers 450.57, so it would seem there is no fix yet.

This is not going to be fixed anytime soon. This is the reply I got from NVIDIA:

Amrit Singh Mon, Aug 10, 2020 at 5:04
AMD SME is not supported in NVIDIA Linux driver. Driver README calls out that user needs to disable SME : [https://download.nvidia.com/XFree86/Linux-x86_64/450.57/README/dma_issues.html]
Engineering team is currently evaluating multiple options to support this feature in future, however we can not commit any timeline for it at this moment.

We have root caused the issue and fix will be available in future release.
I will update you once it is done publicly.

I was able to fix by just disabling SME in kernel. I kept KVM and it still works.