Screen refresh delay with kernel errors
#1
After receiving my new Pinebook Pro with the default Manjaro KDE installation, I've noticed that the screen frequently lags and seems to skip updates. This is even noticeable when typing commands in the terminal and seeing a ~1s delay between pressing some keys and seeing it appear on screen.

After some investigation, it seems the lag spikes correspond with messages like these appearing in the kernel log (dmesg):
Code:
[ 1431.158451] rockchip-dp ff970000.edp: Failed to apply PSR -110
[ 1431.158495] [drm:analogix_dp_bridge_atomic_enable [analogix_dp]] *ERROR* Failed to disable psr -110

I've looked online for people with the same issue, but I could only come up with one bug report on a kernel mailing list with no replies. Is this a known bug that can be worked around, or is it possible my unit has a hardware issue?
  Reply
#2
A small update.

It seems that the failing component is the display's Panel Self-Refresh feature which results in the DisplayPort bus being re-link trained frequently. My current theory is that this link training occasionally fails and results in the frame skips.

By disabling the PSR feature entirely in the kernel with a patch like this, the issue goes away and the laptop becomes usable. This is more of a workaround than an actual fix though, and I do believe the hardware is faulty here.

In case anybody is curious or runs into this issue and wants to try the workaround, here's the patch:

Code:
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 76736fb8e..a49dd6b3c 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -978,12 +978,13 @@ static int analogix_dp_commit(struct analogix_dp_device *dp)
    ret = analogix_dp_fast_link_train_detection(dp);
    if (ret)
        return ret;
-
+    /*
    if (analogix_dp_detect_sink_psr(dp)) {
        ret = analogix_dp_enable_sink_psr(dp);
        if (ret)
            return ret;
    }
+    */

    return ret;
}
  Reply
#3
(06-19-2020, 07:24 PM)shawnanastasio Wrote: A small update.

It seems that the failing component is the display's Panel Self-Refresh feature which results in the DisplayPort bus being re-link trained frequently. My current theory is that this link training occasionally fails and results in the frame skips.

By disabling the PSR feature entirely in the kernel with a patch like this, the issue goes away and the laptop becomes usable. This is more of a workaround than an actual fix though, and I do believe the hardware is faulty here.

In case anybody is curious or runs into this issue and wants to try the workaround, here's the patch:

Code:
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 76736fb8e..a49dd6b3c 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -978,12 +978,13 @@ static int analogix_dp_commit(struct analogix_dp_device *dp)
    ret = analogix_dp_fast_link_train_detection(dp);
    if (ret)
        return ret;
-
+    /*
    if (analogix_dp_detect_sink_psr(dp)) {
        ret = analogix_dp_enable_sink_psr(dp);
        if (ret)
            return ret;
    }
+    */

    return ret;
}

As a linux novice, do you have any resources that would point me in the right direction to apply this fix myself?
  Reply
#4
how do you apply this patch?
Pinebook Pro - 06.17.2020 Manjaro ARM i3 20.06
  Reply
#5
I'm muddling through build the kernel with this patch.

1. Clone the linux-pinebookpro repo from https://gitlab.manjaro.org/manjaro-arm/p...ookpro.git
2. cd into that directory
3. run makepkg
4. Fix whatever makepkg complains about and goto step 3

So far, I've had to install some extra dependencies with 'pacman -S blah blah' and fix checksums with 'updpkgsums'. Still working through other errors.
  Reply
#6
I would suggest using manjaro's linux-aarch64 repository instead which seems to be a much more minimal patchset that tracks upstream.
  Reply
#7
(06-23-2020, 06:38 PM)shawnanastasio Wrote: I would suggest using manjaro's linux-aarch64 repository instead which seems to be a much more minimal patchset that tracks upstream.

Thanks, that's timely. I was hitting errors in the "prepare()" function on the other one.
  Reply
#8
interesting that i don't see the same issue with 5.7.3-hwaccel on debian ... which kernel version are you using?
  Reply
#9
I wouldn't be surprised if PSR is not enabled correctly, so it's detected but in a weird state. The -110 error is ETIMEOUT, which I think means the panel has timed out responding to the PSR command (maybe it doesn't support it but reports it anyway?)
  Reply
#10
(06-23-2020, 06:38 PM)shawnanastasio Wrote: I would suggest using manjaro's linux-aarch64 repository instead which seems to be a much more minimal patchset that tracks upstream.

OK, so the process I just used was like this:

1. Clone the linux-aarch64 repo from https://gitlab.manjaro.org/manjaro-arm/p...ux-aarch64
2. cd into there
3. Run "makepkg -o" to fetch sources, verify checksums, and apply patches but *not* compile
4. Manually edit the offending file with @shawnanastasio's change to comment out that if block
5. Run "makepkg -e" to compile and package without re-downloading sources
6. Wait a long, long time. Like "go to bed" long
7. See a successful compile!
8. Learn about MAKEFLAGS="-j2" and slap forehead.
9. Use "pacman -U ./linux-aarch64-5.7.5-1-aarch64.tar.xz". Worry a bit when pacman says it wants to replace linux-pinebookpro with the new package.
10. Use "pacman -U ./linux-aarch64-headers-5.7.5-1-aarch64.tar.xz" to make sure my headers match my kernel.
11. Reboot
12. Enjoy buttery-smooth trackpad responsiveness and a clean dmesg output!
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Putting my screen on TV S265 6 657 10-07-2021, 08:00 PM
Last Post: ajawadmahmoud
  minimal kernel .config? alchemist 4 568 06-29-2021, 01:16 PM
Last Post: alchemist
  Kernel panics on Youtube solostian 0 440 06-18-2021, 02:36 AM
Last Post: solostian
  Novice question: Pinebook Pro does boot (does it?) but black screen Gert V. 21 7,038 01-27-2021, 10:48 PM
Last Post: rimaille
  Screen flicker with USB-C charging bchenlee609 5 2,183 01-25-2021, 08:48 PM
Last Post: bchenlee609
  HELP: PBP screen blanked iscmob 5 1,726 01-19-2021, 10:00 AM
Last Post: KC9UDX
  All White Screen on Manjaro I3 nomadicoder 1 1,391 12-31-2020, 11:44 AM
Last Post: nomadicoder
  I/O errors from SD card slot? (Manjaro, kernel 5.7) zackw 5 4,004 10-28-2020, 01:16 AM
Last Post: 25519
  Screen adjustment michael82 16 9,105 10-21-2020, 09:22 AM
Last Post: moonwalkers
Photo Remove activity manager bar on right side of screen - plasma kde motezart 3 2,063 10-20-2020, 10:36 AM
Last Post: motezart

Forum Jump:


Users browsing this thread: 1 Guest(s)