I recently wanted to connect an external WQHD monitor over DP to my Levono T420s with Ubuntu 18.04. That's when the problems started.

I upgraded from Ubuntu 16.04 a while ago and only discovered that I don't really have a Nvidia driver installed (anymore), and am running on my second Intel graphics card, when I tried to figure out my monitor problems (also see https://askubuntu.com/questions/1076...idia-nvs-4200m).

I then installed and uninstalled some Nvidia drivers, and sometimes login would work, sometimes not (with login I mean after you type in your password - sometimes my screen would freeze then). I also blacklisted Nouveau, etc.

Now I seem to have
Code:
nvidia-driver-390
from graphics-drivers/ppa up and running, but I still cannot connect my external monitor. The DP connector doesn't get recognized altogether anymore, as typing
Code:
xrandr
gives:

Code:
Screen 0: minimum 8 x 8, current 1600 x 900, maximum 16384 x 16384
LVDS-1-1 connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 310mm x 174mm
   1600x900      60.00 +  59.99*   59.94    59.95    59.82  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
(...)
VGA-1-1 disconnected (normal left inverted right x axis y axis)
There's no section for DP.

Also, my /etc/X11/Xorg.conf is empty, which may be the at the root of the problem. The reason for this is that, whenever I run sudo nvidia-xconfig to write a new Xorg.conf, I cannot login anymore, i.e. when I reboot the machine and enter my password at the login screen, the mouse cursor freezes. I can then change to another tty, but not start a graphical interface.

That may be related?

However, the driver seems to be loaded correctly,
Code:
cat /var/log/gpu-manager.log
gives:

Code:
log_file: /var/log/gpu-manager.log
last_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
new_boot_file: /var/lib/ubuntu-drivers-common/last_gfx_boot
can't access /opt/amdgpu-pro/bin/amdgpu-pro-px
Looking for nvidia modules in /lib/modules/4.15.0-36-generic/updates/dkms
Found nvidia module: nvidia.ko
Looking for amdgpu modules in /lib/modules/4.15.0-36-generic/updates/dkms
Is nvidia loaded? yes
Was nvidia unloaded? no
Is nvidia blacklisted? no
Is intel loaded? yes
Is radeon loaded? no
Is radeon blacklisted? no
Is amdgpu loaded? no
Is amdgpu blacklisted? no
Is amdgpu versioned? no
Is amdgpu pro stack? no
Is nouveau loaded? no
Is nouveau blacklisted? yes
Is nvidia kernel module available? yes
Is amdgpu kernel module available? no
Vendor/Device Id: 8086:126
BusID "PCI:0@0:2:0"
Is boot vga? yes
Vendor/Device Id: 10de:1056
BusID "PCI:1@0:0:0"
Is boot vga? no
Skipping "/dev/dri/card1", driven by "i915"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Skipping "/dev/dri/card1", driven by "i915"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Skipping "/dev/dri/card1", driven by "i915"
Skipping "/dev/dri/card0", driven by "nvidia-drm"
Found "/dev/dri/card1", driven by "i915"
output 0:
    card1-LVDS-1
Number of connected outputs for /dev/dri/card1: 1
Does it require offloading? yes
last cards number = 2
Has amd? no
Has intel? yes
Has nvidia? yes
How many cards? 2
Has the system changed? No
Intel IGP detected
Intel hybrid system
Creating /usr/share/X11/xorg.conf.d/11-nvidia-prime.conf
Here's more info about my graphics card(s) with
Code:
sudo lshw -c display
:


Code:
  *-display                 
       description: VGA compatible controller
       product: GF119M [NVS 4200M]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:32 memory:f0000000-f0ffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:4000(size=128) memory:f1000000-f107ffff
  *-display
       description: VGA compatible controller
       product: 2nd Generation Core Processor Family Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:34 memory:f1400000-f17fffff memory:e0000000-efffffff ioport:5000(size=64) memory:c0000-dffff
To sum it up: I think there's something wrong / missing with Xorg.conf, and xrandr doesn't show the DP connector. Something must be badly configured on my system, but I really suffer from the complexity of the Linux graphics system and have spent hours on this and still don't know how to start debugging this. Can someone pleaaaase help me? And a fresh installation of 18.04 is not really an option, there must be some around this.

And what's also weird: I the "Additional Drivers" page, multiple options are shown, but when I click on one and press "Apply changes", the changes seem to be applied, but in the end, the previous option is selected again (i.e. I can't change to 304 from 390, the option 390 is always selected again, in the end).



Only single step in one direction are appreciated... I'm desperate.