Score:0

How do I fix my Nvidia GPU having screen tearing when scrolling vertically in any web browser?

ca flag
  • I'm using Ubuntu 21.10
  • I have an nVidia GPU (GTX 1060 6GB)
  • I am using the 470 NVidia drivers from within Ubuntu

I've tried the answer in: Screen tearing when scrolling and in games

but the config for me always fails to save (even when ran as sudo), seems permissions based.

Does Ubuntu support hardware acceleration in web browsers like Brave and Firefox?

Nmath avatar
ng flag
Can you provide details about how the settings fail to save? What is the error you are getting?
linux_newbie_please_be_kind avatar
ca flag
@Nmath The message is: Unable to open X config file '/etc/X11/xorg.conf for writing.
Nmath avatar
ng flag
Are you running `sudo nvidia-settings` or are you trying to manually edit the file with `sudo nano /etc/X11/xorg.conf`?
heynnema avatar
ru flag
Make sure that `Secure Boot` is disabled in your BIOS. Make sure that you're running with a X11/Xorg session, not a Wayland session. Please see my answer. Report back.
linux_newbie_please_be_kind avatar
ca flag
@Nmath I tried: sudo nvidia-settings
linux_newbie_please_be_kind avatar
ca flag
A helpful Linux user told me: For Ubuntu 21.10 they switched to Wayland and Xorg does NOT exist, hence you can not write an Xorg (X11) file out. You need to switch to Xorg from Wayland, or just use a different distribution that uses Xorg.
Nmath avatar
ng flag
Ah yes, Wayland is default but you can still choose to use Xorg. Nvidia drivers are still a little wonky with Wayland so it's probably better to stick with Xorg until those are sorted out. heynnema's answer will show you how to log in with X instead of Wayland
heynnema avatar
ru flag
re: "Unable to open X config file '/etc/X11/xorg.conf for writing" this is a Nvidia bug. There is a workaround though.
Score:0
ru flag

Confirm that Secure Boot is disabled in your BIOS. (You may be able to re-enable it again at a later time).

Note: If you created /etc/X11/xorg.conf, please delete it (sudo rm -i /etc/X11/xorg.conf), and then log out.

The Nvidia drivers don't work well with Wayland. We'll change to X11/Xorg. Log out. Then, at your login screen, select your Username, then click on the icon in the lower-right of your screen, and select Ubuntu on X11/Xorg, then enter your password to continue logging in.

Start Firefox and open a few tabs (eBay, Amazon, etc.), then in terminal...

$ nvidia-smi (note that in my example, Xorg, gnome-shell, and Firefox are accelerated)

Sun Nov 21 16:45:32 2021       
+---------------------------------------------+
| NVIDIA-SMI 470.82.00    Driver Version: 470.82.00    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:02:00.0 Off |                  N/A |
| N/A   50C    P0    N/A /  N/A |    440MiB /  2002MiB |      8%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+---------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      3356      G   /usr/lib/xorg/Xorg                206MiB |
|    0   N/A  N/A      3557      G   /usr/bin/gnome-shell               42MiB |
|    0   N/A  N/A    220406      G   /usr/lib/firefox/firefox          185MiB |
|    0   N/A  N/A    220578      G   /usr/lib/firefox/firefox            0MiB |
|    0   N/A  N/A    260547      G   /usr/lib/firefox/firefox            0MiB |
|    0   N/A  N/A   1275517      G   /usr/lib/firefox/firefox            0MiB |
+---------------------------------------------+

Start the Nvidia X Server Settings app (using the SUPER key), and check the following setting...

enter image description here

Confirm the following...

enter image description here

linux_newbie_please_be_kind avatar
ca flag
I'll check that out in about 6 hours and let you know.
linux_newbie_please_be_kind avatar
ca flag
Thank you all for the help. I followed this and for me it shows Windowing System as X11. After 2 hours of troubleshooting and trying to force xorg suddenly I could not get my second display to show up anymore. I think I'll just wait 6 months and then try a more stable version of Ubuntu then (I am using it dual boot along-side Windows 10). My take away is that Wayland is too buggy for NVidia cards and Ubuntu messed up with the 21.10 release.
heynnema avatar
ru flag
@linux_newbie_please_be_kind Don't give up so easily. Did you delete the xorg.conf file that you had created? How are the monitors connected to the system? HDMI? What change did you make right before the 2nd display stopped working? Does your system now look like my examples? What version Nvidia driver?
linux_newbie_please_be_kind avatar
ca flag
Today I ended up wiping the partition and then installing Ubuntu 20.04.3 LTS to it instead. Fingers crossed this works out better.
heynnema avatar
ru flag
@linux_newbie_please_be_kind Thanks for the update!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.