Screen refresh delay with kernel errors
#11
(06-24-2020, 05:07 AM)mtnygard Wrote:
(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!

Thanks @mtnygard for posting the steps.

I'm still a linux novice but managed to get past Step 3 and now am stuck on Step 4.

There are a bunch of files in the working directory but I'm not sure where the file that needs to be edited resides. Do you have the path?
  Reply
#12
From https://forum.pine64.org/showthread.php?...9#pid69349 :

file is drivers/gpu/drm/bridge/analogix/analogix_dp_core.c.  You want to edit the file, find this chunk of code (starting at line 978):
Code:
    if (analogix_dp_detect_sink_psr(dp)) {
        ret = analogix_dp_enable_sink_psr(dp);
        if (ret)
            return ret;
    }


and surround it with "/* */", like this:


Code:
/*
    if (analogix_dp_detect_sink_psr(dp)) {
        ret = analogix_dp_enable_sink_psr(dp);
        if (ret)
            return ret;
    }
 */

also, be prepared for the compile to take a loooong time. just seeing the part about MAKEFLAGS, wish I had known that. you might even want to try MAKEFLAGS="-j4" or "-j6" if you want to max out all the cores. just edit /etc/makepkg.conf, find the MAKEFLAGS line and uncomment it (remove the #), then set it to the value you want. now when you run makepkg -e it will use more than just a single core.

hope this helps!
  Reply
#13
Hey all,

Trying this out -
using the linux-aarch64 pkg as described above

when trying to run mkpkg -o, get the following errors:

==> Extracting sources...
-> Extracting linux-5.7.tar.xz with bsdtar
bsdtar: Failed to set default locale
-> Extracting patch-5.7.6.xz with xz
==> Starting prepare()...
/home/blee/linux-aarch64/PKGBUILD: line 117: patch: command not found
==> ERROR: A failure occurred in prepare().
Aborting...


any ideas? fairly noob here, what am i doing wrong?

thanks!
-B
  Reply
#14
Since we've established now that the issue is more widespread than I originally thought, I've gone ahead and written a proper patch for this that I've submitted to the upstream kernel mailing lists. The new patch adds a new kernel commandline parameter to disable PSR so that users encountering this issue can simply modify the APPEND line of their extlinux.conf to enable the workaround.

The patch can be found here: https://patchwork.kernel.org/patch/11626737. With it applied, you just need to add
Code:
analogix_dp.enable_psr=0
to your kernel arguments to enable the fix.

I can also look into getting the patch included in manjaro's linux-aarch64 patchset.

(06-26-2020, 09:19 AM)bchenlee609 Wrote: Hey all,

Trying this out -
using the linux-aarch64 pkg as described above

when trying to run mkpkg -o, get the following errors:

==> Extracting sources...
  -> Extracting linux-5.7.tar.xz with bsdtar
bsdtar: Failed to set default locale
  -> Extracting patch-5.7.6.xz with xz
==> Starting prepare()...
/home/blee/linux-aarch64/PKGBUILD: line 117: patch: command not found
==> ERROR: A failure occurred in prepare().
    Aborting...


any ideas? fairly noob here, what am i doing wrong?

thanks!
-B

The issue is right there in your log:
Code:
/home/blee/linux-aarch64/PKGBUILD: line 117: patch: command not found
You don't have the patch command installed. You can run `pacman -S patch` to install it. You'll probably also need to install some other tools to build the kernel like gcc, make, flex, and bison.
  Reply
#15
(06-26-2020, 10:27 AM)shawnanastasio Wrote: Since we've established now that the issue is more widespread than I originally thought, I've gone ahead and written a proper patch for this that I've submitted to the upstream kernel mailing lists. The new patch adds a new kernel commandline parameter to disable PSR so that users encountering this issue can simply modify the APPEND line of their extlinux.conf to enable the workaround.

The patch can be found here: https://patchwork.kernel.org/patch/11626737. With it applied, you just need to add
Code:
analogix_dp.enable_psr=0
to your kernel arguments to enable the fix.

I can also look into getting the patch included in manjaro's linux-aarch64 patchset.

(06-26-2020, 09:19 AM)bchenlee609 Wrote: Hey all,

Trying this out -
using the linux-aarch64 pkg as described above

when trying to run mkpkg -o, get the following errors:

==> Extracting sources...
  -> Extracting linux-5.7.tar.xz with bsdtar
bsdtar: Failed to set default locale
  -> Extracting patch-5.7.6.xz with xz
==> Starting prepare()...
/home/blee/linux-aarch64/PKGBUILD: line 117: patch: command not found
==> ERROR: A failure occurred in prepare().
    Aborting...


any ideas? fairly noob here, what am i doing wrong?

thanks!
-B

The issue is right there in your log:
Code:
/home/blee/linux-aarch64/PKGBUILD: line 117: patch: command not found
You don't have the patch command installed. You can run `pacman -S patch` to install it. You'll probably also need to install some other tools to build the kernel like gcc, make, flex, and bison.


Many thanks!
I applied the patch and am about to get ready to compile.
how does one go about adding code to the kernel argument?

EDIT: compiled the kernel and installed it. Added code to APPEND line of extlinux.conf, but still getting PSR error message when issuing dmesg command.

Any insight? What info should I post to help troubleshoot?

thanks in advance for all the help.
  Reply
#16
(06-26-2020, 04:02 PM)bchenlee609 Wrote: EDIT: compiled the kernel and installed it. Added code to APPEND line of extlinux.conf, but still getting PSR error message when issuing dmesg command.

Any insight? What info should I post to help troubleshoot?

thanks in advance for all the help.

The APPEND modification is only necessary if you're using my new patch that I've submitted upstream. If you're using the original patch which simply commented out the if block, you don't need anything. If you are using the new patch, can you paste the output of:
Code:
dmesg | grep command

If you are using the old patch, it means you either didn't apply it correctly or it didn't get installed correctly and you're still booting the original kernel. It's also worth noting that I've submitted the new patch to manjaro's linux-aarch64 repo, so hopefully soon it will be merged and you won't need to recompile the kernel, you'll just need that `analogix_dp.enable_psr=0` kernel append parameter. https://gitlab.manjaro.org/manjaro-arm/p...-/issues/8
  Reply
#17
(06-29-2020, 09:40 AM)shawnanastasio Wrote:
(06-26-2020, 04:02 PM)bchenlee609 Wrote: EDIT: compiled the kernel and installed it. Added code to APPEND line of extlinux.conf, but still getting PSR error message when issuing dmesg command.

Any insight? What info should I post to help troubleshoot?

thanks in advance for all the help.

The APPEND modification is only necessary if you're using my new patch that I've submitted upstream. If you're using the original patch which simply commented out the if block, you don't need anything. If you are using the new patch, can you paste the output of:
Code:
dmesg | grep command

If you are using the old patch, it means you either didn't apply it correctly or it didn't get installed correctly and you're still booting the original kernel. It's also worth noting that I've submitted the new patch to manjaro's linux-aarch64 repo, so hopefully soon it will be merged and you won't need to recompile the kernel, you'll just need that `analogix_dp.enable_psr=0` kernel append parameter. https://gitlab.manjaro.org/manjaro-arm/p...-/issues/8


Hello,

I used your new patch, so hopefully have done the APPEND modification properly.

Output of dmesg | grep command listed below:

Code:
    [0.000000] Kernel command line: initrd=/initramfs-linux.img console=tty1 console=ttyS2,1500000 root=LABEL=ROOT_MNJRO rw rootwait video=eDP-1:1920x1080@60 video=HDMI-A-1:1920x1080@60 bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash analogix_dp.enable_psr=0

Any advice would be appreciated. If not, seems like this change will roll out on a wider scale eventually too, can wait until then. Was just trying to use this as a learning experience too Smile

Thanks!
-B
  Reply
#18
(06-29-2020, 02:35 PM)bchenlee609 Wrote: Hello,

I used your new patch, so hopefully have done the APPEND modification properly.

Output of dmesg | grep command listed below:

Code:
    [0.000000] Kernel command line: initrd=/initramfs-linux.img console=tty1 console=ttyS2,1500000 root=LABEL=ROOT_MNJRO rw rootwait video=eDP-1:1920x1080@60 video=HDMI-A-1:1920x1080@60 bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash analogix_dp.enable_psr=0

Any advice would be appreciated. If not, seems like this change will roll out on a wider scale eventually too, can wait until then. Was just trying to use this as a learning experience too Smile

Thanks!
-B

Your kernel command line is correct, so the issue must be that you either didn't apply the patch correctly or didn't install/boot the new kernel correctly. I personally just used the kernel's own build system to build and install the kernel, so I'm not super familiar with Manjaro's makepkg method. According to mtnygard's post it seems the patch needs to be applied after `makepkg -o` and before `makepkg -e`, then you use `pacman -U` to install the newly built kernel.

If possible, could you try modifying the kernel's LOCALVERSION string to contain something unique? You should be able to edit the .config file after the `makepkg -o` step with a text editor to do this. This will allow you to see if the you're successfully booting the patched kernel by running `uname -r` and seeing if the new LOCALVERSION appears.
  Reply
#19
Thanks @shawnanastasio for figuring this out! I'm very much enjoying the improved smoothness. I compiled the original version of this on manjaro (using @mtnygard's method) and it works perfectly for me. Took about 3 hours to compile with MAKEFLAGS="-j6".
  Reply
#20
so... has anyone figured out why some pbp devices suffer from this and some do not?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Novice question: Pinebook Pro does boot (does it?) but black screen Gert V. 21 3,470 01-27-2021, 10:48 PM
Last Post: rimaille
  Screen flicker with USB-C charging bchenlee609 5 1,123 01-25-2021, 08:48 PM
Last Post: bchenlee609
  HELP: PBP screen blanked iscmob 5 744 01-19-2021, 10:00 AM
Last Post: KC9UDX
  All White Screen on Manjaro I3 nomadicoder 1 836 12-31-2020, 11:44 AM
Last Post: nomadicoder
  I/O errors from SD card slot? (Manjaro, kernel 5.7) zackw 5 2,361 10-28-2020, 01:16 AM
Last Post: 25519
  Screen adjustment michael82 16 6,023 10-21-2020, 09:22 AM
Last Post: moonwalkers
Photo Remove activity manager bar on right side of screen - plasma kde motezart 3 1,200 10-20-2020, 10:36 AM
Last Post: motezart
  mhwd-kernel: command not found motezart 1 883 10-16-2020, 03:11 PM
Last Post: wdt
  Everything on my computer screen has inlarged by 50% 20jasonduty20@yahoo.com 2 1,158 10-07-2020, 09:46 AM
Last Post: moonwalkers
  Screen won't shut off when fully closed ZxEfR 15 5,490 09-08-2020, 09:45 PM
Last Post: subalpine

Forum Jump:


Users browsing this thread: 1 Guest(s)