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
  I/O errors from SD card slot? (Manjaro, kernel 5.7) zackw 5 930 10-28-2020, 01:16 AM
Last Post: 25519
  Screen adjustment michael82 16 2,839 10-21-2020, 09:22 AM
Last Post: moonwalkers
Photo Remove activity manager bar on right side of screen - plasma kde motezart 3 344 10-20-2020, 10:36 AM
Last Post: motezart
  mhwd-kernel: command not found motezart 1 228 10-16-2020, 03:11 PM
Last Post: wdt
  Everything on my computer screen has inlarged by 50% 20jasonduty20@yahoo.com 2 568 10-07-2020, 09:46 AM
Last Post: moonwalkers
  Screen won't shut off when fully closed ZxEfR 15 2,948 09-08-2020, 09:45 PM
Last Post: subalpine
  Keyboard or driver errors - transpositions & multiple chars marawuti 0 327 08-18-2020, 10:29 PM
Last Post: marawuti
  screen burn-in frofro 0 415 08-17-2020, 08:11 PM
Last Post: frofro
  Login screen issue. LinuXchoicE 2 626 07-07-2020, 09:06 AM
Last Post: LinuXchoicE
  Boot custom kernel on PineBook Pro lowenware 7 1,247 07-06-2020, 03:31 PM
Last Post: lowenware

Forum Jump:


Users browsing this thread: 1 Guest(s)