# nvidia-xconfig doesnt do what i want it to, nor does nvidia-settings

**URL:** <https://forums.developer.nvidia.com/t/nvidia-xconfig-doesnt-do-what-i-want-it-to-nor-does-nvidia-settings/107883>\
**Category:** Linux\
**Created:** [November 22, 2019, 4:49pm UTC](https://forums.developer.nvidia.com/t/nvidia-xconfig-doesnt-do-what-i-want-it-to-nor-does-nvidia-settings/107883 "2019-11-22T16:49:53Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![generix](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/generix/32/16024_2.png) [@generix](https://forums.developer.nvidia.com/u/generix)\
**Post date:** [November 22, 2019, 8:56pm UTC](https://forums.developer.nvidia.com/t/nvidia-xconfig-doesnt-do-what-i-want-it-to-nor-does-nvidia-settings/107883/7 "2019-11-22T20:56:23Z")

</div>

Maybe some more practical infos:  
You have a hybrid amd/nvidia system so you can’t/mustn’t use nvidia-xconfig, you’ll never get a working config out of it. In general, nvidia-xconfig shouldn’t be used on modern systems.

The problem with Ubuntu’s prime-select feature is it (still) doesn’t work for amd/nvidia but only for intel/nvidia. Needs manual tweaking of the config files.

You could try this:  
Please delete /etc/X11/xorg.conf  
and modify /usr/share/X11/xorg.conf.d/10-amdgpu.conf  
replacing only

```auto
Driver "amdgpu"

```

with

```auto
Driver "modesetting"

```

Please add

```auto
Option "PrimaryGPU" "Yes"

```

inside the OutputClass of /usr/share/X11/xorg.conf.d/10-nvidia.conf  
Then create two files optimus.desktop in /etc/xdg/autostart/ and /usr/share/gdm/greeter/autostart/ containing

```auto
[Desktop Entry]
Type=Application
Name=Optimus
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer

```

This should enable the nvidia profile on Ubuntu.

The “render offload” feature needs a patched Xserver, I don’t know if Ubuntu is providing this. If so, it could be enabled by not doing any of the above mentioned settings, but by creating an /etc/X11/xorg.conf just containing

```auto
Section "ServerLayout"
  Identifier "layout"
  Option "AllowNVIDIAGPUScreens"
EndSection

```

Afterwards, function can be checked running

```auto
__NV_PRIME_RENDER_OFFLOAD=1__ GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor

```

should return something “Nvidia”.  
Then applications can be started on the nvidia gpu running  
\_\_NV\_PRIME\_RENDER\_OFFLOAD=1 \_\_GLX\_VENDOR\_LIBRARY\_NAME=nvidia   
Downside of this is that no external monitors connected to the nvidia gpu will work.

---

_[View the full topic](https://forums.developer.nvidia.com/t/nvidia-xconfig-doesnt-do-what-i-want-it-to-nor-does-nvidia-settings/107883)._
