Lenovo Legion Y7000P-1060, GTX 1060 issues with driver (Ubuntu 18.04)

Hi guys,

I am having problem getting the GPU work even though it shows that the latest driver is successfully installed.
The display output either works solely on HDMI output when I use the X11 or it works solely on main screen when I use the Wayland.
On Wayland when I run nvidia-settings, I get this message:
ERROR: Unable to find display on any available system

When I run nvidia-smi, I get this:
| NVIDIA-SMI 430.50 Driver Version: 430.50 CUDA Version: 10.1 |
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| 0 GeForce GTX 1060 Off | 00000000:01:00.0 Off | N/A |
| N/A 49C P8 2W / N/A | 0MiB / 6078MiB | 0% Default |

| Processes: GPU Memory |
| GPU PID Type Process name Usage |
| No running processes found |

I would highly appreciate if you could help me fix this issue and make the GPU work.
nvidia-bug-report.log.gz (1.1 MB)

Please run nvidia-bug-report.sh as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post of yours will reveal a paperclip icon.

It’s an Optimus notebook, so you shouldn’t use the .run installer.
Please follow this:

  • remove the .run installer driver using the --uninstall option
  • delete /etc/X11/xorg.conf
  • install the driver from repo (sudo apt install nvidia-driver-430)
  • install nvidia-prime (sudo apt install nvidia-prime)
  • switch to nvidia (sudo prime-select nvidia)
  • remove stray blacklist files (sudo rm /lib/modprobe.d/blacklist-nvidia.conf /etc/modprobe.d/blacklist-nvidia.conf)
  • update the initrd (sudo update-initramfs -u)
  • reboot
    If this doesn’t resolve the issue, please create a new nvidia-bug-report.log.

Thank you very much guys!
It works seamlessly now.