0x00 wedge
Recently, when customers use our 3D visualization platform, the browser always crashes and the webgl context is lost. This kind of request generally appears on computers with very low computer configuration, such as computers with no independent graphics and only a small existing integrated graphics card.
However, most of the client's computers are well-configured and have independent graphics cards.
After exploration and analysis, I finally found the problem: that is, the computer does not use a discrete graphics card at all, that is to say, although there is a discrete graphics card on the hardware, in fact, the 3D program still uses an integrated graphics card, which makes it impossible to run the 3D program.
How to judge whether a 3D program uses a discrete graphics card? In fact, we can open the task manager of the computer and open the "Performance" tab. Generally, we can see two GPUs (integrated graphics cards at the beginning of Intel, discrete graphics at the beginning of NVIDIA)
From the figure, it can be seen that the utilization rate of GPU0 (integrated display) reaches 88%, while the utilization rate of GPU1 (independent display) is not 0, indicating that the 3D application does not use the independent display.
0x01 Reason Exploration
After testing, it is found that the reasons why the computer does not use a discrete graphics card can be roughly divided into several categories:
The driver is not installed correctly
The driver of the discrete graphics card is not installed, or the driver of the graphics card is not installed correctly, so the discrete graphics card of the computer cannot be used. You can check whether there is an adapter for the discrete graphics card through the device manager of the computer. If not, most of the graphics card drivers are not installed.
The monitor is not connected to a discrete graphics card
If the desktop is connected to the VGA/DVI/HDMI that comes with the motherboard, the core display is responsible for output and operation, and the interface without the independent display cannot play any role. On the contrary, if the independent display is connected, then the CPU core display will also be automatically shielded and will not work. A typical example is that if you connect an independent graphics card, such as an N card, there will only be an NVIDIA control panel, instead of an Intel HD graphics control interface.
If it is a notebook, generally the one with the DP interface must be the independent display interface. Other interfaces such as HDMI and VGA are all core display output, but the hard rules of the notebook are that the core display is responsible for the screen output, and the independent display is responsible for the 3D applications that need to be run. This is mandated by Intel, so in addition to the NVIDIA control panel for the N-card independent display, the notebook will also have the Intel HD Graphics Control Panel. It is worth noting that after the 6th generation of notebooks, some bios provide the option of shielding the nuclear display, and some allow free switching, or some ultra-high-end notebooks, the graphics card is 1070, 1080 or even 1080 SLI, which is shielded directly from the factory With nuclear display, there is no need for this nuclear display. Tests have shown that for notebook models with a core display above 1070, some poorly optimized games will drag down the performance of the independent display, resulting in a drop in the number of frames, and the overall number of frames is slightly lower than that of running the independent display alone.
The program specifies the use of the integrated display
Laptops and computers can use both integrated and discrete graphics at the same time.
Open the computer's NVIDIA control panel, you can specify whether the program uses a discrete or integrated display, as shown in the following figure:
If a browser is specified, such as chrome using an integrated graphics card, then webgl will not use a discrete graphics card.
0x02 how to solve
In fact, after reading the previous "reason investigation", it is very convenient to give the corresponding solution.
If the graphics card driver is not installed, install the graphics card driver. When installing, you need to pay attention to selecting the correct version.
If it is a desktop computer, check whether the monitor connector is connected to the interface of the discrete graphics card. If it is connected to the interface of the integrated graphics card, change the interface.
If the program specifies the integrated display, you can change it to use the independent display.
The process is not detailed.
0x03 Epilogue
If you find that the computer configuration is good, but the simple 3D application is very stuck, it is probably the above-mentioned reasons.
If you are interested in visualization, you can communicate with me on WeChat 541002349.
Pay attention to the public account "ITMan Biao Shu" to receive more valuable articles in time.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。