Nvidia settings overclock not working

I have a PC with Intel igpu and Nvidia RTX 2070 and want to run intel with my monitor and gpu for cuda operations.

I got config /etc/X11/xorg.conf but I can’t change overclock settings in Nvidia Settings.

I follow this topic instructions too drivers - fresh 20.04 install with nvidia and iGPU.. only get iGPU resolutions - Ask Ubuntu

Topic with similar problem https://www.nvidia.com/en-us/geforce/forums/geforce-graphics-cards/5/256179/gtx-1070-cannot-control-overclock-settings-on-ub/

xorg.conf

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 470.86

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "intel"
    Screen      1  "Nvidea0"
    
EndSection

Section "Device"
   Identifier "intel"
   Driver "modesetting"
   BusID "PCI:0:2:0"
   Option "AccelMethod" "SNA"
EndSection

Section "Screen"
   Identifier "intel"
   Device "intel"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce RTX 2070"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier     "Nvidea0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "UseDisplayDevice" "DFP-0"
    Option         "Coolbits" "28"
    Option         "ConnectedMonitor" "DFP-0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

I managed to solve this just editing /etc/X11/Xwrapper.config to:

allowed_users = anybody
needs_root_rights = yes

But I didn’t understand what’s happened, if someone can explain I’ll appreciate.

The Xserver needs to run as root to be able to set overclocking:
https://forums.developer.nvidia.com/t/465-24-02-no-longer-able-to-set-graphics-clock-offset-and-memory-transfer-rate-offset/175640