0
  • 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?

  • Can you provide details about how the settings fail to save? What is the error you are getting? – Nmath Nov 21 '21 at 23:28
  • @Nmath The message is: Unable to open X config file '/etc/X11/xorg.conf for writing. – linux_newbie_please_be_kind Nov 21 '21 at 23:42
  • Are you running sudo nvidia-settings or are you trying to manually edit the file with sudo nano /etc/X11/xorg.conf? – Nmath Nov 21 '21 at 23:47
  • 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. – heynnema Nov 22 '21 at 01:01
  • @Nmath I tried: sudo nvidia-settings – linux_newbie_please_be_kind Nov 22 '21 at 01:24
  • 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. – linux_newbie_please_be_kind Nov 22 '21 at 01:24
  • 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 – Nmath Nov 22 '21 at 01:29
  • re: "Unable to open X config file '/etc/X11/xorg.conf for writing" this is a Nvidia bug. There is a workaround though. – heynnema Nov 24 '21 at 08:10

1 Answers1

0

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

heynnema
  • 70,711
  • I'll check that out in about 6 hours and let you know. – linux_newbie_please_be_kind Nov 22 '21 at 01:26
  • 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. – linux_newbie_please_be_kind Nov 22 '21 at 11:33
  • @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? – heynnema Nov 22 '21 at 14:11
  • Today I ended up wiping the partition and then installing Ubuntu 20.04.3 LTS to it instead. Fingers crossed this works out better. – linux_newbie_please_be_kind Dec 03 '21 at 02:51
  • @linux_newbie_please_be_kind Thanks for the update! – heynnema Dec 03 '21 at 03:17