aigilea / hp_spectre_x360_14_eu0xxx

Linux on HP Spectre X360 14-eu0000
GNU General Public License v2.0
46 stars 2 forks source link

Screen flickering and artifacts on Pop!_OS 22.04 #14

Open faloi opened 2 months ago

faloi commented 2 months ago

With the default display settings (see screenshot) I'm getting some screen flickering and artifacts. Changing refresh rate to 48 Hz solves the flickering but not the artifacts.

image

faloi commented 2 months ago

Solved the flickering by disabling Panel Self Refresh (PSR) as explained in this article.

In Pop!_OS that can be achieved by running this command:

sudo kernelstub -a "i915.enable_psr=0"

Leaving this open since artifacts are not gone - and I'm not sure this is the best solution either.

n3thshan commented 2 months ago

just a hunch but, this might be caused by xorg. try a different desktop environment that has support for wayland (or maybe the new cosmic alpha?) the psr fix only works AFAIK for older intel chips.

nuclearforg commented 2 months ago

@n3thshan I get some brightness flicker not only on wayland, but also on Windows. The issue is most noticeable at low brightness if cursor is blinking. Other OLED laptops show similar issues with PSR (for example here).

faloi commented 2 months ago

The flickering disappeared after disabling PSR, that's for sure. I see less artifacts than before, but they're still there sometimes.

n3thshan commented 2 months ago

@faloi @nuclearforg then my only guess is that it is caused due to pwm flickering. Please take a look at these articles and their respective troubleshooting guides: Intel graphics; Backlight. Might i also get the kernel version y'all are using as well?

faloi commented 1 month ago

@faloi @nuclearforg then my only guess is that it is caused due to pwm flickering. Please take a look at these articles and their respective troubleshooting guides: Intel graphics; Backlight. Might i also get the kernel version y'all are using as well?

Sorry for the delay! Couldn't check the articles yet, but this is what you requested:

$ hostnamectl

 Static hostname: pop-os
       Icon name: computer-convertible
         Chassis: convertible
      Machine ID: (hidden)
         Boot ID: (hidden)
Operating System: Pop!_OS 22.04 LTS                      
          Kernel: Linux 6.9.3-76060903-generic
    Architecture: x86-64
 Hardware Vendor: HP
  Hardware Model: HP Spectre x360 2-in-1 Laptop 14t-eu000
n3thshan commented 1 month ago

@faloi in ur case, i think switching to wayland might remedy the issue with psr disabled. However current pop os does not have proper wayland support. Best way to test this is by dual booting another OS like fedora or ubuntu with the GNOME or KDE desktop. Make sure wayland is the display server in the about section of the settings pages. If that does not solve the issue, then its purely a PWM flicker thing and that is unfortunately unavoidable unless u keep the brightness levels high enough.

n3thshan commented 2 weeks ago

@faloi hi! i might have an update on ur issue. So recently i tried the experimental "Xe" kernel driver and got the very same issues as u mentioned. The screen flickers and artifacts. I think falling back to the i915 driver may help u instead of disabling psr which is a far better solution.

faloi commented 2 weeks ago

@n3thshan and how do I do that? 😁 I didn't try with another OS yet, so still having the issue.

cdekort commented 2 weeks ago

I had the same issues on Ubuntu (kernel 6.08), after moving to 6.11 the issue is resolved for me.

n3thshan commented 2 weeks ago

I had the same issues on Ubuntu (kernel 6.08), after moving to 6.11 the issue is resolved for me.

kernel 6.8 is what merged the experimental driver. So that explains.

n3thshan commented 2 weeks ago

@faloi https://wiki.archlinux.org/title/Intel_graphics#Testing_the_new_experimental_Xe_driver.

Im not sure but i think if you put the "!" in xe.force_probe instead of i915.force_probe, it might get fixed. Just ignore the mesa build options portion. I hope i was clear!

Also make sure to remove i915.enable_psr=0 to see if this truly works.

faloi commented 2 weeks ago

@n3thshan just added that and removed the i915.enable_psr=0. I'll let you know if it worked.

Just for completeness, this is how you set those params on Pop!_OS:

$ sudo kernelstub -a "i915.force_probe=7d55 xe.force_probe=\!7d55"

And this is how my config looks right now:

$ sudo kernelstub -p

kernelstub.Config    : INFO     Looking for configuration...
kernelstub           : INFO     System information: 

    OS:..................Pop!_OS 22.04
    Root partition:....../dev/nvme0n1p6
    Root FS UUID:........a399fa1e-1e47-40a9-8877-7342c1308607
    ESP Path:............/boot/efi
    ESP Partition:......./dev/nvme0n1p5
    ESP Partition #:.....5
    NVRAM entry #:.......-1
    Boot Variable #:.....0000
    Kernel Boot Options:.splash quiet i915.force_probe=7d55 loglevel=0 systemd.show_status=false xe.force_probe=!7d55
    Kernel Image Path:.../boot/vmlinuz-6.9.3-76060903-generic
    Initrd Image Path:.../boot/initrd.img-6.9.3-76060903-generic
    Force-overwrite:.....False

kernelstub           : INFO     Configuration details: 

   ESP Location:................../boot/efi
   Management Mode:...............True
   Install Loader configuration:..True
   Configuration version:.........3
faloi commented 2 weeks ago

Well, it didn't work: artifacts aren't gone and the flickers are back. Falling back to disabling psr again, at least it get rids of the flickers.

It seems that the params were correctly applied:

$ sudo lshw -c video                                  
  *-display                 
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 08
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 mode=2880x1800 resolution=2880,1800 visual=truecolor xres=2880 yres=1800
       resources: iomemory:500-4ff iomemory:400-3ff irq:200 memory:5010000000-5010ffffff memory:4000000000-400fffffff memory:c0000-dffff memory:5011000000-5017ffffff
faloi commented 2 weeks ago

So, according to the output of lshw -c video, I realized that I was already using the i915 driver, so setting the kernel param to use it was useless.

Instead, I tried with the Xe driver and didn't have any artifacts in ~3 hours using my computer. The flicker is back, but we already know that i915.enable_psr=0 removes them... or at least it did with the i915 driver, didn't try it yet with Xe. 🙃

n3thshan commented 2 weeks ago

@faloi i seriously dont know how to help u out here but all i can say is try a different distro. if u r using pop os in hopes of cosmic, there are plenty of other distros like fedora and even universal blue (immutable distro based on fedora) that will ship it by default. system76 has shifted all of their efforts to develop cosmic as of now and so until they make a stable release, they are kinda ignoring the distro. Better for u to just use another distro or manually update to a newer kernel. if u r fine using the psr workaround, its all gud. But note that it is a powersaving feature that u r disabling, thus u may have relatively worse battery than most of us here.

nuclearforg commented 2 weeks ago

I had the same issues on Ubuntu (kernel 6.08), after moving to 6.11 the issue is resolved for me.

kernel 6.8 is what merged the experimental driver. So that explains.

@n3thshan From the pull request to the kernel for the Xe driver

i915 will continue be the main production driver for the platforms up to Meteor Lake and Alchemist.

nuclearforg commented 2 weeks ago

I can't really say if kernel 6.11 somewhat mitigated the artifacts issue, but they're still there from time to time, at least in my case.

faloi commented 2 weeks ago

Well, after some days using Xe, I can tell you that:

I may try with a different OS but not now because I don't have enough time to do a fresh install and so on.

Thanks everybody, glad we had this community 😁