How to disable Hardware Acceleration in Linux?

5 xorg opengl hardware graphics gpu

How can I turn off Hardware Acceleration in Linux, also known as Direct Rendering. I wish to turn this off, as it messes with some applications like OBS Studio which can't handle capturing of hardware acceleration on other applications since it's enabled for the entire system. Certain apps can turn it on and off, but can't do this for desktop and other apps.

When adding a source to capture from in OBS it just shows a blank capture image, for example if I wanted to record my desktop, it'll just show it as a blank capture input. Doesn't work if I want to capture web browser like Google Chrome, unless it's a single window with no tabs, and hardware acceleration is turned off in it's settings.

Graphics:  Card-1: Intel 3rd Gen Core processor Graphics Controller bus-ID: 00:02.0
       Card-2: NVIDIA GF108M [GeForce GT 630M] bus-ID: 01:00.0
       Display Server: X.Org 1.15.1 driver: nvidia Resolution: 1366x768@60.0hz
       GLX Renderer: GeForce GT 630M/PCIe/SSE2 GLX Version: 4.5.0 NVIDIA 384.90 Direct Rendering: Yes
Run Code Online (Sandbox Code Playgroud)

mvi*_*eck 11

You can configure Xorg to disable OpenGL / GLX.

For a first try, you can run a second X session: switch to tty2, log in and type:

startx -- :2 vt2 -extension GLX
Run Code Online (Sandbox Code Playgroud)

To permanently disable hardware acceleration, create a file:

/etc/X11/xorg.conf.d/disable-gpu.conf
Run Code Online (Sandbox Code Playgroud)

with the the content:

Section "Extensions"
    Option "GLX" "Disable"
EndSection
Run Code Online (Sandbox Code Playgroud)

请注意,像 Gnome3-Wayland 这样的 Wayland 合成器中的 Xwayland 将忽略xorg.conf.d.

  • @IvanTalalaev `xdpyinfo 的输出 | head -n 60` 显示您启用了 X 扩展。 (2认同)