My screen flashes intermittently

Hi forum. My screen has started flashing when I use Firefox. More on Wayland than X11. The problem disappears on KDE X11. The problem exists on GNOME Wayland and KDE Wayland. It’s not as regular on GNOME X11 but still exists. So. Ye olde graphics card issue (again)?
My inxi output:

System:
  Kernel: 6.12.7-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
  Desktop: GNOME v: 47.2 tk: GTK v: 3.24.43 wm: gnome-shell dm: 1: GDM
    2: SDDM note: stopped Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Laptop System: HP product: Victus by HP Gaming Laptop 15-fb1xxx v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: HP model: 8C30 v: 88.14 serial: <superuser required>
    part-nu: 92U81PA#ABG UEFI: AMI v: F.03 date: 08/10/2023
Battery:
  ID-1: BAT0 charge: 47.3 Wh (100.0%) condition: 47.3/47.3 Wh (100.0%)
    volts: 13.0 min: 11.6 model: HP Primary serial: <filter> status: full
CPU:
  Info: 6-core model: AMD Ryzen 5 7535HS with Radeon Graphics bits: 64
    type: MT MCP arch: Zen 3+ rev: 1 cache: L1: 384 KiB L2: 3 MiB L3: 16 MiB
  Speed (MHz): avg: 400 min/max: 400/4603 boost: enabled cores: 1: 400
    2: 400 3: 400 4: 400 5: 400 6: 400 7: 400 8: 400 9: 400 10: 400 11: 400
    12: 400 bogomips: 79083
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA GA107 [GeForce RTX 2050] vendor: Hewlett-Packard
    driver: nouveau v: kernel arch: Turing pcie: speed: 2.5 GT/s lanes: 8 ports:
    active: none empty: HDMI-A-1 bus-ID: 01:00.0 chip-ID: 10de:25ad
  Device-2: Advanced Micro Devices [AMD/ATI] Rembrandt [Radeon 680M]
    vendor: Hewlett-Packard driver: amdgpu v: kernel arch: RDNA-2 pcie:
    speed: 16 GT/s lanes: 16 ports: active: eDP-1 empty: DP-1, DP-2, DP-3,
    DP-4, DP-5, DP-6, DP-7, DP-8, Writeback-1 bus-ID: 06:00.0
    chip-ID: 1002:1681 temp: 38.0 C
  Device-3: Chicony HP Wide Vision HD Camera driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-3:2 chip-ID: 04f2:b766
  Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4
    compositor: gnome-shell driver: X: loaded: amdgpu,modesetting
    unloaded: radeon alternate: fbdev,nouveau,nv,vesa dri: radeonsi,nouveau
    gpu: nouveau,amdgpu display-ID: 0
  Monitor-1: eDP-1 res: 1920x1080 size: N/A
  API: EGL v: 1.5 platforms: device: 0 drv: nouveau device: 1 drv: radeonsi
    device: 2 drv: swrast gbm: drv: nouveau surfaceless: drv: nouveau wayland:
    drv: radeonsi x11: drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.3 vendor: amd mesa v: 24.3.2-arch1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon 660M (radeonsi rembrandt
    LLVM 18.1.8 DRM 3.59 6.12.7-arch1-1) device-ID: 1002:1681 display-ID: :0.0
  API: Vulkan v: 1.4.303 surfaces: xcb,xlib,wayland device: 0
    type: integrated-gpu driver: N/A device-ID: 1002:1681
Audio:
  Device-1: NVIDIA GA107 High Definition Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel pcie: speed: 2.5 GT/s lanes: 8
    bus-ID: 01:00.1 chip-ID: 10de:2291
  Device-2: Advanced Micro Devices [AMD/ATI] Rembrandt Radeon High
    Definition Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel
    pcie: speed: 16 GT/s lanes: 16 bus-ID: 06:00.1 chip-ID: 1002:1640
  Device-3: Advanced Micro Devices [AMD] ACP/ACP3X/ACP6x Audio Coprocessor
    vendor: Hewlett-Packard driver: snd_pci_acp6x v: kernel pcie: speed: 16 GT/s
    lanes: 16 bus-ID: 06:00.5 chip-ID: 1022:15e2
  Device-4: Advanced Micro Devices [AMD] Family 17h/19h/1ah HD Audio
    vendor: Hewlett-Packard driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s
    lanes: 16 bus-ID: 06:00.6 chip-ID: 1022:15e3
  API: ALSA v: k6.12.7-arch1-1 status: kernel-api
  Server-1: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: e000 bus-ID: 02:00.0 chip-ID: 10ec:8168
  IF: eno1 state: down mac: <filter>
  Device-2: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
    vendor: AzureWave driver: mt7921e v: kernel pcie: speed: 5 GT/s lanes: 1
    bus-ID: 03:00.0 chip-ID: 14c3:7961
  IF: wlan0 state: up mac: <filter>
  IF-ID-1: br-22f47e2855fe state: down mac: <filter>
  IF-ID-2: br-b548b7b4caa7 state: up speed: 10000 Mbps duplex: unknown
    mac: <filter>
  IF-ID-3: docker0 state: down mac: <filter>
  IF-ID-4: veth67f87df state: up speed: 10000 Mbps duplex: full
    mac: <filter>
Bluetooth:
  Device-1: IMC Networks Wireless_Device driver: btusb v: 0.8 type: USB
    rev: 2.1 speed: 480 Mb/s lanes: 1 bus-ID: 1-4:3 chip-ID: 13d3:3567
  Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: disabled
    rfk-block: hardware: no software: no address: N/A
Drives:
  Local Storage: total: 476.94 GiB used: 246.23 GiB (51.6%)
  ID-1: /dev/nvme0n1 vendor: Western Digital model: WD PC SN810
    SDCPNRY-512G-1006 size: 476.94 GiB speed: 63.2 Gb/s lanes: 4
    serial: <filter> temp: 35.9 C
Partition:
  ID-1: / size: 451.35 GiB used: 246.14 GiB (54.5%) fs: ext4
    dev: /dev/nvme0n1p2
Swap:
  ID-1: swap-1 type: partition size: 16.32 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/nvme0n1p3
Sensors:
  System Temperatures: cpu: 39.8 C mobo: N/A gpu: amdgpu temp: 38.0 C
  Fan Speeds (rpm): fan-1: 2695 fan-2: 0
Info:
  Memory: total: 16 GiB note: est. available: 14.83 GiB used: 3.6 GiB (24.3%)
  Processes: 346 Power: uptime: 38m wakeups: 0 Init: systemd v: 257
    default: graphical
  Packages: pm: pacman pkgs: 1574 Compilers: gcc: 14.2.1 Shell: Zsh v: 5.9
    running-in: kgx inxi: 3.3.36

lspci -k | grep -i vga

01:00.0 VGA compatible controller: NVIDIA Corporation GA107 [GeForce RTX 2050] (rev a1)
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt [Radeon 680M] (rev 0b)

Grepping for errors:

[    0.681520] ACPI: bus type drm_connector registered
[    0.697006] simple-framebuffer simple-framebuffer.0: [drm] Registered 1 planes with drm panic
[    0.697012] [drm] Initialized simpledrm 1.0.0 for simple-framebuffer.0 on minor 0
[    0.699863] simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device
[    2.769747] systemd[1]: Starting Load Kernel Module drm...
[    2.786880] systemd[1]: modprobe@drm.service: Deactivated successfully.
[    2.786995] systemd[1]: Finished Load Kernel Module drm.
[    5.343340] nouveau 0000:01:00.0: drm: VRAM: 4096 MiB
[    5.343343] nouveau 0000:01:00.0: drm: GART: 536870912 MiB
[    5.365241] [drm] amdgpu kernel modesetting enabled.
[    5.369679] [drm] initializing kernel modesetting (YELLOW_CARP 0x1002:0x1681 0x103C:0x8C30 0x0B).
[    5.389005] nouveau 0000:01:00.0: drm: MM: using COPY for buffer copies
[    5.417056] [drm] Initialized nouveau 1.4.0 for 0000:01:00.0 on minor 1
[    5.419027] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[    5.424485] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[    5.474391] [drm] register mmio base: 0xFC500000
[    5.474395] [drm] register mmio size: 524288
[    5.476753] [drm] add ip block number 0 <nv_common>
[    5.476755] [drm] add ip block number 1 <gmc_v10_0>
[    5.476757] [drm] add ip block number 2 <navi10_ih>
[    5.476758] [drm] add ip block number 3 <psp>
[    5.476759] [drm] add ip block number 4 <smu>
[    5.476761] [drm] add ip block number 5 <dm>
[    5.476762] [drm] add ip block number 6 <gfx_v10_0>
[    5.476764] [drm] add ip block number 7 <sdma_v5_2>
[    5.476765] [drm] add ip block number 8 <vcn_v3_0>
[    5.476767] [drm] add ip block number 9 <jpeg_v3_0>
[    5.564809] [drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size is 9-bit
[    5.564835] [drm] Detected VRAM RAM=512M, BAR=512M
[    5.564838] [drm] RAM width 128bits DDR5
[    5.565022] [drm] amdgpu: 512M of VRAM memory ready
[    5.565025] [drm] amdgpu: 7592M of GTT memory ready.
[    5.565041] [drm] GART: num cpu pages 262144, num gpu pages 262144
[    5.565390] [drm] PCIE GART of 1024M enabled (table at 0x000000F41FC00000).
[    5.565856] [drm] Loading DMUB firmware via PSP: version=0x04000045
[    5.566354] [drm] use_doorbell being set to: [true]
[    5.566379] [drm] Found VCN firmware Version ENC: 1.33 DEC: 4 VEP: 0 Revision: 3
[    5.741692] [drm] Seamless boot condition check passed
[    5.742864] [drm] Display Core v3.2.301 initialized on DCN 3.1
[    5.742867] [drm] DP-HDMI FRL PCON supported
[    5.744196] [drm] DMUB hardware initialized: version=0x04000045
[    5.826766] [drm] PSR support 1, DC PSR ver 0, sink PSR ver 1 DPCD caps 0x0 su_y_granularity 0
[    5.828070] [drm] kiq ring mec 2 pipe 1 q 0
[    6.049005] [drm] Initialized amdgpu 3.59.0 for 0000:06:00.0 on minor 2
[    6.056215] fbcon: amdgpudrmfb (fb0) is primary device
[    6.056445] [drm] pre_validate_dsc:1589 MST_DSC dsc precompute is not needed
[    6.073196] amdgpu 0000:06:00.0: [drm] fb0: amdgpudrmfb frame buffer device

The drivers that I do have installed are

pacman -Q | grep -E 'nvidia|xf86-video|mesa'

lib32-mesa 1:24.3.2-1
mesa 1:24.3.2-1
mesa-utils 9.0.0-5
xf86-video-amdgpu 23.0.0-2
xf86-video-ati 1:22.0.0-2

Up until 2 weeks ago, everything was fine. Games ran, the sun shone. I’m not sure that I should attempt to install Nouveau.
Why would this laptop have 2 graphics cards anyway?

I’ve turned down the refresh rate. I have lower intensity flashing (the red flashes on the bottom of the screen and not the lower half). Still not good enough though.

From the wiki, i could try adding amdgpu.sg_display=0 to the kernel parameters. Since we don’t use grub anymore, I’m stymied. There’s nothing under /boot/ either. How do I add the params?

If you’re using systemd-boot edit the file /etc/kernel/cmdline and run reinstall-kernels

Actually, re-thinking the issue, it’s likely FF. The screen doesn’t flicker with edge

The issue might be solved with this advice. :hand_with_index_finger_and_thumb_crossed:

I’ve added the kernel param and made the FF changes. Flickering still occurs but seems more under control

I’ve set layout.frame_rate = 144. (was -1). Still occurs

I’ve dumped FF :frowning: Things are tolerable again. Brave looks like the new go to for me.

Have you tried Firefox with a clean profile?

Good suggestion. I went to about:profiles and “refreshed” FF. It did not help

I’m getting the same flash across my screen using VS Code. Not as bad as FF though. Pretty sure that my puter isn’t broken though.

The last FF update has made it better and I’ve moved back to FF. It just hits the sweet spot <3