Nvidia drivers causing issue with opening chrome and external monitor

I need help. I have a Dell Alienware X15:

sudo dmesg | grep -i DMI:
[    0.000000] DMI: Alienware Alienware x15 R1/Alienware x15 R1, BIOS 1.18.0 03/10/2023

It has a Gefore RTX 3070:

 ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd000024DDsv00001028sd00000A8Ebc03sc00i00
vendor   : NVIDIA Corporation
model    : GA104M [GeForce RTX 3070 Mobile / Max-Q]
driver   : nvidia-driver-535-server-open - distro non-free
driver   : nvidia-driver-535 - distro non-free recommended
driver   : nvidia-driver-525-open - distro non-free
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-535-server - distro non-free
driver   : nvidia-driver-470 - distro non-free
driver   : nvidia-driver-535-open - distro non-free
driver   : nvidia-driver-525-server - distro non-free
driver   : nvidia-driver-525 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

Since last week I’ve had several issues.
Firstly, when I select the recommended drivers above, Ubuntu doesn’t detect my external monitor. I can fix this by switching to the nouveau drivers. Previously I could use the 535 drivers without issue.
Secondly, any software that uses chrome will not open. For example, Google Chrome browser and Brave Browser. I click on them, see the application name up the top left beside "Activities", and then they just silently close. This happens regardless of the video drivers I select, but started to happen at a similar time so I suspect they’re related.

I’m trying to pinpoint exactly when this happened but I think it was caused by a sudo apt dist-upgrade, which I now regret doing!

So now I need help fixing the issue, without having to reinstall my whole OS. I’m dual booting with Windows and was using Windows for the last few days but I had to stop as I kept getting lots of crashes and running out of memory. Trying to compile code was causing issues as it failed due to environment issues a lot, so I need my Ubuntu environment back to normal ASAP.

Is it possible that a newer kernel from the dist-upgrade is causing conflicts with the drivers? How would that affect Chrome? I’ve purged chrome and reinstalled but get the same error, whether I install it from the Ubuntu "App store" or install from the .deb file downloaded directly from Google.

sudo dpkg -i google-chrome-stable_current_amd64.deb 
Selecting previously unselected package google-chrome-stable.
(Reading database ... 293740 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (114.0.5735.198-1) ...
Setting up google-chrome-stable (114.0.5735.198-1) ...
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in auto mode
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for man-db (2.10.2-1) ...

$ google-chrome
[12201:12201:0707/105632.005685:FATAL:credentials.cc(127)] Check failed: . : Permission denied (13)
Trace/breakpoint trap (core dumped)


sudo google-chrome
[12293:12293:0707/105750.549790:ERROR:zygote_host_impl_linux.cc(100)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

$ sudo google-chrome --no-sandbox
[12321:12343:0707/105828.609145:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[12321:12343:0707/105828.609175:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[12321:12343:0707/105828.609180:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[12321:12343:0707/105828.609185:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
[12321:12343:0707/105828.617503:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[12321:12343:0707/105828.617524:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[12321:12343:0707/105828.627064:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[12321:12343:0707/105828.627074:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
[12358:12358:0707/105828.648422:ERROR:angle_platform_impl.cc(43)] Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
ERR: Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
[12358:12358:0707/105828.648474:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not open the default X display.
[12358:12358:0707/105828.648492:ERROR:gl_display.cc(790)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
Authorization required, but no authorization protocol specified
[12358:12358:0707/105828.648548:ERROR:angle_platform_impl.cc(43)] Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
ERR: Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
[12358:12358:0707/105828.648563:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not open the default X display.
[12358:12358:0707/105828.648577:ERROR:gl_display.cc(790)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[12358:12358:0707/105828.648591:ERROR:gl_display.cc(824)] Initialization of all EGL display types failed.
[12358:12358:0707/105828.648606:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
Authorization required, but no authorization protocol specified
[12358:12358:0707/105828.658661:ERROR:angle_platform_impl.cc(43)] Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
ERR: Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
[12358:12358:0707/105828.658699:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not open the default X display.
[12358:12358:0707/105828.658713:ERROR:gl_display.cc(790)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
Authorization required, but no authorization protocol specified
[12358:12358:0707/105828.658762:ERROR:angle_platform_impl.cc(43)] Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
ERR: Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
[12358:12358:0707/105828.658778:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not open the default X display.
[12358:12358:0707/105828.658792:ERROR:gl_display.cc(790)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[12358:12358:0707/105828.658805:ERROR:gl_display.cc(824)] Initialization of all EGL display types failed.
[12358:12358:0707/105828.658820:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[12358:12358:0707/105828.659541:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[12321:12321:0707/105828.664358:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type: 
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
[12428:12428:0707/105828.701622:ERROR:angle_platform_impl.cc(43)] Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
ERR: Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
[12428:12428:0707/105828.701702:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not open the default X display.
[12428:12428:0707/105828.701721:ERROR:gl_display.cc(790)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
Authorization required, but no authorization protocol specified
[12428:12428:0707/105828.701784:ERROR:angle_platform_impl.cc(43)] Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
ERR: Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
[12428:12428:0707/105828.701799:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not open the default X display.
[12428:12428:0707/105828.701813:ERROR:gl_display.cc(790)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[12428:12428:0707/105828.701826:ERROR:gl_display.cc(824)] Initialization of all EGL display types failed.
[12428:12428:0707/105828.701840:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
Authorization required, but no authorization protocol specified
[12428:12428:0707/105828.711937:ERROR:angle_platform_impl.cc(43)] Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
ERR: Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
[12428:12428:0707/105828.711991:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not open the default X display.
[12428:12428:0707/105828.712006:ERROR:gl_display.cc(790)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
Authorization required, but no authorization protocol specified
[12428:12428:0707/105828.712056:ERROR:angle_platform_impl.cc(43)] Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
ERR: Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display.
[12428:12428:0707/105828.712072:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Could not open the default X display.
[12428:12428:0707/105828.712086:ERROR:gl_display.cc(790)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[12428:12428:0707/105828.712100:ERROR:gl_display.cc(824)] Initialization of all EGL display types failed.
[12428:12428:0707/105828.712114:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[12428:12428:0707/105828.712954:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
[12508:12508:0707/105828.742523:ERROR:angle_platform_impl.cc(43)] DisplayVkXcb.cpp:59 (initialize): xcb_connect() failed, error 1
ERR: DisplayVkXcb.cpp:59 (initialize): xcb_connect() failed, error 1
[12508:12508:0707/105828.742571:ERROR:angle_platform_impl.cc(43)] Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Not initialized.
ERR: Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Not initialized.
[12508:12508:0707/105828.742603:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Not initialized.
[12508:12508:0707/105828.742618:ERROR:gl_display.cc(790)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[12508:12508:0707/105828.742636:ERROR:gl_display.cc(824)] Initialization of all EGL display types failed.
[12508:12508:0707/105828.742653:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
Authorization required, but no authorization protocol specified
[12508:12508:0707/105828.752764:ERROR:angle_platform_impl.cc(43)] DisplayVkXcb.cpp:59 (initialize): xcb_connect() failed, error 1
ERR: DisplayVkXcb.cpp:59 (initialize): xcb_connect() failed, error 1
[12508:12508:0707/105828.752842:ERROR:angle_platform_impl.cc(43)] Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Not initialized.
ERR: Display.cpp:1023 (initialize): ANGLE Display::initialize error 12289: Not initialized.
[12508:12508:0707/105828.752858:ERROR:gl_display.cc(520)] EGL Driver message (Critical) eglInitialize: Not initialized.
[12508:12508:0707/105828.752873:ERROR:gl_display.cc(790)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[12508:12508:0707/105828.752887:ERROR:gl_display.cc(824)] Initialization of all EGL display types failed.
[12508:12508:0707/105828.752901:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[12508:12508:0707/105828.753751:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
[12517:12523:0707/105828.759446:ERROR:x11_software_bitmap_presenter.cc(142)] XGetWindowAttributes failed for window 25165827

I’d really appreciate if anyone can give me tips on how to fix this.
Thanks

Asked By: eoinzy

||

The issue was with Secure Boot.
I installed the drivers as follows:

sudo apt install nvidia-driver-535 nvidia-dkms-535

Then it asked me to enter a password at next boot (albeit in a not very user-friendly way through some MOK popup) and once I did, all was fixed.

Answered By: eoinzy