#216 Handle nouveau for wayland
Closed: Fixed by ngompa. Opened by aleasto.

The plasma wayland session doesn't start on nouveau. Or if it does it locks up soon.
You cannot even install the Fedora KDE via the live image because that also boots up a wayland session, unless you know to boot it with nomodeset.

The known workaround is to set QSG_RENDER_LOOP=basic
GloriousEggroll shared this script on #fedora irc, which could be placed in /etc/profile.d/

nvgpu=$(lspci | grep -iE 'VGA|3D' | grep -i nvidia | cut -d ":" -f 3)
nvkernmod=$(lspci -k | grep -iEA3 'VGA|3D' | grep -iA3 nvidia | grep -i 'kernel driver' | grep -iE 'vfio-pci|nvidia')
if [[ ! -z $nvgpu ]]; then
    if [[ -z $nvkernmod  ]]; then
        export QSG_RENDER_LOOP="basic"
    fi
fi

Moreover, thinking at SDDM using wayland in the future, the same workaround should be applied to SDDM.
Naturally sddm does not source /etc/profile.d/ for its own environment, but you could set QSG_RENDER_LOOP=basic in /etc/sysconfig/sddm unconditionally.

This instead could be the proper solution, but it doesn't seem ready yet (i haven't verified if it actually solves this issue) https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10752


Would also be nice to research what other distros are doing for nouveau.

@bskeggs @ajax @airlied do you know if the Mesa MR will land anytime soon?

I'd rather not introduce hacks all over, I'm curious why Qt itself doesn't use basic renderloop itself by default in this case?

Initial comment mentioned this is a "known workaround". Known where? Where is this workaround documented (besides irc)?

A bit of googling suggests here and here and here and many more forums.
I personally remember knowing it for some years.

Qt already disables threading in GLX: https://invent.kde.org/qt/qt/qtbase/-/blob/dev/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp#L589

Probably a similar blacklist could be maintained for https://invent.kde.org/qt/qt/qtdeclarative/-/blob/dev/src/quick/scenegraph/qsgrenderloop.cpp#L196

@apol Does that ring a bell?

Metadata Update from @siosm:
- Issue tagged with: meeting

Seems reasonably small and easy to track and low consequences. I think we should do it.

I'd be more confortable if we could something like (warning: untested):

# Look for nvidia cards
nvgpu=$(lspci | grep -iE 'VGA|3D' | grep -i nvidia | cut -d ":" -f 3)
# Only apply if the nouveau driver is loaded
nvkernmod=$(lspci -k | grep -iEA3 'VGA|3D' | grep -iA3 nouveau | grep -i 'kernel driver' | grep -iE 'vfio-pci|nvidia')
if [[ -n $nvgpu ]] && [[ -n $nvkernmod  ]]; then
    export QSG_RENDER_LOOP="basic"
fi

Alternatively

nouveau=$(lspci -k | grep -iEA3 'VGA|3D' | grep -i 'kernel driver' | grep nouveau)
if [ -n $nouveau ]; then
    export QSG_RENDER_LOOP="basic"
fi

might be simpler.
verified working.

This might be my favourite:

if [ -d /sys/bus/pci/drivers/nouveau ]; then
    export QSG_RENDER_LOOP="basic"
fi

https://pagure.io/fedora-kde/kde-settings/pull-request/6
https://src.fedoraproject.org/rpms/sddm/pull-request/4

Metadata Update from @siosm:
- Issue untagged with: meeting
- Issue tagged with: packaging

Metadata Update from @siosm:
- Issue tagged with: nvidia

This is all obsolete with the latest Mesa in Fedora.

Metadata Update from @ngompa:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

This is all obsolete with the latest Mesa in Fedora.

Was it supposed to fix something? With my 2060 SUPER, F37 loads into a black screen with a Breeze cursor, so I still can't install the OS without nomodeset.

I had tested the F37 live iso at the time, it worked fine.
I can try again today...

@aleasto, any luck?

I started suspecting that my USB-to-DP cable could be the culprit (my card has a VirtualLink USB-C port), so I tried to boot the image using a regular DP-to-DP one, but there was no difference. That said, I noticed that leaving the system without input for a while would produce a message similar to this one: https://i.imgur.com/ql6RhlU.jpeg

Can confirm that I'm able to boot the F37 KDE live CD to desktop and it doesn't hang.
GTX 1080 Ti.

Hmm... https://nouveau.freedesktop.org/FeatureMatrix.html

Apparently, nouveau has limited support for the cards newer than Pascal; might be the cause.

Apparently, nouveau has limited support for the cards newer than Pascal; might be the cause.

Then again, GNOME doesn't break in this manner, so it's likely a Plasma issue.

Metadata