[Luniux] Solve the problem of Ubuntu external monitor not displaying

Luniux] Solve the problem of Ubuntu external monitor not displaying

1. Check whether the nvidia graphics card driver is normal

Use command line

nvidia-smi

To check whether the graphics card driver is normal, if an error occurs

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. 
Make sure that the latest NVIDIA driver is installed and running.

That proves that there is a problem with our graphics card driver. We need to reinstall or update the graphics card driver. First, we check the graphics card driver version recommended by the system.

ubuntu-drivers devices

Use the above statement to view the driver versions available on the system and find the recommenddriver version number with the word "recommended"

Image

For example, the driver version number I recommend here is nvidia-driver-535-server-open, we only need to remember the number after this 535, and the next step is to update our driver according to this driver version.

2. Update driver

Enter 软件更新->附加驱动and select the driver with the version number and no words recommended above open. For example, what I chose here isnvidia-driver-535-server

Image

Then click 更改应用and wait for the update to complete. If 附加驱动no driver is available, you may need to change the image source. When updating the driver, we may be required to enter and confirm a password. Be sure to remember this password.
Next is a very important step

Restart the system and execute perform mok managemnet:

If a blue screen appears after restarting, perform mok managemnetfollow these steps:

  • Select enroll mok (perform mok mangement interface)
  • Select continue (enroll mok interface)
  • Select yes (enroll the key interface)
  • Enter the password you set during installation
  • Select Reboot (perform mok manageent interface)

In this way we can successfully update the driver.
After entering Ubuntu, we use the following statements to test

nvidia-smi

If the following message appears, the surface driver installation is successful.

Image

3. Check whether the monitor can detect

use statement

xrandr

We can view monitor information

Image

The above information indicates that I can detect two monitors, namely DP-2port and eDP-1-1port, which indicates that there is no problem with our monitor connection.
We need to modify some system files. First
open the file/usr/share/X11/xorg.conf.d/10-nividia.conf

cd /usr/share/X11/xorg.conf.d/		#进入目标路径
sudo chmod 777 10-nvidia.conf		#修改读写权限
sudo gedit 10-nvidia.conf 			#修改文件

Add to file

Option "PrimaryGPU" "Yes"

As shown below

Image

and then open the file/usr/share/X11/xorg.conf.d/10-amdgpu.conf

cd /usr/share/X11/xorg.conf.d/		#进入目标路径
sudo chmod 777 10-amdgpu.conf		#修改读写权限
sudo gedit 10-amdgpu.conf 			#修改文件

Make the following modifications

Driver "amdgpu" 修改为 Driver "modesetting"

as the picture shows

Image

Then restart the computer and successfully solve the problem of the monitor not being recognized.

4. Solve the problem that xrandr cannot find the monitor

First make sure your graphics card driver is installed correctly, then use

nvidia-settings

Check the information. If it does not appear X Screen 0, it means there is a conflict with the graphics card. In this case, you need to reboot and enter the bios to change the graphics card mode to independent graphics mode. After entering the system again, everything becomes normal.

Image

The specific methods are as follows:

  • Restart the computer and press F2or F12(according to your computer) and then findGraphic Setting
  • Modified Graphic Settingfrom Dynamic Graphicmodified toDiscrete Graphic
  • This will actually be 混合显示changed to独显模式
  • Different computers may have different modification methods, so pay attention to the distinction.

Reference

Thanks to all the bloggers for their efforts.
Ubuntu nvidia graphics card driver failed solution.
Ubuntu can recognize the external monitor but the external monitor has a black screen.
It is enough to read this article - ubuntu extended screen and black screen problem after installing the graphics card driver.

Guess you like

Origin blog.csdn.net/qq_44940689/article/details/132508548