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
  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,002 04-01-2023, 07:55 AM
Last Post: hacknix
  Manjaro pinebookpro images with kernel 5.7.19 rfm83 11 6,391 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: 1 Guest(s)