tomsom / yoga-linux

Run Linux on the Lenovo Yoga 7 14 (14ARB7) with AMD Ryzen 6800U (Rembrand).
https://github.com/tomsom/yoga-linux/wiki
56 stars 2 forks source link

Screen flicker? #35

Open soupglasses opened 1 year ago

soupglasses commented 1 year ago

This is mostly a "hey do you also have this issue" to try to figure out if this is something only i experience.

Using my computer over the day, i will have frequent flickers to black on the internal display at random that were not there on Windows.

Further on any of the USB C ports over MST i will also get these flickers, but as garbled "noise" data spat over my screen for about a quarter of the screen, usually the bottom. They do not happen on both screens when it occurs.

Very lost to what this is caused by.

stuarthayhurst commented 1 year ago

Never seen that, on either internal or external displays. Give amdgpu.dcdebugmask=0x10 a try as a kernel parameter to disable Panel Self-Refresh. It's caused 2 different issues for me now, and another for the 14ARB7 before I even got it (found on a thread), so I wouldn't be surprised if that's causing it.

tomsom commented 1 year ago

Actually i have experienced similar effects recently. They don't occur often; i'd say less than every hour and then only for half of a second or so. If i remember correctly they appear as dark/black horizontal stripes. Fedora/Wayland.

I haven't used an external monitor recently so idk about that.

ZakariaBouzouf commented 1 year ago

Same issue here with Fedora/Wayland , but when connecting to usb c dock with other monitor it seems that issue doesn't appear . I will try to change the kernel parameter and see if it resolve the issue .

stuarthayhurst commented 1 year ago

The kernel parameter is a complete stab in the dark, but it's caused me numerous issues, and this is display related, so I wouldn't be surprised if it was yet another issue stemming from PSR.

soupglasses commented 1 year ago

Update! I have located both issues in the AMD repos now.

  1. Sporadic flickering glitches on Ryzen 6850U, Radeon 680M
  2. Flickering and visual artifacts when using Display Port with Display Stream Compression

Supposedly its related to Scatter/Gather support, and was enabled by default recently for all APUs and is causing a lot of issues.

The current consensus is that amdgpu.sg_display=0 on kernels 6.2.0 and above should "fix" it today. There also exists patches one can apply to the kernel to fix this. Further, amdgpu.dcdebugmask=0x10 is stated can help if the first option doesn't, but please say in here if you needed both.

There is currently no estimated kernel release for when this gets fixed correctly.

soupglasses commented 1 year ago

Sadly neither option seems to have helped me on 6.3.1. But it is progress nonetheless.

Akinzekeel commented 1 year ago

I've had this issue a lot while using Edge in the past days, but somehow today I did not experience any flickering for the whole day. Unfortunately I've made a number of changes to my system today so it's unclear which one might have fixed it (or maybe it isn't fixed and I just got lucky today). It could have been any (or a combination) of the following:

stuarthayhurst commented 1 year ago

I've had plenty of complete lockups from the AMD driver, but those were sorted by the amdgpu.dcdebugmask=0x10, and I haven't encountered them since. I haven't experienced this before or after that flag, and I'm running Debian Sid with a recompiled version of the 6.3.1 kernel currently in experimental, in case anyone wanted to look for setup differences.

Myaats commented 1 year ago

I run 6.3.1 albeit using the xanmod kernel distribution, I used to get flicker on my laptop but have not experienced it in a while. Never attempted to bisect it as it was way too rare to reproduce reliably for me, I do assume it was either a newer kernel or the move to mesa 23 that solved it for me. I've also been using an external 4K monitor over a USB-C to DP cable with no flicker or other artifacts at all (GNOME 44 Wayland).

What I do experience is my entire device stuttering every 1-4 hour(s) for a few seconds at the time, this impacts audio too which makes be believe it is CPU and not graphics related though. Nothing shows up in the kernel log. (May just be the fTPM issue still not being fixed by a BIOS update)

soupglasses commented 1 year ago

I am also running the 6.3.1 version and have a lot of flickers. I doubt its fixed in the xanmod patchset, so i am guessing you have lucked out with it not showing up frequently. I am currently testing out the suggested patch, but have not had extensive time to test it (since it can sometimes take upto a full day's work before it starts showing up frequently).

Akinzekeel commented 1 year ago

So it turns out it's not fully fixed for me, however I noticed that the problem mostly occurs in the evening while browsing the web in Edge (and typically having the laptop plugged in at that time). I'm on kernel 6.3.3 btw.

soupglasses commented 1 year ago

Yeah with amdgpu.sg_display=0 the flickers are now dependent on Web browsing content. I can even make it permanently flicker if i hover over certain html objects or scroll to specific locations on websites!

I have no clue what is happening, but its now more consistent?

grimthorpe commented 10 months ago

I think this is the issue: https://gitlab.freedesktop.org/drm/amd/-/issues/2645

My screen was turning itself off randomly - moreso when watching youtube videos, but happened at other times.

The current workaround seems to be to add amdgpu.dcdebugmask=0x10 to the boot commandline.

According to the freedesktop issue AMD firmware developers are aware of the issue and are trying to fix it.

stuarthayhurst commented 10 months ago

Yea same issue, amdgpu.dcdebugmask=0x10 disables PSR... wow another PSR bug, no way. Looking at this thread and the issue linked, I think this might be several different bugs at once. The only symptoms I have are a backtrace (involving PSR), and the screen turning off for ~ 1 second.

stuarthayhurst commented 6 months ago

Does anyone still have this on kernel 6.6.8+? PSR-SU got disabled for our panel in that version, I assume until a fix is found for the various issues.

soyersoyer commented 5 months ago

The 6.8-rc2 kernel fixed it for me.

stuarthayhurst commented 5 months ago

Does anyone still have this on kernel 6.6.8+? PSR-SU got disabled for our panel in that version, I assume until a fix is found for the various issues.

Seems I have a different panel to the one that was disabled, it might be fixed for some of us then