(nvidia-settings:36853): GLib-GObject-CRITICAL **: 20:41:18.117: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

When I call nvidia-settings from terminal, it shows this error but nvidia settings show up.
“(nvidia-settings:36853): GLib-GObject-CRITICAL **: 20:41:18.117: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed”. Everything works fine but when I play dota2,it get freeze sometimes.I dont know if this error has something about dota2 freezing and how to solve?

The error message is always displayed, just ignore.
Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

nvidia-bug-report.log.gz (363.9 KB)
thank you and here it is.

No error caught in the logs. Did you create it after a freeze?

I dont know but now I am facing with a new error. I’ve installed nvidia-drivers with .run file in ubuntu.Today, I do sudo apt-update && sudo apt upgrade -y and there is updates about linux kernel header,linux image and modules.I dont know why but when I check ubuntu settings > about > graphics, there’s intel drivers.So, I think there may be some driver conflicts because installing nvidia drivers with .run file is not recommended way.Then, I uninstall nvidia drivers with .run --uninstall command,reboot and install recommended nvidia drivers from ubuntu-drivers and I face with some errors but it installed.Even when I rebooted,I call nvidia-smi in terminal,it said “Failed to initialize NVML: Driver/library version mismatch”.Now,I uninstalled all nvidia-drivers.What are those errors(u can see them in the photo)?

Which driver version did you try to install using the runfile?
Please post the output of
dkms status

It is 470.86.
the output is -
nvidia, 470.86, 5.13.0-22-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)

Now I installed recommend ubuntu drivers and when I call nvidia-settings,it says

ERROR: Unable to find display on any available system

(nvidia-settings:8794): GLib-GObject-CRITICAL **: 19:10:45.922: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
** Message: 19:10:45.924: PRIME: Requires offloading
** Message: 19:10:45.924: PRIME: is it supported? yes
** Message: 19:10:45.946: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 19:10:45.946: PRIME: on-demand mode: “1”
** Message: 19:10:45.946: PRIME: is “on-demand” mode supported? yes

I think it’s because I’m using wayland. So I try to disable it in /etc/gdm3/custom.conf and reboot.But ubuntu dont boot up.Maybe do I need to reconfigure xorg again?

Please delete /etc/X11/xorg.conf if existing.

also see this: