Can't open nvidia-settings as sudo

Hello!

when i try to run sudo nvidia-settings in any terminal or in any shell it asks for my password and then just "loads" for eternity. Nothing happens.

But when i open the nvidia-settings without sudo, they open perfectly fine.

inxi:

System:
  Kernel: 5.19.2-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.1.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=c3ef0d61-a4ef-469b-96b1-b7a7583d021e rw [email protected]
    quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    loglevel=3
  Desktop: KDE Plasma v: 5.25.4 tk: Qt v: 5.15.5 info: latte-dock, polybar
    wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: ROG STRIX B450-F GAMING v: Rev 1.xx
    serial: <superuser required> BIOS: American Megatrends v: 4801
    date: 03/02/2022
CPU:
  Info: model: AMD Ryzen 5 2600X bits: 64 type: MT MCP arch: Zen+ gen: 2
    built: 2018-21 process: GF 12nm family: 0x17 (23) model-id: 8 stepping: 2
    microcode: 0x800820D
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 576 KiB desc: d-6x32 KiB; i-6x64 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 16 MiB desc: 2x8 MiB
  Speed (MHz): avg: 3926 high: 4057 min/max: 2200/3600 boost: enabled
    scaling: driver: acpi-cpufreq governor: performance cores: 1: 3733 2: 4046
    3: 4057 4: 4044 5: 3930 6: 4015 7: 3965 8: 3600 9: 3600 10: 4035 11: 4051
    12: 4046 bogomips: 86240
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT vulnerable
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, STIBP:
    disabled, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GA104 [GeForce RTX 3070] vendor: ASUSTeK driver: nvidia
    v: 515.65.01 alternate: nouveau,nvidia_drm non-free: 515.xx+ status: current
    (as of 2022-07) arch: Ampere code: GAxxx process: TSMC n7 (7nm)
    built: 2020-22 pcie: gen: 3 speed: 8 GT/s lanes: 8 link-max: gen: 4
    speed: 16 GT/s lanes: 16 bus-ID: 09:00.0 chip-ID: 10de:2484
    class-ID: 0300
  Device-2: Microdia USB Live camera type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 1-6.3:6 chip-ID: 0c45:6537
    class-ID: 0102 serial: <filter>
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
    compositors: 1: kwin_x11 2: Picom v: git-f70d0 driver: X: loaded: nvidia
    gpu: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 4520x1920 s-dpi: 51 s-size: 2251x301mm (88.62x11.85")
    s-diag: 2271mm (89.41")
  Monitor-1: DP-2 pos: primary,top-left res: 1080x1920 hz: 60 dpi: 92
    size: 299x531mm (11.77x20.91") diag: 609mm (23.99") modes: N/A
  Monitor-2: DP-4 pos: primary,bottom-r res: 3440x1440 dpi: 109
    size: 800x330mm (31.5x12.99") diag: 865mm (34.07") modes: N/A
  OpenGL: renderer: NVIDIA GeForce RTX 3070/PCIe/SSE2 v: 4.6.0 NVIDIA
    515.65.01 direct render: Yes
Audio:
  Device-1: NVIDIA GA104 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel bus-ID: 1-6.3:6 pcie: chip-ID: 0c45:6537
    gen: 3 class-ID: 0102 serial: <filter> speed: 8 GT/s lanes: 8 link-max:
    gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 09:00.1 chip-ID: 10de:228b
    class-ID: 0403
  Device-2: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 0c:00.3
    chip-ID: 1022:1457 class-ID: 0403
  Device-3: Microdia USB Live camera type: USB
    driver: snd-usb-audio,uvcvideo
  Device-4: C-Media TONOR TC30 Audio Device type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-6.4:8 chip-ID: 0d8c:0134
    class-ID: 0300 serial: <filter>
  Sound Server-1: ALSA v: k5.19.2-zen1-1-zen running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: PulseAudio v: 16.1 running: no
  Sound Server-4: PipeWire v: 0.3.56 running: yes
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel
    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 04:00.0
    chip-ID: 8086:1539 class-ID: 0200
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: anbox0 state: down mac: <filter>
Bluetooth:
  Device-1: ASUSTek Broadcom BCM20702A0 Bluetooth type: USB driver: btusb
    v: 0.8 bus-ID: 3-2.1.1:4 chip-ID: 0b05:17cb class-ID: fe01 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
  Local Storage: total: 2.88 TiB used: 1.27 TiB (44.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix
    model: HFM256GDHTNG-8310A size: 238.47 GiB block-size: physical: 512 B
    logical: 512 B speed: 15.8 Gb/s lanes: 2 type: SSD serial: <filter>
    rev: 80070C00 temp: 43.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:2 vendor: Samsung model: SSD 970 EVO
    250GB size: 232.89 GiB block-size: physical: 512 B logical: 512 B
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 1B2QEXE7
    temp: 47.9 C scheme: MBR
  ID-3: /dev/sda maj-min: 8:0 vendor: Crucial model: CT1000MX500SSD1
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B
    speed: 6.0 Gb/s type: SSD serial: <filter> rev: 033 scheme: GPT
  ID-4: /dev/sdb maj-min: 8:16 vendor: SanDisk model: SDSSDP128G
    size: 117.38 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> scheme: GPT
  ID-5: /dev/sdc maj-min: 8:32 vendor: Samsung model: HD103SI
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s
    type: N/A serial: <filter> rev: 1118 scheme: MBR
  ID-6: /dev/sdh maj-min: 8:112 model: iSCSI Disk size: 500 GiB block-size:
    physical: 16384 B logical: 512 B type: N/A serial: N/A rev: 0123
Partition:
  ID-1: / raw-size: 232.88 GiB size: 232.88 GiB (100.00%) used: 164.07 GiB
    (70.5%) fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:3
  ID-2: /home raw-size: 232.88 GiB size: 232.88 GiB (100.00%) used: 164.07
    GiB (70.5%) fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:3
  ID-3: /var/log raw-size: 232.88 GiB size: 232.88 GiB (100.00%) used: 164.07
    GiB (70.5%) fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:3
  ID-4: /var/tmp raw-size: 232.88 GiB size: 232.88 GiB (100.00%) used: 164.07
    GiB (70.5%) fs: btrfs dev: /dev/nvme1n1p1 maj-min: 259:3
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.54 GiB used: 97 MiB (0.6%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 56.0 C mobo: 45.0 C gpu: nvidia temp: 42 C
  Fan Speeds (RPM): cpu: 1315 case-1: 900 case-2: 0 case-3: 0 gpu: nvidia
    fan: 53%
  Power: 12v: 9.92 5v: N/A 3.3v: N/A vbat: 3.21
Info:
  Processes: 404 Uptime: 1h 23m wakeups: 0 Memory: 15.54 GiB used: 7.83 GiB
  (50.4%) Init: systemd v: 251 default: graphical tool: systemctl
  Compilers: gcc: 12.1.1 clang: 14.0.6 Packages: pacman: 2051 lib: 548
  Shell: fish v: 3.5.1 running-in: alacritty inxi: 3.3.20
Garuda (2.6.6-1):
  System install date:     2022-08-18
  Last full system update: 2022-08-19
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       <superuser required>
  Snapshots:               Snapper
  Failed units:            systemd-networkd-wait-online.service

Firstly, why do you want to open nvidia-settings as sudo?

Secondly, it is opening fine here, on Cinnamon edition. So might be KDE issue.

Also, you should try

sudo su

and then open nvidia-settings . It will open nvidia-settings as root, for whatever reason you want it.

1 Like

Use pkexec instead of sudo for GUI apps wherever possible.

pkexec nvidia-settings
1 Like

Because i can't save the config file as user. Therefore my OpenGL Settings don't persist after reboot

Most probably - i'm having multiple issues with KDE at the moment...

Nope, that did not do it...exact same behaviour.


This gave me some "result"! finally!

pkexec nvidia-settings
ERROR: The control display is undefined; please run `/usr/bin/nvidia-settings --help` for usage information.

that's super weird...

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.