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
  Another one boots to black screen Sb2024 8 714 11-06-2024, 11:27 PM
Last Post: Sb2024
  Screen on pinebook stays black but can ssh into machine tuxxpine 0 698 02-23-2024, 04:22 PM
Last Post: tuxxpine
  Black screen by start up bluedemon382 10 4,447 07-27-2023, 07:49 AM
Last Post: dstallmo
  PBP blank screen after updating Manjaro Franko 6 3,001 04-01-2023, 07:55 AM
Last Post: hacknix
  Manjaro pinebookpro images with kernel 5.7.19 rfm83 11 6,386 01-22-2023, 10:05 PM
Last Post: rfm83
  Broken usb-c to hdmi with kernel 5.18+ rfm83 6 3,859 01-22-2023, 09:55 PM
Last Post: rfm83
  minimal kernel .config? alchemist 5 6,774 08-15-2022, 06:28 PM
Last Post: svmhdvn
Question Pinebook Pro shows only bright white screen when powered on Sean Whitton 3 2,580 07-22-2022, 01:19 PM
Last Post: wdt
  Ring around screen following update tylerjohnson3208 2 2,590 05-10-2022, 01:52 AM
Last Post: diyagabriel
  Looking for Screen LCD Panel for the Pinebook Pro gerstavros 3 3,373 05-09-2022, 05:53 AM
Last Post: gerstavros

Forum Jump:


Users browsing this thread: 9 Guest(s)