Bug 205049 - garbled graphics
Summary: garbled graphics
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: drivers_video-dri
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-30 11:26 UTC by lechp
Modified: 2020-01-02 15:41 UTC (History)
4 users (show)

See Also:
Kernel Version: 5.2.15-200
Tree: Mainline
Regression: No


Attachments
output of uname -a with garbled graphics (821.19 KB, image/jpeg)
2019-09-30 11:28 UTC, lechp
Details

Description lechp 2019-09-30 11:26:01 UTC
I'm getting severe graphics glitches in the desktop environment (XFCE, Fedora 30, on Lenovo Ideapad 330-15ARR with Ryzen 3), including text, text cursor, images, buttons and other GUI elements including screen brightness pop-ups.
The annoyance level is severe, and usability is also affected. As can be seen in the attachment, the output of "uname -a" is partly garbled. In this case I know roughly what the output should have been, but I would be wary of doing extensive debugging if I can't trust what I see on the screen.

Some of the errors last for about a second before self-correcting. Others persist until some activity like clicking on a button with the mouse 'prompts' the affected area of the display to be refreshed.

How to reproduce:
Normal interaction with D.E. using mouse and keyboard.

Temporary workaround:
Select kernel version 5.1.20x or older when restarting.
Comment 1 lechp 2019-09-30 11:28:37 UTC
Created attachment 285243 [details]
output of uname -a with garbled graphics
Comment 2 Alex Deucher 2019-10-01 13:57:40 UTC
Can you bisect?  Does booting with amdgpu.ppfeaturemask=0xffff3fff or 0xfffdbfff or 0xfffd3fff on the kernel command line in grub help?
Comment 3 lechp 2019-10-07 11:25:19 UTC
Booting with amdgpu.ppfeaturemask=0xffff3fff and the other options gives


"error: ../../grub-core/kern/fs.c:167:invalid file name `amdgpu.ppfeaturemask=0xffff3fff
Press any key to continue..."
Comment 4 Alex Deucher 2019-10-07 13:21:24 UTC
Just append:
amdgpu.ppfeaturemask=0xffff3fff
to the end of the kernel command line in grub.  Replace 0xffff3fff with 0xfffdbfff to try the other option. Repeat with 0xfffd3fff if necessary.
Comment 5 lechp 2019-10-08 10:22:38 UTC
Ok, this is what I've tried: holding shift to force the boot menu to show up, then pressing e to edit the options for kernel version 5.2.17, then appending
amdgpu.ppfeaturemask=0xffff3fff, and finally pressing Ctrl-x.

If I add a space and put the text at the end of the last line with text already on it, the error appears for a few seconds, then the Lenovo splash screen appears indefinitely and nothing else happens until I cycle the power.

On the other hand, if I put the text on a new line, there's no error message and Fedora boots normally, but the graphics issues persist.
I tried a total of 6 different boot edits with amdgpu.ppfeaturemask=0xffff3fff, 
amdgpu.ppfeaturemask=0xfffdbfff, and amdgpu.ppfeaturemask=0xfffd3fff, with the same result each time.
Comment 6 Lukáš Krejčí 2019-10-08 11:52:03 UTC
(In reply to lechp from comment #5)
> If I add a space and put the text at the end of the last line with text
> already on it [...]

You need to append to the line that starts with "linux", not the last line. E.g. if you have something like this:

linux /vmlinuz-3.17.4-301.fc21.x86_64 root=/dev/mapper/fedora-root ro
initrd /initramfs-3.17.4-301.fc21.x86_64.img

You need to change it to this:

linux /vmlinuz-3.17.4-301.fc21.x86_64 root=/dev/mapper/fedora-root ro amdgpu.ppfeaturemask=0xffff3fff
initrd /initramfs-3.17.4-301.fc21.x86_64.img
Comment 7 Lukáš Krejčí 2019-10-08 11:58:44 UTC
Ok, because of the automatic line wrapping, I'll make the example shorter:

change this:

linux /vmlinuz-3.17.4-301.fc21.x86_64 ro
initrd /initramfs-3.17.4-301.fc21.x86_64.img

to this:

linux /vmlinuz-3.17.4-301.fc21.x86_64 ro amdgpu.ppfeaturemask=0xffff3fff
initrd /initramfs-3.17.4-301.fc21.x86_64.img
Comment 8 lechp 2019-10-08 13:12:05 UTC
I added the amdgpu.ppfeaturemask=0xfffxxxxx text directly after the 'ro' as shown, and the fix doesn't seem to have any effect, at least not for 5.2.17-200.
Comment 9 lechp 2019-10-12 09:40:06 UTC
Kernel 5.2.18 has the same problem. What's going on?

I've already increased the default number of old kernels that are kept by grub, from 3 to 5, but at this rate, I'm going to have to either increase it again, or stop updating. The last 'usable' kernel (version 5.1.20-200) has other problems too, including unexplained freezing once or twice a day, and wifi that 'sometimes' stops working after resuming from sleep.

These are all regressions from years ago.
Comment 10 pi_bell 2019-10-18 09:36:08 UTC
Just a quick report that I'm experiencing the same issue(s) as lechp@onet.pl. I'm using a Lenovo T510 running Fedora 30. On my last usable kernel now and will be increasing by own kernel default number from 3 to 5 now. 

Hope there is a fix soon . . .
Comment 11 Alex Deucher 2019-10-18 13:36:44 UTC
Can you bisect?
Comment 12 lechp 2019-11-19 18:05:57 UTC
Is anyone actually working on this problem?
I just upgraded from Fedora 30 to 31, hoping that the upgrade might include other miscellaneous changes that fix the problem, but the problem is EXACTLY THE SAME.

Nothing has changed. I'm starting to lose my mind with this chronic lack of progress.

Support for the Lenovo Ideapad 330 has been been severely broken for at least the last 6-7 kernel versions!

Can you bisect the people supposedly working on the kernel???
Comment 13 Alex Deucher 2019-11-19 18:16:52 UTC
I'm not able to reproduce this on my raven systems.  Could be a mesa issue.  Does setting the R600_DEBUG=nodcc environment variable help?
Comment 14 Pierre-Eric Pelloux-Prayer 2019-11-19 20:01:51 UTC
This bug looks similar to https://bugs.freedesktop.org/show_bug.cgi?id=111122 - so indeed using R600_DEBUG=nodcc might be a workaround.
Comment 15 Pierre-Eric Pelloux-Prayer 2019-11-21 13:45:45 UTC
I opened a Merge Request for Mesa to address this issue: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2836


Testing it and reporting the results (here or in the MR comments) would be appreciated.


Thanks!
Comment 16 lechp 2020-01-02 15:29:39 UTC
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2836

Could somebody please provide a clear set of instructions on what can actually be done with this link? It just seems to contain a heap of forum comments, but no nothing "useful" in the conventional sense where a user can download and install a damned fix.
Comment 17 Pierre-Eric Pelloux-Prayer 2020-01-02 15:41:29 UTC
This bug has been fixed in Mesa, but is not part of a release yet.

So the 3 possible fixes are:
- compile Mesa from git
- or find a package for your distribution that contains Mesa git
- or define this environment variable system-wide "AMD_DEBUG=nodcc" until Mesa 20 is released and your distribution is updated.

Note You need to log in before you can comment on or make changes to this bug.