Problems with xfwm4 / nouveau

On a different post, @Yochanan asked me to create a new post to avoid an XY problem, so here it is.

Data: Using XFCE on an Nvidia GeForce GT710 video card.

$ inxi -zv8  ##  graphics
Graphics:
  Device-1: NVIDIA GK208B [GeForce GT 710] vendor: Micro-Star MSI
    driver: nouveau v: kernel non-free: series: 470.xx+
    status: legacy-active (EOL~2024-09-xx) arch: Fermi-2 code: GF119/GK208
    process: TSMC 28nm built: 2010-2016 pcie: gen: 2 speed: 5 GT/s lanes: 8
    ports: active: HDMI-A-1 empty: DVI-D-1,VGA-1 bus-ID: 2d:00.0
    chip-ID: 10de:128b class-ID: 0300 temp: 41.0 C
  Display: x11 server: X.Org v: 21.1.13 compositor: xfwm4 v: 4.18.0 driver:
    X: loaded: modesetting alternate: fbdev,vesa dri: nouveau gpu: nouveau
    display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: HDMI-A-1 mapped: HDMI-1 model: Dell SE2717H/HX serial: <filter>
    built: 2019 res: 1920x1080 hz: 60 dpi: 82 gamma: 1.2 chroma: red: x: 0.639
    y: 0.341 green: x: 0.294 y: 0.624 blue: x: 0.153 y: 0.051 white: x: 0.314
    y: 0.329 size: 598x336mm (23.54x13.23") diag: 686mm (27") ratio: 16:9
    modes: 1920x1080, 1920x1080i, 1600x900, 1280x1024, 1152x864, 1280x720,
    1024x768, 800x600, 720x576, 720x480, 640x480, 720x400
  API: OpenGL Message: Unable to show GL data. glxinfo is missing.


$ lspci -k
2d:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 710] (rev a1)
	Subsystem: Micro-Star International Co., Ltd. [MSI] Device 8c93
	Kernel driver in use: nouveau
	Kernel modules: nouveau


$ mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2024.05.06                true            PCI


Warning: No installed USB configs!

$ mhwd-kernel -li
Currently running: 6.6.47-1-MANJARO (linux66)
The following kernels are installed in your system:
   * linux66

Problem: Over the past months, two main kinds of graphics problems have started appearing, and new symptoms show up only after a system upgrade (pacman -Syu).

  • Desktop environment would randomly (once every 10 minutes or so) stop updating part of the screen, so one rectangle would update but the rest of the screen would freeze, irrespective of where the windows were. I learned to work around this with a pkill xfwm4 in a terminal (using Ctrl-Alt-F3 to go outside the desktop environment so the command is visible on screen). The file $HOME/.xsession_errors does not show anything relevant.

  • More recently, display update frame rate would fall a lot in specific circumstances. Running the GPU drawing test in hardinfo showed a huge slowdown in the “Shape Drawing” test where it draws a lot of empty rectangles on screen, where it would only show 2 to 3 frames per second. Other parts of the GPU drawing test were fast enough, even the “filled rectangles” test. In VLC, sometimes the video would freeze with the console error nouveau: kernel rejected pushbuf: no such device and VLC would need to be killed. I have worked around it by using only software rendering and checking various “Hurry Up” checkboxes in VLC to improve performance.

What I have tried so far:

Searching online for “nouveau” and the error messages I get, I found these pages:

Following the above, I updated the nouveau firmware for my card using the instructions at VideoAcceleration · freedesktop.org and tried re-enabling hardware acceleration in VLC and Firefox and elsewhere, but they didn’t do anything (i.e., they still cause the same freezes and errors), so I disabled hardware acceleration again and re-enabled by workarounds described above.

Help request: If someone has solution suggestions for the problems I described, I am happy to try them out.

Is there a reason you specifically want to use the nouveau reverse-engineered driver?

Please also show what mhwd offers:

mhwd -l
$ mhwd -l
> 0000:2d:00.0 (0300:10de:128b) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
    video-nvidia-470xx            2023.03.23               false            PCI
    video-nvidia-390xx            2023.03.23               false            PCI
           video-linux            2024.05.06                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:27:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2023.09.12                true            PCI

I am no expert on video cards and driver management. I have seen regular posts specifically about the non-free Nvidia drivers during system update announcements, especially when the kernel is updated, so nouveau seemed to me to be easier during system updates.

You only have the possibility of older proprietary drivers.

Nothing is going to change with those really.

But they will provide improved performance in the vast majority of cases.

Nvidia being proprietary … you will only get decent results from the proprietary drivers.

So lets start there.

First making sure you are up to date and all …

sudo pacman-mirrors -f && sudo pacman -Syu
sudo mhwd -i pci video-nvidia-470xx

After a reboot lets see inxi again;

inxi -Farz

I am also using a NVidia GT70 with XFCE 4, Kernel 6.10, but with the proprietary Nvidia drivers.

inxi -G
Graphics:
  Device-1: NVIDIA GK208B [GeForce GT 710] driver: nvidia v: 470.256.02
  Device-2: Sunplus Innovation FHD Camera Microphone
    driver: snd-usb-audio,uvcvideo type: USB
  Display: x11 server: X.org v: 1.21.1.13 driver: X: loaded: N/A
    failed: nvidia gpu: nvidia resolution: <missing: xdpyinfo/xrandr>
  API: EGL v: 1.5 drivers: kms_swrast,nvidia,swrast
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 470.256.02
    renderer: NVIDIA GeForce GT 710/PCIe/SSE2

I can relate to your reservation that the proprietary drivers may cause issues during updates, which I encountered twice (if memory serves my right). But these were only during kernel updates and they were quite easy to solve.

I will stick with the proprietary drivers which run without problems, whereas with nouveau I encountered similar problems, like Zoom crashing during meetings.

So I would also recommend that you switch to the Nvidia drivers and don’t worry about possible problems during updates.