430.40 driver failing to load using Fedora 30 KDE

Firstly, I apologise for my topic title being generic and uninformative but I am rather inexperienced with debugging these kind of issues and really just need somebody to point me in the right direction.

I have recently bought a Metabox laptop (Clevo NH58RH) with a GeForce GTX 1050 3GB Max-Q card pre-installed.

I installed Fedora 30 (KDE spin). The OS installed fine and generally operates well using the default drivers with the exception being that I can’t seem to use suspend/hibernate (Both fail to resume with slightly different results). In the hope of fixing this issue, I’d like to try the nvidia drivers. Maybe this is a false hope?

Following an online guide, I ran the following commands to install the drivers:

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

dnf install xorg-x11-drv-nvidia akmod-nvidia

After rebooting into the kernel the driver fails to load. There are some errors in the boot log but as it is a new system, I’m unsure whether the errors are a result of a driver issue, a BIOS setting or potentially a hardware issue?

Here is the output using the nvidia-bug-report utility:
https://paste.fedoraproject.org/paste/Zpgas0R9UmHjzpXtS1v2Kg

Any help pointing me in the right direction would be greatly appreciated and let me know if I can provide any further info to help debug the issue.

Thanks

EDIT:
Turns out the driver was loading correctly.
The issue was actually that my system has Intel optimus technology (I wan’t aware).
If you’re unsure, you can determine if you have optimus by running:

lspci -vnn | grep '
If this returns two video cards in the output with one being an Intel Integrated Graphics Controller and the other being an NVIDIA Corporation chip, then you probably have an optimus notebook.

<b>SOLUTION:</b>
With an optimus laptop, there a are a couple of xrandr commands that need to be run on startup. Currently these are only provided in the standard GDM/Gnome environment.
For KDE, using the SDDM display manager, these commands need to be added to <i><b>/etc/sddm/Xsetup</b></i> (This has to be done as root)
<b>Not</b> <i>/usr/share/sddm/scripts/Xsetup</i> as the wiki states.

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto


For other display managers see this link
https://wiki.archlinux.org/index.php/NVIDIA_Optimus

Thanks to <b>generix</b> for all their help solving this one.'[030[02]\]'

If this returns two video cards in the output with one being an Intel Integrated Graphics Controller and the other being an NVIDIA Corporation chip, then you probably have an optimus notebook.

SOLUTION:
With an optimus laptop, there a are a couple of xrandr commands that need to be run on startup. Currently these are only provided in the standard GDM/Gnome environment.
For KDE, using the SDDM display manager, these commands need to be added to /etc/sddm/Xsetup (This has to be done as root)
Not /usr/share/sddm/scripts/Xsetup as the wiki states.

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

For other display managers see this link
https://wiki.archlinux.org/index.php/NVIDIA_Optimus

Thanks to generix for all their help solving this one.

According to the logs, the driver loads fine, no problems visible. Do you experience any odd behaviour?

Yes, I just get a black screen when booting into the kernel. Perhaps it’s not something to do with the driver but there are some messages in the boot log which led me to believe it was.
I’ve attached the nvidia related messages in the boot log retrieved using: journalctl -b |grep nvidia

Is there anything else I can provide to help debug?
boot_nvidia.log (3.72 KB)

The boot messages are normal, you have just initcall_debug kernel parameter set, so it’s a bit more verbose.
Since this is an Optimus notebook, on DE start two xrandr commands have to be run. Fedora currently only provides this for the standard GDM/Gnome environment so since you switched to KDE, you’ll have to add them yourself. I suspect you’re using SDDM as login manager, please follow this:
[url]NVIDIA Optimus - ArchWiki

Ah, I wasn’t aware my system was optimus-enabled.
I’ve added the xrandr commands but unfortunately I still have the same issue (black screen) and still see the message saying that it’s falling back to Nouveau. There might be some additional logging around the time the driver is loading which I’ll attach when I get home.

Let me know if there are any other commands I can run to debug or logs that will help.

Please post the output of
ps a |grep -i dm
to check which login manager you’re running.

1243 tty1     Ssl+   0:00 /usr/libexec/Xorg -nolisten tcp -auth /var/run/sddm/{4a3c4715-9a2e-4d8f-8fc9-580d71b43fe0} -background none -noreset -displayfd 18 -seat seat0 vt1
1441 tty2     S+     0:00 grep --color=auto -i dm

Looks like it is SDDM

What’s the output of
ls -l /usr/share/sddm/scripts/Xsetup
and
cat /usr/share/sddm/scripts/Xsetup

ls -l /usr/share/sddm/scripts/Xsetup

-rwxr-xr-x. 1 root root 138 Aug 20 09:19 /usr/share/sddm/scripts/Xsetup

cat /usr/share/sddm/scripts/Xsetup

#!/usr/bin/sh
# Xsetup - run as root before the login dialog appears

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

Also attached the full boot log up to the point where the driver falls back to nouveau.

boot.log (139 KB)

There’s no fallback to nouveau, you have to read it like:
Condition check resulted in:
“Fallback to nouveau as nvidia did not load”
being skipped.
The fallback was skipped.
Please attach
/var/log/sddm.log

Ah right, thanks. Good to know.
/var/log/sddm.log doesn’t seem to exist.

Looking at the process list in #7 again, there’s no sddm process running, seems to crash. Does
sudo journalctl -b0 --no-pager _COMM=sddm
yield some info?

Yields no entries unfortunately.

Thanks for trying to help me out with this by the way.

Really odd, an X server seems to be started under sddm authority but no trace of sddm can be found. Please post the output of
systemctl status display-manager --no-pager

● sddm.service - Simple Desktop Display Manager
   Loaded: loaded (/usr/lib/systemd/system/sddm.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-08-20 21:55:14 AEST; 1h 1min ago
     Docs: man:sddm(1)
           man:sddm.conf(5)
 Main PID: 1276 (sddm)
    Tasks: 5 (limit: 4915)
   Memory: 90.0M
   CGroup: /system.slice/sddm.service
           ├─1276 /usr/bin/sddm
           └─1279 /usr/libexec/Xorg -nolisten tcp -auth /var/run/sddm/{ad39bbe4-091d-4100-9002-cec8b8eec51d} -background none -noreset -displayfd 18 -seat seat0 vt1

Aug 20 21:55:14 devbox systemd[1]: Started Simple Desktop Display Manager.
Aug 20 21:55:15 devbox sddm-helper[1293]: pam_unix(sddm-greeter:session): session opened for user sddm by (uid=0)

Don’t know why ps didn’t show it. Does
sudo journalctl -b0 --no-pager |grep -i sddm
output anything?

Aug 20 21:55:10 devbox systemd-tmpfiles[657]: [/usr/lib/tmpfiles.d/sddm.conf:1] Line references path below legacy directory /var/run/, updating /var/run/sddm → /run/sddm; please update the tmpfiles.d/ drop-in file accordingly.
Aug 20 21:55:11 devbox systemd-tmpfiles[1002]: [/usr/lib/tmpfiles.d/sddm.conf:1] Line references path below legacy directory /var/run/, updating /var/run/sddm → /run/sddm; please update the tmpfiles.d/ drop-in file accordingly.
Aug 20 21:55:14 devbox audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=sddm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Aug 20 21:55:15 devbox audit[1293]: USER_AUTH pid=1293 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:authentication grantors=pam_permit acct="sddm" exe="/usr/libexec/sddm-helper" hostname=? addr=? terminal=? res=success'
Aug 20 21:55:15 devbox audit[1293]: USER_ACCT pid=1293 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_permit acct="sddm" exe="/usr/libexec/sddm-helper" hostname=? addr=? terminal=? res=success'
Aug 20 21:55:15 devbox audit[1293]: CRED_ACQ pid=1293 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_permit acct="sddm" exe="/usr/libexec/sddm-helper" hostname=? addr=? terminal=? res=success'
Aug 20 21:55:15 devbox sddm-helper[1293]: pam_unix(sddm-greeter:session): session opened for user sddm by (uid=0)
Aug 20 21:55:15 devbox systemd-logind[1136]: New session c1 of user sddm.
Aug 20 21:55:15 devbox audit[1295]: USER_ACCT pid=1295 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="sddm" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Aug 20 21:55:15 devbox systemd[1295]: pam_unix(systemd-user:session): session opened for user sddm by (uid=0)
Aug 20 21:55:15 devbox audit[1295]: USER_START pid=1295 uid=0 auid=988 ses=1 subj=system_u:system_r:init_t:s0 msg='op=PAM:session_open grantors=pam_selinux,pam_selinux,pam_loginuid,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="sddm" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Aug 20 21:55:15 devbox systemd[1]: Started Session c1 of user sddm.
Aug 20 21:55:15 devbox audit[1293]: USER_START pid=1293 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_unix,pam_systemd acct="sddm" exe="/usr/libexec/sddm-helper" hostname=? addr=? terminal=:0 res=success'
Aug 20 21:55:16 devbox sddm-greeter[1306]: Loading file:///usr/share/sddm/themes/breeze/Main.qml...
Aug 20 21:55:16 devbox sddm-greeter[1306]: QObject: Cannot create children for a parent that is in a different thread.
Aug 20 21:55:16 devbox sddm-greeter[1306]: QObject: Cannot create children for a parent that is in a different thread.
Aug 20 21:55:16 devbox sddm-greeter[1306]: QObject: Cannot create children for a parent that is in a different thread.
Aug 20 21:55:16 devbox sddm-greeter[1306]: QObject: Cannot create children for a parent that is in a different thread.
Aug 20 21:55:16 devbox sddm-greeter[1306]: QObject::installEventFilter(): Cannot filter events for objects in a different thread.
Aug 20 21:55:16 devbox sddm-greeter[1306]: Cannot watch QRC-like path ":/icons/hicolor/index.theme"
Aug 20 21:55:16 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/WallpaperFader.qml:119:13: QML PropertyChanges: Cannot assign to non-existent property "opacity"
Aug 20 21:55:16 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/WallpaperFader.qml:120:17: Unable to assign [undefined] to QObject*
Aug 20 21:55:16 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/UserDelegate.qml:174: ReferenceError: ColorScope is not defined
Aug 20 21:55:16 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/UserDelegate.qml:161:9: Unable to assign [undefined] to QColor
Aug 20 21:55:16 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/UserDelegate.qml:160:9: Unable to assign [undefined] to int
Aug 20 21:55:16 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/Clock.qml:40:13: Unable to assign [undefined] to QColor
Aug 20 21:55:16 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/Clock.qml:39:13: Unable to assign [undefined] to int
Aug 20 21:55:16 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/Clock.qml:47:13: Unable to assign [undefined] to QColor
Aug 20 21:55:16 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/Clock.qml:46:13: Unable to assign [undefined] to int
Aug 20 21:55:16 devbox sddm-greeter[1306]: QXcbConnection: XCB error: 146 (Unknown), sequence: 185, resource id: 0, major code: 139 (Unknown), minor code: 20
Aug 20 21:56:16 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/WallpaperFader.qml:139:17: Unable to assign [undefined] to QObject*
Aug 20 21:56:16 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/WallpaperFader.qml:138:13: QML PropertyChanges: Cannot assign to non-existent property "opacity"
Aug 20 21:58:15 devbox sddm-greeter[1306]: UdevQt: unhandled device action "bind"
Aug 20 21:58:15 devbox sddm-greeter[1306]: UdevQt: unhandled device action "bind"
Aug 20 21:59:49 devbox sddm-greeter[1306]: Error getting props: "org.freedesktop.DBus.Error.UnknownMethod" "No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/UDisks2/drives/FUJITSU_MJA2250BH_G2_K908T962BNMA"
Aug 20 21:59:49 devbox sddm-greeter[1306]: UdevQt: unhandled device action "unbind"
Aug 20 21:59:49 devbox sddm-greeter[1306]: UdevQt: unhandled device action "unbind"
Aug 20 22:10:53 devbox systemd-tmpfiles[1653]: [/usr/lib/tmpfiles.d/sddm.conf:1] Line references path below legacy directory /var/run/, updating /var/run/sddm → /run/sddm; please update the tmpfiles.d/ drop-in file accordingly.
Aug 20 22:25:09 devbox sddm-greeter[1306]: UdevQt: unhandled device action "bind"
Aug 20 22:25:09 devbox sddm-greeter[1306]: UdevQt: unhandled device action "bind"
Aug 20 22:52:28 devbox sddm-greeter[1306]: Error getting props: "org.freedesktop.DBus.Error.UnknownMethod" "No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/UDisks2/drives/FUJITSU_MJA2250BH_G2_K908T962BNMA"
Aug 20 22:52:28 devbox sddm-greeter[1306]: UdevQt: unhandled device action "unbind"
Aug 20 22:52:28 devbox sddm-greeter[1306]: UdevQt: unhandled device action "unbind"
Aug 20 22:53:18 devbox sddm-greeter[1306]: UdevQt: unhandled device action "bind"
Aug 20 22:53:18 devbox sddm-greeter[1306]: UdevQt: unhandled device action "bind"
Aug 20 22:54:26 devbox sddm-greeter[1306]: Error getting props: "org.freedesktop.DBus.Error.UnknownMethod" "No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/UDisks2/drives/FUJITSU_MJA2250BH_G2_K908T962BNMA"
Aug 20 22:54:26 devbox sddm-greeter[1306]: UdevQt: unhandled device action "unbind"
Aug 20 22:54:26 devbox sddm-greeter[1306]: UdevQt: unhandled device action "unbind"
Aug 20 22:56:05 devbox sddm-greeter[1306]: UdevQt: unhandled device action "bind"
Aug 20 22:56:05 devbox sddm-greeter[1306]: UdevQt: unhandled device action "bind"
Aug 20 22:57:03 devbox sddm-greeter[1306]: Error getting props: "org.freedesktop.DBus.Error.UnknownMethod" "No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/UDisks2/drives/FUJITSU_MJA2250BH_G2_K908T962BNMA"
Aug 20 22:57:03 devbox sddm-greeter[1306]: UdevQt: unhandled device action "unbind"
Aug 20 22:57:03 devbox sddm-greeter[1306]: UdevQt: unhandled device action "unbind"
Aug 20 23:00:17 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/WallpaperFader.qml:119:13: QML PropertyChanges: Cannot assign to non-existent property "opacity"
Aug 20 23:01:17 devbox sddm-greeter[1306]: file:///usr/share/sddm/themes/breeze/components/WallpaperFader.qml:138:13: QML PropertyChanges: Cannot assign to non-existent property "opacity"
Aug 20 23:10:18 devbox sddm-greeter[1306]: UdevQt: unhandled device action "bind"
Aug 20 23:10:18 devbox sddm-greeter[1306]: UdevQt: unhandled device action "bind"

Maybe something stupid, please absolute paths in Xsetup:

#!/usr/bin/sh
# Xsetup - run as root before the login dialog appears

/usr/bin/xrandr --setprovideroutputsource modesetting NVIDIA-0
/usr/bin/xrandr --auto

I’ve solved it. I noticed a README.scripts file in /usr/share/sddm/scripts directory.

The README states:
“This scripts dir contains only samples, but are generally not used directly.
In practice, sddm runtime uses items under /etc/sddm”

So I added the xrandr commands to /etc/sddm/Xsetup, rebooted and successfully launched.

Thanks for all your help generix!