pop-os / cosmic-comp

Compositor for the COSMIC desktop environment
GNU General Public License v3.0
487 stars 89 forks source link

"Failed to submit rendering: Failed to submit result for display" #872

Closed Mafrans closed 1 month ago

Mafrans commented 1 month ago

May be a duplicate of https://github.com/pop-os/cosmic-comp/issues/68.

Cosmic-comp renders cosmic-greeter fine (with some graphical glitches but otherwise perfectly functional) but when I attempt to log in I end up in a sort of boot-loop where cosmic-comp restarts itself over and over only to then die with the following error:

Sep 19 19:29:15 DESKTOP-859OH10.viasat.nds.com cosmic-comp[2343]: Failed to submit rendering: Failed to submit result for display

                                                                  Caused by:
                                                                      0: The underlying drm surface encountered an error: DRM access error: Page flip commit failed on device `Some("/dev/dri/card0")` (Permission denied (os error 13))
                                                                      1: DRM access error: Page flip commit failed on device `Some("/dev/dri/card0")` (Permission denied (os error 13))
                                                                      2: Permission denied (os error 13)

I have uploaded a journal to https://0x0.st/X3w0.txt

Neofetch output:

OS: Arch Linux x86_64
Host: Laptop 13 (Intel Core Ultra Series 1) A2
Kernel: 6.10.10-arch1-1
CPU: Intel Ultra 5 125H (18) @ 4.500GHz
GPU: Intel Arc Graphics
Drakulix commented 1 month ago

Well that log certainly doesn't look like a drm flip error, but like a crash due to llvmpipe being used. Which is weird, but definitely points to a configuration error on your part. You are missing GL drivers for your GPU.

Mafrans commented 1 month ago

Both mesa (which provides intel iris GL drivers) and intel-media-driver (which provides VA-API) are installed. eglinfo -B shows the following: https://0x0.st/X3x3.txt

Drakulix commented 1 month ago

Surprised it would select llvmpipe then. Could you post the output of drm_info?

Mafrans commented 1 month ago

Could you post the output of drm_info?

Rather long, uploaded to https://0x0.st/X339.txt

Mafrans commented 1 month ago

It has been some time, and I thought I'd take a look at this once again. Updating cosmic to its latest version does not resolve the issue, but it does reach slightly further into the rendering process before llvmpipe once again crashes. Previously, no information was rendered before the segfault, but now the background picture is rendered correctly for about one second before crashing.

I was suspecting Intel Arc's npu drivers not being installed might be causing the issues, but while updating them did resolve one of the error messages the issue persists.

sudo journalctl -b output: https://0x0.st/Xgl1.txt

Mafrans commented 1 month ago

Closing this issue as I found the solution, which I'll try my best to explain below in case someone else has this issue in the future. Some digging and experimenting led me to this post on the Arch forums about simpledrm taking up the /dev/dri/card0 slot and causing rendering issues, apparently this happens when the simpledrm driver loads before your native gpu driver, which causes a fallback to llvmpipe (and, in the case of COSMIC, crashes).

The solution I found was to simply configure my bootloader to blacklist the simpledrm platform initializer by adding the initcall_blacklist=simpledrm_platform_driver_init parameter to my blacklist, this is not the best solution as it disables simpledrm completely, but for my purposes it appears to do the trick. Would appreciate if someone with a little more Linux-knowledge could suggest a better alternative.

Elias-Graf commented 1 month ago

I'm getting this error only after I suspend and try to wake up the system again (to be fair I can't even put the system to sleep, since it just immediately starts itself again, not sure if that is related). I'm getting no output on my monitors, even though the computer is definitely running. I can switch to a TTY and get the login screen, switching back to the cosmic session, my monitors again receive no signal. I get thousands upon thousands of these errors > 150k lines in a couple of minutes.

Relevant log might be:

``` Oct 02 17:15:55 perseus .cosmic-comp-wrapped[2246]: Failed to submit rendering: Failed to submit result for display Caused by: 0: The underlying drm surface encountered an error: DRM access error: Page flip commit failed on device `Some("/dev/dri/card1")` (Invalid argument (os error 22)) 1: DRM access error: Page flip commit failed on device `Some("/dev/dri/card1")` (Invalid argument (os error 22)) 2: Invalid argument (os error 22) Oct 02 17:15:55 perseus systemd[1]: Stopped target Suspend. Oct 02 17:15:55 perseus systemd[1]: Starting Post-Resume Actions... Oct 02 17:15:55 perseus ModemManager[17828]: [sleep-monitor-systemd] system is resuming Oct 02 17:15:55 perseus systemd-logind[1655]: Operation 'suspend' finished. Oct 02 17:15:55 perseus systemd[1]: Reached target Suspend. Oct 02 17:15:55 perseus systemd[1]: Stopped target Sleep. Oct 02 17:15:55 perseus systemd[1]: Finished System Suspend. Oct 02 17:15:55 perseus kernel: NVRM: Xid (PCI:0000:04:00): 13, pid='', name=, Graphics Exception: ChID 0008, Class 0000c597, Offset 00000000, Data 00000000 Oct 02 17:15:55 perseus kernel: NVRM: Xid (PCI:0000:04:00): 13, pid='', name=, Graphics Exception: ESR 0x405848=0x80000000 Oct 02 17:15:55 perseus kernel: NVRM: Xid (PCI:0000:04:00): 13, pid='', name=, Graphics Exception: ESR 0x405840=0xa2040800 Oct 02 17:15:55 perseus kernel: NVRM: Xid (PCI:0000:04:00): 13, pid='', name=, Graphics Exception: Shader Program Header 18 Error Oct 02 17:15:55 perseus kernel: NVRM: Xid (PCI:0000:04:00): 13, pid='', name=, Graphics Exception: Shader Program Header 11 Error Oct 02 17:15:55 perseus kernel: NVRM: GPU at PCI:0000:04:00: GPU-328434f3-c171-6083-925c-f7a6f675fa81 Oct 02 17:15:55 perseus .cosmic-comp-wrapped[2246]: Failed to submit rendering: Failed to submit result for display Caused by: 0: The underlying drm surface encountered an error: DRM access error: Page flip commit failed on device `Some("/dev/dri/card1")` (Invalid argument (os error 22)) 1: DRM access error: Page flip commit failed on device `Some("/dev/dri/card1")` (Invalid argument (os error 22)) 2: Invalid argument (os error 22) Oct 02 17:15:55 perseus wireplumber[2409]: wplua: [string "alsa.lua"]:182: attempt to concatenate a nil value (local 'node_name') stack traceback: [string "alsa.lua"]:182: in function <[string "alsa.lua"]:175> Oct 02 17:15:55 perseus dbus-daemon[1515]: [system] Rejected send message, 7 matched rules; type="method_call", sender=":1.67" (uid=1000 pid=2465 comm="cosmic-applet-network" label="kernel") interface="org.freedesktop.NetworkManager.Settings" member="LoadConnections" error name="(unset)" requested_reply="0" destination="org.freedesktop.NetworkManager" (uid=0 > Oct 02 17:15:55 perseus dbus-daemon[1515]: [system] Rejected send message, 7 matched rules; type="method_call", sender=":1.68" (uid=1000 pid=2437 comm="cosmic-applet-network" label="kernel") interface="org.freedesktop.NetworkManager.Settings" member="LoadConnections" error name="(unset)" requested_reply="0" destination="org.freedesktop.NetworkManager" (uid=0 > Oct 02 17:15:55 perseus systemd[1]: systemd-suspend.service: Deactivated successfully. Oct 02 17:15:55 perseus systemd-sleep[142851]: Successfully thawed unit 'user.slice'. Oct 02 17:15:55 perseus kernel: PM: suspend exit Oct 02 17:15:55 perseus bluetoothd[1513]: Controller resume with wake event 0x0 Oct 02 17:15:55 perseus systemd-sleep[142851]: System returned from sleep operation 'suspend'. Oct 02 17:15:55 perseus kernel: random: crng reseeded on system resumption Oct 02 17:15:55 perseus kernel: Restarting tasks ... done. Oct 02 17:15:55 perseus kernel: OOM killer enabled. Oct 02 17:15:55 perseus kernel: usb usb2: root hub lost power or was reset Oct 02 17:15:55 perseus kernel: usb usb1: root hub lost power or was reset Oct 02 17:15:55 perseus kernel: xhci_hcd 0000:04:00.2: xHC error in resume, USBSTS 0x401, Reinit Oct 02 17:15:55 perseus kernel: ata4.00: configured for UDMA/133 Oct 02 17:15:55 perseus kernel: sd 3:0:0:0: [sda] Starting disk Oct 02 17:15:55 perseus kernel: ata6.00: configured for UDMA/133 Oct 02 17:15:55 perseus kernel: ata6.00: supports DRM functions and may not be fully accessible Oct 02 17:15:55 perseus kernel: ata10.00: configured for UDMA/133 Oct 02 17:15:55 perseus kernel: sd 5:0:0:0: [sdb] Starting disk Oct 02 17:15:55 perseus kernel: sd 9:0:0:0: [sdc] Starting disk Oct 02 17:15:55 perseus kernel: ata6.00: supports DRM functions and may not be fully accessible Oct 02 17:15:55 perseus kernel: ata6.00: Entering active power mode Oct 02 17:15:55 perseus kernel: ata6: SATA link up 6.0 Gbps (SStatus 133 SControl 300) Oct 02 17:15:55 perseus kernel: ata10.00: Entering active power mode Oct 02 17:15:55 perseus kernel: ata4.00: Entering active power mode Oct 02 17:15:55 perseus kernel: ata10: SATA link up 6.0 Gbps (SStatus 133 SControl 300) Oct 02 17:15:55 perseus kernel: ata4: SATA link up 6.0 Gbps (SStatus 133 SControl 300) Oct 02 17:15:55 perseus kernel: ata12: SATA link down (SStatus 0 SControl 300) Oct 02 17:15:55 perseus kernel: ata11: SATA link down (SStatus 0 SControl 300) Oct 02 17:15:55 perseus kernel: usb 7-4.1: reset high-speed USB device number 3 using xhci_hcd Oct 02 17:15:55 perseus kernel: nvme nvme0: 32/0/0 default/read/poll queues Oct 02 17:15:55 perseus kernel: nvme nvme0: Shutdown timeout set to 10 seconds Oct 02 17:15:55 perseus kernel: serial 00:04: activated Oct 02 17:15:55 perseus kernel: ACPI: PM: Waking up from system sleep state S3 ```

Is this related / the same as your error @Mafrans ? I do have some logs regarding "simpledrm", but they are nowhere near the period where the errors occur.

jokeyrhyme commented 1 day ago

I had this happen on my Dell laptop, Arch Linux, Intel + nVidia GPU, but it was seemingly fixed after updating to alpha 3

However, alpha 2 always worked just fine on my gaming PC, Arch Linux, AMD + AMD GPU, so I'm not sure what differences/commits are and aren't relevant