Unable to launch spotify, termius and google chrome etc

Whenever I try to launch spotify, termius and google chrome, the app displays no content and there’s a grey screen. There might be other apps giving the same issue.
tried launching them via terminal and got the following output.

ERR: Display.cpp:1083 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1083 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1083 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.
ERR: Display.cpp:1083 (initialize): ANGLE Display::initialize error 12289: Could not create a backing OpenGL context.

The error you see (Could not create a backing OpenGL context) indicates that a program is trying to initiate an OpenGL contact but fails, usually due to a problem with drivers or graphics libraries. Here are a few steps you can try to solve the problem:

  1. Update graphics card drivers

    Make sure you have the latest graphics card drivers installed. For NVIDIA you can use:

sudo pacman -S nvidia nvidia-utils

For AMD card:

sudo pacman -S xf86 video-amdgpu

Restart the system after installation.
  1. Install OpenGL library

    To ensure that OpenGL support is available, you can install these packages:

    sudo pacman -S mesa libglvnd

    These libraries are core components for using OpenGL in Linux.

  2. Check for Wayland and X11 compatibility

    Some programs work better during X11 than Wayland. Try logging out and logging into your system by selecting an X11 session (if you are running Wayland), especially if you have an NVIDIA GPU that may have limited support for Wayland.

  3. Force the use of another OpenGL context (if the program supports it)

    Some programs can be configured to use a particular OpenGL version. If possible, try running the program with a lower OpenGL version, such as 3.0 instead of 4.5.

  4. Check logs for more information

    Use dmesg or journal to get details of what is causing the problem:

dmesg | grip -i ‘gpu|opengl’

or

journalctl -xe | grip -i 'gpu\|openg'
  1. Test with another graphics stack (only as last resort)

    If the problem persists, consider trying other graphics stacks such as xorg or mesa-git if you’re already using stable versions