I am running Fedora 26 with the NVIDIA driver (version 384.59) from negativo17’s repository on a ThinkPad T560 equipped with Intel HD Graphics 520 + GeForce GT940M. In order to make PRIME synchronization work I’ve tried adding nvidia-drm.modeset=1 to the kernel command line. It boots successfully and I get to the login screen, however, X crashes after logging in.
Indeed installing nvidia-modprobe fixed the problem and made KMS and PRIME Synchronization work. Somehow I have missed the GitHub issue while googling. But well, now the NVIDIA driver seems to ignore the PowerMizer settings I am using to throttle the GPU when running on battery.
I have set the following options in /etc/X11/xorg.conf.d/10-nvidia.conf:
The NVIDIA driver doesn’t seem to care and keeps switching to lower P-states when on battery although the above settings should force the GPU to P8. It works fine when removing nvidia-drm.modeset=1 from the command line though.
I am also having another weird issue where the NVIDIA driver won’t initialize correctly during boot sometimes.
From dmesg:
Aug 26 22:58:14 pp3345-Laptop kernel: irq 16: nobody cared (try booting with the "irqpoll" option)
Aug 26 22:58:14 pp3345-Laptop kernel: CPU: 2 PID: 0 Comm: swapper/2 Tainted: P U OE 4.12.8-300.fc26.x86_64 #1
Aug 26 22:58:14 pp3345-Laptop kernel: Hardware name: LENOVO 20FH002RGE/20FH002RGE, BIOS N1KET21W (1.08 ) 04/20/2016
Aug 26 22:58:14 pp3345-Laptop kernel: Call Trace:
Aug 26 22:58:14 pp3345-Laptop kernel: <IRQ>
Aug 26 22:58:14 pp3345-Laptop kernel: dump_stack+0x63/0x90
Aug 26 22:58:14 pp3345-Laptop kernel: __report_bad_irq+0x35/0xc0
Aug 26 22:58:14 pp3345-Laptop kernel: note_interrupt+0x24b/0x290
Aug 26 22:58:14 pp3345-Laptop kernel: handle_irq_event_percpu+0x54/0x80
Aug 26 22:58:14 pp3345-Laptop kernel: handle_irq_event+0x2c/0x50
Aug 26 22:58:14 pp3345-Laptop kernel: handle_fasteoi_irq+0x86/0x140
Aug 26 22:58:14 pp3345-Laptop kernel: handle_irq+0xa9/0x110
Aug 26 22:58:14 pp3345-Laptop kernel: do_IRQ+0x46/0xd0
Aug 26 22:58:14 pp3345-Laptop kernel: common_interrupt+0x93/0x93
Aug 26 22:58:14 pp3345-Laptop kernel: RIP: 0010:cpuidle_enter_state+0x12b/0x2d0
Aug 26 22:58:14 pp3345-Laptop kernel: RSP: 0018:ffffac21c0cebe58 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffae
Aug 26 22:58:14 pp3345-Laptop kernel: RAX: ffff9d5f8151a280 RBX: 000000034bbf419e RCX: 000000000000001f
Aug 26 22:58:14 pp3345-Laptop kernel: RDX: 000000034bbf419e RSI: ffff9d5f81517a98 RDI: 0000000000000000
Aug 26 22:58:14 pp3345-Laptop kernel: RBP: ffffac21c0cebe98 R08: cccccccccccccccd R09: 0000000000000008
Aug 26 22:58:14 pp3345-Laptop kernel: R10: ffffac21c0cebe28 R11: 0000000000000002 R12: ffff9d5f81522920
Aug 26 22:58:14 pp3345-Laptop kernel: R13: 0000000000000000 R14: 0000000000000001 R15: ffffffffa7f81938
Aug 26 22:58:14 pp3345-Laptop kernel: </IRQ>
Aug 26 22:58:14 pp3345-Laptop kernel: ? cpuidle_enter_state+0x11b/0x2d0
Aug 26 22:58:14 pp3345-Laptop kernel: cpuidle_enter+0x17/0x20
Aug 26 22:58:14 pp3345-Laptop kernel: call_cpuidle+0x23/0x40
Aug 26 22:58:14 pp3345-Laptop kernel: do_idle+0x18a/0x1e0
Aug 26 22:58:14 pp3345-Laptop kernel: cpu_startup_entry+0x71/0x80
Aug 26 22:58:14 pp3345-Laptop kernel: start_secondary+0x154/0x190
Aug 26 22:58:14 pp3345-Laptop kernel: secondary_startup_64+0x9f/0x9f
Aug 26 22:58:14 pp3345-Laptop kernel: handlers:
Aug 26 22:58:14 pp3345-Laptop kernel: [<ffffffffc05700b0>] i801_isr [i2c_i801]
Aug 26 22:58:14 pp3345-Laptop kernel: Disabling IRQ #16
Aug 26 22:58:14 pp3345-Laptop kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 239
Aug 26 22:58:14 pp3345-Laptop kernel: nvidia 0000:06:00.0: enabling device (0006 -> 0007)
Aug 26 22:58:14 pp3345-Laptop kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module 384.59 Wed Jul 19 23:53:34 PDT 2017 (using threaded interrupts)
Aug 26 22:58:14 pp3345-Laptop kernel: nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 238
Aug 26 22:58:14 pp3345-Laptop kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 384.59 Wed Jul 19 23:46:42 PDT 2017
Aug 26 22:58:14 pp3345-Laptop kernel: [drm] [nvidia-drm] [GPU ID 0x00000600] Loading driver
Aug 26 22:58:14 pp3345-Laptop kernel: ACPI Warning: \_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
Aug 26 22:58:14 pp3345-Laptop kernel: ACPI Warning: \_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
Aug 26 22:58:14 pp3345-Laptop kernel: ACPI Warning: \_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
Aug 26 22:58:14 pp3345-Laptop kernel: ACPI Warning: \_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
Aug 26 22:58:14 pp3345-Laptop kernel: ACPI Warning: \_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
Aug 26 22:58:14 pp3345-Laptop kernel: ACPI Warning: \_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
Aug 26 22:58:14 pp3345-Laptop kernel: ACPI Warning: \_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
Aug 26 22:58:14 pp3345-Laptop kernel: ACPI Warning: \_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
Aug 26 22:58:19 pp3345-Laptop kernel: ACPI Warning: \_SB.PCI0.RP09.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170303/nsarguments-95)
Aug 26 22:58:19 pp3345-Laptop kernel: NVRM: RmInitAdapter failed! (0x12:0x45:1825)
Aug 26 22:58:19 pp3345-Laptop kernel: NVRM: rm_init_adapter failed for device bearing minor number 0
Aug 26 22:58:19 pp3345-Laptop kernel: [drm:nvidia_drm_load [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000600] Failed to allocate NvKmsKapiDevice
Aug 26 22:58:19 pp3345-Laptop kernel: [drm:nvidia_drm_probe_devices [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000600] Failed to register device
It looks like a race condition to me as the unhandled IRQ seems to originate from the GPU, but can’t be handled since the driver isn’t yet loaded. A reboot will usually fix the issue, but it seems to happen every ~3rd or 4th boot, thus it’s a bit annoying.
Another issue I am experiencing with KMS enabled is that gnome-shell starts eating up my CPU as long as the display is off if the laptop was in standby at least once.
Boot system
Lock session (=> screen off)
Everything is fine, every time
Unlock
Put device to standby
Wake up, unlock
Lock session
gnome-shell hogs CPU at 100% usage - from now on this happens every time I lock the screen as long as the display is off (CPU consumption is reduced to normal as soon as screen is turned on, even when still on lockscreen)
This is 100% reproducible for me, but only happens when using the NVIDIA driver and only with nvidia-drm.modeset=1 set.
nvidia-drm.modeset=1 enables nvidia egl-wayland support, GDM/mutter tries to use it even though it doesn’t support egl-wayland.
The high CPU load is caused by GDM/mutter using mesa fallback driver.
Why blame nvidia for a gnome issue?, have you tried disabling wayland in gdm custom.conf?
I am exclusively running Xorg (as visible above due to the fact that I posted a snippet from my Xorg.conf), hence disabling Wayland via /etc/gdm/custom.conf doesn’t make any difference. Even if it did, the other issues about the non-working PowerMizer and the race condition during boot still persist. Those obviously can’t be issues of GNOME and must be caused by the NVIDIA driver.
Quick note: you don’t have acpid running, so the driver simply doesn’t know if you’re on battery or not. That’s mentioned in the log.
The Performance State of nvidia-smi is different from the Performance Level of nvidia-settings
nvidia-smi: lowest=P12(I think)-> highest=P0
nvidia-settings: lowest=0->highest=3,4,5 depending on GPU.
Edit: the Powermizer levels are: lowest=0x3->highest=0x1
I do know that acpid is required for PowerMizer to work correctly, however, I fixed that already some time ago (after the log file from my first post was created). PowerMizer works perfectly fine with the settings from my Xorg.conf when KMS is disabled.