Bug 99335 - nouveau graphics often freezes when using KDE Plasma 5
Summary: nouveau graphics often freezes when using KDE Plasma 5
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/nouveau (show other bugs)
Version: 12.0
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Nouveau Project
QA Contact: Nouveau Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-09 20:04 UTC by Alexander
Modified: 2019-09-18 20:44 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (8.91 KB, text/plain)
2017-01-09 20:04 UTC, Alexander
Details

Description Alexander 2017-01-09 20:04:34 UTC
Created attachment 128839 [details]
dmesg

Nouveau graphics on my system (Gentoo) often freezes with errors in dmesg. 

The system works fine for some time, but starts freezing at random intervals (after 3 mins or 10 mins or 2 hours of work, etc) in random windows (chromium, krusader, smplayer, login screen after auto-lock, etc) and a lot of artifacts appear on the screen. After about 30 secs it freezes completely. My keyboard does not react to any key combinations, mouse pointer moves with lags and mouse buttons do not work so only hard reset helps.

For example, here are two photos of my frozen screen with artifacts:
http://i.imgur.com/vTbrNay.jpg
http://i.imgur.com/YIvEBGn.jpg

I wrote a script that saves dmesg to a file each 5 secs to get error logs. Please find two examples with different errors attached.

I use the following versions of packages:
media-libs/mesa-12.0.1
x11-base/xorg-drivers-1.18-r1
x11-base/xorg-server-1.18.4
x11-drivers/xf86-video-nouveau-1.0.11
x11-libs/libdrm-2.4.70
sys-kernel/hardened-sources-4.7.10

My graphics card is Nvidia GeForce GTS 250 (G92 chip).
Comment 1 Ilia Mirkin 2017-01-09 20:10:25 UTC
If you're interested in continuing to use KDE, I'd recommend adding LIBGL_ALWAYS_SOFTWARE=1 to your environment, and unsetting it only for applications that you want to actually use 3d accel. KDE + nouveau = fail for now. I'm told that some newer versions of ... Qt? KDE? something? detect nouveau and auto-disable the GL backends now. Not sure on the precise specifics.
Comment 2 Ilia Mirkin 2017-01-11 03:59:59 UTC
Apparently Qt/KDE's threading can be disabled with

QSG_RENDER_LOOP=basic

Try putting that into /etc/environment and logging out/in (to make sure that it's there).
Comment 3 Alexander 2017-01-11 07:51:54 UTC
Thanks Ilia. Do you mean that I need to add both LIBGL_ALWAYS_SOFTWARE=1 and QSG_RENDER_LOOP=basic to /etc/environment or either of them? By the way, any of them slows down graphics processing so that watching Youtube or even scrolling pages in browser becomes nightmare due to lags. How can I fight this?
Comment 4 Ilia Mirkin 2017-01-11 15:47:29 UTC
Try it with just

QSG_RENDER_LOOP=basic

in your /etc/environment. Note you need to log out/in in order for changes to take effect.
Comment 5 Alexander 2017-01-11 16:04:39 UTC
I have added QSG_RENDER_LOOP=basic to /etc/environment and then logged out/in, but Chromium is still lagging. According to 'top', kwin_x11 consumes about 90% of CPU.
Comment 6 Ilia Mirkin 2017-01-11 16:08:00 UTC
Does running "glxinfo" show that you're using nouveau or llvmpipe?
Comment 7 Alexander 2017-01-11 16:31:24 UTC
# glxinfo | grep -E "nouveau | llvmpipe"
    Device: llvmpipe (LLVM 3.7, 128 bits) (0xffffffff)
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.7, 128 bits)
Comment 8 Ilia Mirkin 2017-01-11 16:40:36 UTC
(In reply to Alexander from comment #7)
> # glxinfo | grep -E "nouveau | llvmpipe"
>     Device: llvmpipe (LLVM 3.7, 128 bits) (0xffffffff)
> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.7, 128 bits)

OK, so you're still using llvmpipe. You must have a LIBGL_ALWAYS_SOFTWARE=1 left somewhere. (check "env" to see whether that's the case.)
Comment 9 Alexander 2017-01-11 18:23:08 UTC
Thanks. I have added the following to ~/.bashrc:
export "LIBGL_ALWAYS_SOFTWARE=1"

Then I checked 'env' as advised:

# env | grep QSG
QSG_RENDER_LOOP=basic
# env | grep LIBGL
LIBGL_ALWAYS_SOFTWARE=1

However, there is still llvmpipe in glxinfo output.

The system works with no lags, but it froze twice within 5 minutes. So now I have the same as I had initially.
Comment 10 Ilia Mirkin 2017-01-11 18:25:07 UTC
(In reply to Alexander from comment #9)
> Thanks. I have added the following to ~/.bashrc:
> export "LIBGL_ALWAYS_SOFTWARE=1"
> 
> Then I checked 'env' as advised:
> 
> # env | grep QSG
> QSG_RENDER_LOOP=basic

That's good.

> # env | grep LIBGL
> LIBGL_ALWAYS_SOFTWARE=1

That's bad. You don't want this.
Comment 11 Alexander 2017-01-11 18:35:55 UTC
Oh, I see. I thought you meant I should add this by saying "You must have a LIBGL_ALWAYS_SOFTWARE=1 left somewhere." My apologies.

I have removed it and now I have 
# glxinfo | grep -E "nouveau | llvmpipe"
    Vendor: nouveau (0x10de)

Will test it for some time. Thank you.
Comment 12 Alexander 2017-01-11 19:04:00 UTC
No, it froze again.
Comment 13 GitLab Migration User 2019-09-18 20:44:28 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1122.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.