16.04 – HDMI port does not show up on xrandr – broken nvidia drivers?

Previously, everything was running under Ubuntu 16.04, but after installing regular updates and rebooting, my HDMI port seems to have disappeared. Running xrandr reports the following:

Screen 0: minimum 320x200, current 1920x1080, maximum 8192x8192
eDP-1 connected primary 1920x1080 + 0 + 0 (normal axis and inverted from right to left) 344mm x 193mm
1920x1080 60.06 * + 60.01 59.97 59.96 59.93 40.04
1680x1050 59.95 59.88
1600x1024 60.17
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1440x900 59.89
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1360x768 59.80 59.96
1280x800 59.99 59.97 59.81 59.91
1152x864 60.00
1280x720 60.00 59.99 59.86 59.74
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
960x540 59.96 59.99 59.63 59.82
800x600 60,00 60,32 56,25
840x525 60.01 59.88
864x486 59.92 59.57
800x512 60.17
700x525 59.98
800 x 450 59.95 59.82
640x512 60.02
720x450 59.89
700 x 450 59.96 59.88
640x480 60.00 59.94
720x405 59.51 58.99
684x384 59.88 59.85
680x384 59.80 59.96
640x400 59.88 59.98
576x432 60.06
640x360 59.86 59.83 59.84 59.32
512x384 60.00
512x288 60.00 59.92
480 x 270 59.63 59.82
400x300 60.32 56.34
432x243 59.92 59.57
320x240 60.05
360x202 59.51 59.13
320 x 180 59.84 59.32 

lspci -v reports:

00: 00.0 Host Bridge: Intel Core / Core Core Xeon E3-1200 v6 / 7th Generation Host Gateway / DRAM Registers (Rev 08)
Subsystem: Hewlett-Packard Xeon E3-1200 v6 / 7th Generation Gateway / Gateway / Host Processor Registers
Flags: bus master, fast development, latency 0
capacities: 

00: 02.0 VGA-compatible controller: Intel Corporation UHD Graphics 620 (rev 07) (prog-if 00 [VGA controller])
Subsystem: Hewlett-Packard Company UHD Graphics 620
Flags: bus master, fast development, latency 0, IRQ 132
Memory at b2000000 (64 bit, not pre-installed) [size=16M]
    Memory at c0000000 (64 bit, prefetchable) [size=256M]
    I / O ports to 5000 [size=64]
    [virtual]    Expansion ROM to 000c0000 [disabled] [size=128K]
    
    
    
    capacities: 
    Core driver used: i915
Core modules: i915

00: 04.0 Signal Processing Controller: Intel Corporation Core Core Xeon E3-1200 v5 / E3-1500 v6 / 6th Generation Thermal Processor (Rev 08)
Subsystem: Hewlett-Packard Company Xeon E3-1200 v5 / E3-1500 v5 / 6th Generation Core Processor Thermal Subsystem
Flags: bus master, fast development, latency 0, IRQ 16
Memory on b4320000 (64-bit, non-preinstallable) [size=32K]
    capacities: 
    Core driver used: proc_thermal
Kernel Modules: processor_thermal_device

00: 14.0 USB Controller: Sun Corporation's Sun Corporation Sun Corporation's XHCI USB 3.0 Controller (version 21) (prog-if 30 [XHCI])
Subsystem: Hewlett-Packard Company's XHCI USB 3.0 Sunrise Point-LP Controller
Flags: bus master, average developer, latency 0, IRQ 127
Memory on b4310000 (64-bit, non-preinstallable) [size=64K]
    capacities: 
    Core driver used: xhci_hcd

00: 14.2 Signal Processing Controller: Sunrise Point-LP Thermal Subsystem from Intel Corporation (Rev. 21)
Subsystem: Hewlett-Packard Company Sunrise Point-LP Thermal Subsystem
Flags: bus master, fast development, latency 0, IRQ 18
Memory on b4332000 (64-bit, non-preinstallable) [size=4K]
    capacities: 
    Core driver used: intel_pch_thermal
Core modules: intel_pch_thermal

00: 16.0 Communication Controller: Intel Corp. Sunrise Point-LP CSME HECI # 1 (Rev. 21)
Subsystem: Hewlett-Packard Sunrise Point-LP CSME HECI Company
Flags: bus master, fast development, latency 0, IRQ 133
Memory on b4333000 (64-bit, non-prefabricated) [size=4K]
    capacities: 
    Core driver used: mei_me
Core modules: mei_me

00: 17.0 SATA Controller: Sunrise Point-LP SATA Controller from Intel Corporation [AHCI mode] (rev 21) (prog-if 01 [AHCI 1.0])
Subsystem: Hewlett-Packard Company Sunrise Point-LP SATA Controller [AHCI mode]
    Flags: bus master, 66 MHz, medium support, latency 0, IRQ 129
Memory on b4330000 (32-bit, non-preinstallable) [size=8K]
    Memory on b4336000 (32-bit, not pre-installed) [size=256]
    Ports I / O to 5080 [size=8]
    Ports I / O to 5088 [size=4]
    Ports I / O to 5060 [size=32]
    Memory on b4334000 (32-bit, non-preinstallable) [size=2K]
    capacities: 
    Kernel driver used: ahci
Core modules: ahci

PCI Bridge 00: 1c.0: Intel Corporation's Sunrise Point-LP PCI Express Root Port # 1 (prog-if 00) [Normal decode])
Flags: bus master, fast development, latency 0, IRQ 122
Bus: primary = 00, secondary = 01, subordinate = 01, latency in seconds = 0
I / O behind the bridge: 00004000-00004fff
Memory behind the bridge: b3000000-b3ffffff
Prefabricated memory behind the bridge: 00000000a0000000-00000000b1ffffff
capacities: 
    Core driver used: pcieport
Core modules: shpchp

PCI Bridge 00: 1c.4: Intel Corporation Sunrise Point-LP PCI Express Root Port 5 (Rev. F1) (prog-if 00) [Normal decode])
Flags: bus master, fast development, latency 0, IRQ 123
Bus: primary = 00, secondary = 02, subordinate = 02, lat-sec = 0
I / O behind the bridge: 00006000-00006fff
Memory behind the bridge: b4200000-b42fffff
Prefabricated memory behind the bridge: 0000000090100000-00000000902fffff
capacities: 
    Core driver used: pcieport
Core modules: shpchp

PCI Bridge 00: 1c.5: Intel Corporation PCI Express Sunrise Point-LP Root No. 6 (prog-if 00) [Normal decode])
Flags: bus master, fast development, latency 0, IRQ 124
Bus: primary = 00, secondary = 03, subordinate = 03, lat-sec = 0
I / O behind the bridge: 00003000-00003fff
Memory behind the bridge: b4100000-b41fffff
capacities: 
    Core driver used: pcieport
Core modules: shpchp

PCI Bridge 00: 1d.0: Intel Corporation's Sunrise Point-LP PCI Express Root Port # 9 (prog-if 00) [Normal decode])
Flags: bus master, fast development, latency 0, IRQ 125
Bus: primary = 00, secondary = 04, subordinate = 04, lat-sec = 0
I / O behind the bridge: 00007000-00007fff
Memory behind the bridge: 90300000-904fffff
Prefabricated memory behind the bridge: 0000000090500000-00000000906fffff
capacities: 
    Core driver used: pcieport
Core modules: shpchp

PCI Bridge 00: 1d.3: Intel Corporation 9d1b Peripheral (Rev. F1) (prog-if 00 [Normal decode])
Flags: bus master, fast development, latency 0, IRQ 126
Bus: primary = 00, secondary = 05, subordinate = 05, latency in seconds = 0
Memory behind the bridge: b4000000-b40fffff
capacities: 
    Core driver used: pcieport
Core modules: shpchp

00: 1f.0 ISA Bridge: Intel Corporation Series 100 Chipset Family (Series R) Intel Server Chipset Controller - 9D4E (Rev 21)
Subsystem: Hewlett-Packard Company Device 83f9
Flags: bus master, medium devsel, latency 0

00: 1f.2 Memory Controller: Intel Corp. Sunrise Point-LP PMC (Rev. 21)
Subsystem: Hewlett-Packard Company Sunrise Point-LP PMC
Flags: bus master, fast development, latency 0
Memory on b432c000 (32-bit, non-prefabricated) [size=16K]

00: 1f.3 Audio Device: Intel HD Sunrise Point LP Audio Corporation (Rev. 21)
Subsystem: Hewlett-Packard Company Sunrise Point-LP HD Audio
Flags: bus master, fast development, latency 32, IRQ 135
Memory on b4328000 (64-bit, non-prefabricated) [size=16K]
    Memory on b4300000 (64-bit, non-preinstallable) [size=64K]
    capacities: 
    Core driver used: snd_hda_intel
Core modules: snd_hda_intel, snd_soc_skl

00: 1f.4 SMBus: Sunrise Point-LP SMBus Corporation (Rev. 21)
Subsystem: Hewlett-Packard Company Sunrise Point-LP SMBus
Flags: middle devsel, IRQ 11
Memory on b4335000 (64-bit, non-preinstallable) [size=256]
    I / O ports to 5040 [size=32]
    Core modules: i2c_i801

01: 00.0 3D Controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)
Subsystem: Hewlett-Packard Company GM108M [GeForce 940MX]
    Flags: bus master, fast development, latency 0, IRQ 131
Memory on b3000000 (32-bit, non-preinstallable) [size=16M]
    Memory on a0000000 (64 bit, preconfigurable) [size=256M]
    Memory on b0000000 (64 bit, prefetchable) [size=32M]
    Ports I / O to 4000 [size=128]
    ROM expansion to  [disabled]
    
    
    
    capacities: 
    Core driver used: new
Core modules: nvidiafb, new

02: 00.0 Class not assigned [ff00]: RTS522A PCI Express Card Reader from Realtek Semiconductor Co., Ltd. (Rev. 01)
Subsystem: Hewlett-Packard Company RTS522A PCI Express Card Reader
Physical Location: 4
Flags: bus master, fast development, latency 0, IRQ 128
Memory on b4200000 (32-bit, non-preinstallable) [size=4K]
    capacities: 
    Kernel driver used: rtsx_pci
Kernel Modules: rtsx_pci

03: 00.0 Ethernet Controller: Realtek Semiconductor Co., Ltd. RTL8111 / 8168/8411 PCI Express Gigabit Ethernet Controller (Rev. 15)
Subsystem: Hewlett-Packard Company PCI Express RTL8111 / 8168/8411 Gigabit Ethernet Controller
Flags: bus master, fast development, latency 0, IRQ 17
I / O ports to 3000 [size=256]
    Memory on b4104000 (64-bit, non-preinstallable) [size=4K]
    Memory on b4100000 (64-bit, non-preinstallable) [size=16K]
    capacities: 
    Core driver used: r8169
Core modules: r8169

05: 00.0 Network Controller: Intel Corporation Dual Band Wireless-AC 3168NGW [Stone Peak] (Rev 10)
Subsystem: Intel Corporation Device 2110
Flags: bus master, fast development, latency 0, IRQ 134
Memory on b4000000 (64-bit, non-preinstallable) [size=8K]
    capacities: 
    Core driver used: iwlwifi
Core modules: iwlwifi

Operation nvidia-settings fails with the error "ERROR: unable to load information from any available system", even if sudo prime-select nvidia indicates that the nvidia profile is already defined.

I've tried to reinstall all the nvidia drivers and switch to Ubuntu 18.04 without success.