3/4 of the screen goes black for a few seconds when i run a pygame window

When I run my python code on vscode 3/4 of the screen goes black for a few seconds then it works normal but I want to know why this happens.

if you run wayland maybe try with X11 session?

Is it a fullscreen application?


No, it is an 800x600 SDL window

I am using x org already. I didn’t change it

Tell us more about your system: [HowTo] Find system information

1 Like

   ~  mhwd -li  :heavy_check_mark:

Installed PCI configs:


              NAME               VERSION          FREEDRIVER           TYPE

video-hybrid-intel-nvidia-prime 2021.12.18 false PCI
video-linux 2018.05.04 true PCI
video-modesetting 2020.01.13 true PCI

Warning: No installed USB configs!
   ~  mhwd-kernel -li  :heavy_check_mark:
Currently running: 5.15.32-1-MANJARO (linux515)
The following kernels are installed in your system:

  • linux515
       ~  lsb_release -sirc  :heavy_check_mark:
    ManjaroLinux 21.2.6 Qonos

                                        ✔ 
    

NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0
squash 4.0 0 100% /var/lib/snapd/snap/bare/5
loop1
squash 4.0 0 100% /var/lib/snapd/snap/core20/1405
loop2
squash 4.0 0 100% /var/lib/snapd/snap/core18/2344
loop3
squash 4.0 0 100% /var/lib/snapd/snap/core/12834
loop4
squash 4.0 0 100% /var/lib/snapd/snap/code/94
loop5
squash 4.0 0 100% /var/lib/snapd/snap/discord/132
loop6
squash 4.0 0 100% /var/lib/snapd/snap/g-assist/2
loop7
squash 4.0 0 100% /var/lib/snapd/snap/gnome-3-28-1804/161
loop8
squash 4.0 0 100% /var/lib/snapd/snap/gnome-3-38-2004/99
loop9
squash 4.0 0 100% /var/lib/snapd/snap/gtk-common-themes/1519
loop10
squash 4.0 0 100% /var/lib/snapd/snap/snap-store/558
loop11
squash 4.0 0 100% /var/lib/snapd/snap/snapd/15534
loop12

sda
├─sda1
│ vfat FAT32 SYSTEM
│ C632-F156 69,9M 27% /boot/efi
├─sda2
│ vfat FAT32 C82D-CAD6
├─sda3

├─sda4
│ vfat FAT32 NO_LABEL
│ FA46-A4E5
├─sda5
│ swap 1 7ffdc910-cbb0-4d52-a0e6-87b19fda5500 [SWAP]
├─sda6
│ ext4 1.0 b0a283cc-3d5a-4c8f-8f36-570e5dbb1204
├─sda7
│ ext4 1.0 43003dcd-89a5-4f4e-a515-d3cfeedd520e 538,4G 3% /
├─sda8
│ ntfs 02F62814F6280B0D
└─sda9
ntfs F2A2D87CA2D8472F
sr0

                                                    ✔ 
           total        used        free      shared  buff/cache   available

Mem: 7834 3409 1117 589 3307 3569
Swap: 7648 0 7648

                                                     ✔ 

null
Discard all samples (playback) or generate zero samples (capture)
lavrate
Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
Rate Converter Plugin Using Samplerate Library
speexrate
Rate Converter Plugin Using Speex Resampler
jack
JACK Audio Connection Kit
oss
Open Sound System
pipewire
PipeWire Sound Server
pulse
PulseAudio Sound Server
speex
Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
Plugin for channel upmix (4,6,8)
vdownmix
Plugin for channel downmix (stereo) with a simple spacialization
default
Default ALSA Output (currently PulseAudio Sound Server)
hdmi:CARD=HDMI,DEV=0
HDA Intel HDMI, HDMI 0
HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
HDA Intel HDMI, HDMI 1
HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
HDA Intel HDMI, HDMI 2
HDMI Audio Output
hdmi:CARD=HDMI,DEV=3
HDA Intel HDMI, HDMI 3
HDMI Audio Output
hdmi:CARD=HDMI,DEV=4
HDA Intel HDMI, HDMI 4
HDMI Audio Output
usbstream:CARD=HDMI
HDA Intel HDMI
USB Stream Output
sysdefault:CARD=PCH
HDA Intel PCH, ALC3236 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC3236 Analog
Front output / input
surround21:CARD=PCH,DEV=0
HDA Intel PCH, ALC3236 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC3236 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC3236 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC3236 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC3236 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC3236 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
usbstream:CARD=PCH
HDA Intel PCH
USB Stream Output

:point_up:

I cant post links and photos and forum identififes it as a link because of dots

You won’t have that issue with preformatting – hence my quote.

What do you mean with preformatting? Do you mean reinstall manjaro?

:grin:
no he means preformating your text; click this icon: </> and inside put the output from:
inxi -Fazy
mhwd -l
mhwd -li

Please open and read the guide i linked above…

    ~  inxi -Fazy                                                        ✔ 
mhwd -l
mhwd -li
System:
  Kernel: 5.15.32-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=43003dcd-89a5-4f4e-a515-d3cfeedd520e rw quiet apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: KDE Plasma v: 5.24.4 tk: Qt v: 5.15.3 info: latte-dock
    wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: ASUSTeK product: X550LN v: 1.0
    serial: <superuser required>
  Mobo: ASUSTeK model: X550LN v: 1.0 serial: <superuser required>
    UEFI: American Megatrends v: X550LN.301 date: 04/14/2014
Battery:
  ID-1: BAT0 charge: 16.4 Wh (98.8%) condition: 16.6/38.5 Wh (43.3%)
    volts: 14.8 min: 14.8 model: ASUSTeK X550A26 type: Li-ion serial: N/A
    status: charging cycles: 300
CPU:
  Info: model: Intel Core i7-4500U bits: 64 type: MT MCP arch: Haswell
    family: 6 model-id: 0x45 (69) stepping: 1 microcode: 0x26
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 4 MiB desc: 1x4 MiB
  Speed (MHz): avg: 2424 high: 2694 min/max: 800/3000 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 1796 2: 2514 3: 2694
    4: 2694 bogomips: 19162
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: conditional, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Haswell-ULT Integrated Graphics vendor: ASUSTeK driver: i915
    v: kernel ports: active: eDP-1 empty: DP-1,HDMI-A-1 bus-ID: 00:02.0
    chip-ID: 8086:0a16 class-ID: 0300
  Device-2: NVIDIA GM108M [GeForce 840M] vendor: ASUSTeK driver: nvidia
    v: 510.60.02 alternate: nouveau,nvidia_drm pcie: gen: 1 speed: 2.5 GT/s
    lanes: 4 link-max: gen: 2 speed: 5 GT/s bus-ID: 04:00.0 chip-ID: 10de:1341
    class-ID: 0302
  Device-3: Chicony USB2.0 HD UVC WebCam type: USB driver: uvcvideo
    bus-ID: 2-5:3 chip-ID: 04f2:b40a class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.3 compositor: kwin_x11 driver: X:
    loaded: modesetting,nvidia unloaded: nouveau alternate: fbdev,nv,vesa
    gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.21x7.99")
    s-diag: 414mm (16.31")
  Monitor-1: eDP-1 model: LG Display 0x039f built: 2012 res: 1366x768 hz: 60
    dpi: 101 gamma: 1.2 size: 345x194mm (13.58x7.64") diag: 396mm (15.6")
    ratio: 16:9 modes: 1366x768
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2)
    v: 4.5 Mesa 21.3.8 compat-v: 3.0 direct render: Yes
Audio:
  Device-1: Intel Haswell-ULT HD Audio vendor: ASUSTeK driver: snd_hda_intel
    v: kernel bus-ID: 00:03.0 chip-ID: 8086:0a0c class-ID: 0403
  Device-2: Intel 8 Series HD Audio vendor: ASUSTeK driver: snd_hda_intel
    v: kernel bus-ID: 00:1b.0 chip-ID: 8086:9c20 class-ID: 0403
  Sound Server-1: ALSA v: k5.15.32-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.49 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: e000 bus-ID: 02:00.1 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp2s0f1 state: down mac: <filter>
  Device-2: Ralink RT3290 Wireless 802.11n 1T/1R PCIe vendor: Foxconn
    driver: rt2800pci v: 2.3.0 pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    bus-ID: 03:00.0 chip-ID: 1814:3290 class-ID: 0280
  IF: wlp3s0f0 state: up mac: <filter>
Bluetooth:
  Device-1: Ralink RT3290 Bluetooth vendor: Foxconn driver: N/A pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.1 chip-ID: 1814:3298 class-ID: 0d11
  Report: This feature requires one of these tools: hciconfig/bt-adapter
Drives:
  Local Storage: total: 931.51 GiB used: 16.36 GiB (1.8%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM024 HN-M101MBB
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 5400 serial: <filter> rev: 0001 scheme: GPT
Partition:
  ID-1: / raw-size: 594.73 GiB size: 584.32 GiB (98.25%)
    used: 16.33 GiB (2.8%) fs: ext4 dev: /dev/sda7 maj-min: 8:7
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
    used: 26.1 MiB (27.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 7.47 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/sda5 maj-min: 8:5
Sensors:
  System Temperatures: cpu: 50.0 C pch: 46.0 C mobo: N/A
  Fan Speeds (RPM): cpu: 2600
^[[BInfo:
  Processes: 230 Uptime: 9m wakeups: 1 Memory: 7.65 GiB used: 2.39 GiB (31.2%)
  Init: systemd v: 250 tool: systemctl Compilers: gcc: 11.2.0 clang: 13.0.1
  Packages: 1246 pacman: 1226 lib: 335 flatpak: 7 snap: 13 Shell: Zsh v: 5.8.1
  default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.15
^[[B^[[B> 0000:02:00.1 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


> 0000:04:00.0 (0302:10de:1341) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2021.12.18               false            PCI
          video-nvidia            2021.12.18               false            PCI
    video-nvidia-470xx            2021.12.18               false            PCI
    video-nvidia-390xx            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI


> 0000:00:02.0 (0300:8086:0a16) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI


Warning: No installed USB configs!
    ~                         

From your description, and your use of the PRIME driver, this may be relevant: PRIME - ArchWiki

    ~  sudo mhwd -a pci nonfree 0300                                     ✔ 
[sudo] password for atssen: 
> Skipping already installed config 'video-hybrid-intel-nvidia-prime' for device: 0000:00:02.0 (0300:8086:0a16) Display controller Intel Corporation Haswell-ULT Integrated Graphics Controller
    ~  sudo mhwd -a pci free 0300                                 ✔  5s  
> Skipping already installed config 'video-linux' for device: 0000:00:02.0 (0300:8086:0a16) Display controller Intel Corporation Haswell-ULT Integrated Graphics Controller
    ~  mhwd -l -d                                                        ✔ 
--------------------------------------------------------------------------------
> PCI Device: /devices/pci0000:00/0000:00:1c.2/0000:02:00.1 (0200:10ec:8168)
  Network controller Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
--------------------------------------------------------------------------------
  > AVAILABLE:

   NAME:        network-r8168
   ATTACHED:    PCI
   VERSION:     2016.04.20
   INFO:        RealTek RTL-8168 Gigabit Ethernet driver
   PRIORITY:    0
   FREEDRIVER:  true
   DEPENDS:     -
   CONFLICTS:   -
   CLASSIDS:    0200 
   VENDORIDS:   1186 10ec 


--------------------------------------------------------------------------------
> PCI Device: /devices/pci0000:00/0000:00:1c.4/0000:04:00.0 (0302:10de:1341)
  Display controller nVidia Corporation GM108M [GeForce 840M]
--------------------------------------------------------------------------------
  > INSTALLED:

   NAME:        video-hybrid-intel-nvidia-prime
   ATTACHED:    PCI
   VERSION:     2021.12.18
   INFO:        Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:    8
   FREEDRIVER:  false
   DEPENDS:     video-modesetting 
   CONFLICTS:   video*nvidia* 
   CLASSIDS:    0300 0302 0300 
   VENDORIDS:   10de 8086 

   NAME:        video-linux
   ATTACHED:    PCI
   VERSION:     2018.05.04
   INFO:        Standard open source drivers.
   PRIORITY:    2
   FREEDRIVER:  true
   DEPENDS:     -
   CONFLICTS:   -
   CLASSIDS:    0300 0380 0302 
   VENDORIDS:   1002 8086 10de 



  > AVAILABLE:

   NAME:        video-hybrid-intel-nvidia-prime
   ATTACHED:    PCI
   VERSION:     2021.12.18
   INFO:        Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:    8
   FREEDRIVER:  false
   DEPENDS:     video-modesetting 
   CONFLICTS:   video*nvidia* 
   CLASSIDS:    0300 0302 0300 
   VENDORIDS:   10de 8086 

   NAME:        video-hybrid-intel-nvidia-470xx-prime
   ATTACHED:    PCI
   VERSION:     2021.12.18
   INFO:        Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:    7
   FREEDRIVER:  false
   DEPENDS:     video-modesetting 
   CONFLICTS:   video*nvidia* 
   CLASSIDS:    0300 0302 0300 
   VENDORIDS:   10de 8086 

   NAME:        video-hybrid-intel-nvidia-390xx-bumblebee
   ATTACHED:    PCI
   VERSION:     2021.12.18
   INFO:        Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:    6
   FREEDRIVER:  false
   DEPENDS:     -
   CONFLICTS:   video*nvidia* 
   CLASSIDS:    0300 0302 0300 
   VENDORIDS:   10de 8086 

   NAME:        video-nvidia
   ATTACHED:    PCI
   VERSION:     2021.12.18
   INFO:        Closed source NVIDIA drivers for linux.
   PRIORITY:    5
   FREEDRIVER:  false
   DEPENDS:     -
   CONFLICTS:   video*nvidia* 
   CLASSIDS:    0300 0302 
   VENDORIDS:   10de 

   NAME:        video-nvidia-470xx
   ATTACHED:    PCI
   VERSION:     2021.12.18
   INFO:        Closed source NVIDIA drivers for linux.
   PRIORITY:    4
   FREEDRIVER:  false
   DEPENDS:     -
   CONFLICTS:   video*nvidia* 
   CLASSIDS:    0300 0302 
   VENDORIDS:   10de 

   NAME:        video-nvidia-390xx
   ATTACHED:    PCI
   VERSION:     2021.12.18
   INFO:        Closed source NVIDIA drivers for linux.
   PRIORITY:    3
   FREEDRIVER:  false
   DEPENDS:     -
   CONFLICTS:   video*nvidia* 
   CLASSIDS:    0300 0302 
   VENDORIDS:   10de 

   NAME:        video-linux
   ATTACHED:    PCI
   VERSION:     2018.05.04
   INFO:        Standard open source drivers.
   PRIORITY:    2
   FREEDRIVER:  true
   DEPENDS:     -
   CONFLICTS:   -
   CLASSIDS:    0300 0380 0302 
   VENDORIDS:   1002 8086 10de 


--------------------------------------------------------------------------------
> PCI Device: /devices/pci0000:00/0000:00:02.0 (0300:8086:0a16)
  Display controller Intel Corporation Haswell-ULT Integrated Graphics Controller
--------------------------------------------------------------------------------
  > INSTALLED:

   NAME:        video-hybrid-intel-nvidia-prime
   ATTACHED:    PCI
   VERSION:     2021.12.18
   INFO:        Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:    8
   FREEDRIVER:  false
   DEPENDS:     video-modesetting 
   CONFLICTS:   video*nvidia* 
   CLASSIDS:    0300 0302 0300 
   VENDORIDS:   10de 8086 

   NAME:        video-linux
   ATTACHED:    PCI
   VERSION:     2018.05.04
   INFO:        Standard open source drivers.
   PRIORITY:    2
   FREEDRIVER:  true
   DEPENDS:     -
   CONFLICTS:   -
   CLASSIDS:    0300 0380 0302 
   VENDORIDS:   1002 8086 10de 

   NAME:        video-modesetting
   ATTACHED:    PCI
   VERSION:     2020.01.13
   INFO:        X.org modesetting video driver.
   PRIORITY:    1
   FREEDRIVER:  true
   DEPENDS:     -
   CONFLICTS:   -
   CLASSIDS:    0300 
   VENDORIDS:   * 



  > AVAILABLE:

   NAME:        video-hybrid-intel-nvidia-prime
   ATTACHED:    PCI
   VERSION:     2021.12.18
   INFO:        Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:    8
   FREEDRIVER:  false
   DEPENDS:     video-modesetting 
   CONFLICTS:   video*nvidia* 
   CLASSIDS:    0300 0302 0300 
   VENDORIDS:   10de 8086 

   NAME:        video-hybrid-intel-nvidia-470xx-prime
   ATTACHED:    PCI
   VERSION:     2021.12.18
   INFO:        Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:    7
   FREEDRIVER:  false
   DEPENDS:     video-modesetting 
   CONFLICTS:   video*nvidia* 
   CLASSIDS:    0300 0302 0300 
   VENDORIDS:   10de 8086 

   NAME:        video-hybrid-intel-nvidia-390xx-bumblebee
   ATTACHED:    PCI
   VERSION:     2021.12.18
   INFO:        Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
   PRIORITY:    6
   FREEDRIVER:  false
   DEPENDS:     -
   CONFLICTS:   video*nvidia* 
   CLASSIDS:    0300 0302 0300 
   VENDORIDS:   10de 8086 

   NAME:        video-linux
   ATTACHED:    PCI
   VERSION:     2018.05.04
   INFO:        Standard open source drivers.
   PRIORITY:    2
   FREEDRIVER:  true
   DEPENDS:     -
   CONFLICTS:   -
   CLASSIDS:    0300 0380 0302 
   VENDORIDS:   1002 8086 10de 

   NAME:        video-modesetting
   ATTACHED:    PCI
   VERSION:     2020.01.13
   INFO:        X.org modesetting video driver.
   PRIORITY:    1
   FREEDRIVER:  true
   DEPENDS:     -
   CONFLICTS:   -
   CLASSIDS:    0300 
   VENDORIDS:   * 

   NAME:        video-vesa
   ATTACHED:    PCI
   VERSION:     2017.03.12
   INFO:        X.org vesa video driver.
   PRIORITY:    0
   FREEDRIVER:  true
   DEPENDS:     -
   CONFLICTS:   -
   CLASSIDS:    0300 
   VENDORIDS:   * 


Warning: no configs for USB devices found!
    ~                     

So i tried to install/update both free and nonfree drivers according to manjaro wiki’s “Configure graphics card” page but it seems like i already have latest ones and this log says i have prime

So what i must do now?

run the pygame, after the black screen close the program and open ksystemlog app and check for logs related to the troublesome program

1.05.2022 20:39	anacron	Job `cron.daily' started
1.05.2022 20:39	anacron	Job `cron.daily' terminated
1.05.2022 20:39	anacron	Job `cron.weekly' started
1.05.2022 20:39	anacron	Job `cron.weekly' terminated
1.05.2022 20:39	anacron	Normal exit (2 jobs run)
1.05.2022 20:39	rtkit-daemon	Supervising 6 threads of 3 processes of 1 users.
1.05.2022 20:39	rtkit-daemon	Supervising 6 threads of 3 processes of 1 users.
1.05.2022 20:39	rtkit-daemon	Supervising 6 threads of 3 processes of 1 users.
1.05.2022 20:39	rtkit-daemon	Successfully made thread 20007 of process 20003 owned by '1000' high priority at nice level -15.
1.05.2022 20:39	rtkit-daemon	Supervising 7 threads of 4 processes of 1 users.
1.05.2022 20:39	kwin_x11	qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 10388, resource id: 52428814, major code: 15 (QueryTree), minor code: 0
1.05.2022 20:39	kwin_x11	WobblyWindowsConfig::instance called after the first use - ignoring
1.05.2022 20:39	kwin_x11	GlideConfig::instance called after the first use - ignoring
1.05.2022 20:39	kwin_x11	BlurConfig::instance called after the first use - ignoring
1.05.2022 20:39	kwin_x11	ZoomConfig::instance called after the first use - ignoring
1.05.2022 20:39	kwin_x11	SlidingPopupsConfig::instance called after the first use - ignoring
1.05.2022 20:39	kwin_x11	SlideConfig::instance called after the first use - ignoring
1.05.2022 20:39	kwin_x11	PresentWindowsConfig::instance called after the first use - ignoring
1.05.2022 20:39	kwin_x11	MagicLampConfig::instance called after the first use - ignoring
1.05.2022 20:39	kwin_x11	KscreenConfig::instance called after the first use - ignoring
1.05.2022 20:39	kwin_x11	DesktopGridConfig::instance called after the first use - ignoring
1.05.2022 20:39	kwin_x11	kwin_core: XCB error: 10 (BadAccess), sequence: 10482, resource id: 754, major code: 142 (Composite), minor code: 2 (RedirectSubwindows)

this is the log when i open a pygame sdl window

looks like a kwin but who knows… disable compositor with this shortcut: alt + shift + f12 run the troublesome program again, and check if you get black screen … you can enable compositor again, by pressing the shortcut…

yeah it is working perfect now btw this is how my desktop looks when sdl window open
It is an issue too