You are not logged in.

#1 2017-06-21 10:37:30

Ifnister
Member
Registered: 2017-06-20
Posts: 15

Unable to run nvidia-settings

Hey,
I have a laptop with both a nvidia graphics card and an intel one and I would like to be able to use one or another depending on the task. Several months ago I had another similar laptop and installed Ubuntu on it. nvidia-settings allowed me to select either intel or nvidia and after relogging changes would be applied. I'm trying to do the same on Arch but I have not been able to run nvidia-settings.
Running nvidia-settings without sudo yields:

ERROR: Unable to find display on any available system

and with sudo

Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused

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

However echo $DISPLAY yields:

:0

so based on what I read on nvidia-settings --help this should be enough.
I've read that it is better to use gksudo for graphical applications so I installed it and after doing a "touch .Xauthority" in my home directory because it complained it didn't exist, a window asking for my password appears but I can not type anything inside that box.

I'm using GNOME and nvidia propietary drivers. Currently the nvidia card is being used.

lspci | grep VGA shows:

00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)

 

Many thanks

Offline

#2 2017-06-21 10:44:28

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,659

Re: Unable to run nvidia-settings

Ifnister wrote:

I'm using GNOME and nvidia propietary drivers. Currently the nvidia card is being used.

How are you determining that? Everything you posted so far points to the contrary.

To do "the same" on Arch read: https://wiki.archlinux.org/index.php/NVIDIA_Optimus (the Xorg configuration  is likely to not be strictly necessary anymore, pay close attention to the xrandr line definitions for .xinitrc/your display manager of choice (also note that there have been reports that GDM doesn't work correctly with this method, so you might want to use another DM/startx instead)

Offline

#3 2017-06-21 10:48:49

Ifnister
Member
Registered: 2017-06-20
Posts: 15

Re: Unable to run nvidia-settings

I know the nvidia card is being used because it appears in the output of dmesg | grep nvidia:

[    7.902547] nvidia: loading out-of-tree module taints kernel.
[    7.902550] nvidia: module license 'NVIDIA' taints kernel.
[    7.908660] nvidia-nvlink: Nvlink Core is being initialized, major device number 243
[    8.041100] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  381.22  Thu May  4 00:21:48 PDT 2017
[    8.064693] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    8.064697] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1

I'll have a look and post back

Offline

#4 2017-06-21 10:54:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,659

Re: Unable to run nvidia-settings

That just tells you that the nvidia kernel module is being loaded because a hardware device was found where the nvidia driver registers itself as the module to be loaded. It does not tell you in what way it is practically used if at all, which given that this is an optimus system, it won't be by default.

Also some tidbit, the adjustment Ubuntu made to nvidia-settings to show this switching option, is an Ubuntu downstream patch, it won't work the same way with the vanilla nvidia-settings shipped by Arch

Last edited by V1del (2017-06-21 10:57:22)

Offline

#5 2017-06-21 14:39:16

Ifnister
Member
Registered: 2017-06-20
Posts: 15

Re: Unable to run nvidia-settings

How do I look up what gpu is being used? nvidia-smi shows an increasing temperature since boot time for the nvidia gpu and heating is noticeable.

I followed the instructions in https://wiki.archlinux.org/index.php/NVIDIA_Optimus and now what? I'm aware I can turn off the nvidia gpu as explained in https://wiki.archlinux.org/index.php/Hybrid_graphics but this seems to turn it off until next boot. Is there a way to change without having to reboot?

Offline

#6 2017-06-21 15:02:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,659

Re: Unable to run nvidia-settings

I'd use bbswitch instead (or look at what that script for acpi call does, and write an alternative that sets it to on instead) bbswitch will create a file in /proc/acpi/bbswitch that you can echo ON or OFF to. Depending on what your actual requirements are you might also forgo this configuration and simply use Bumblebee which will allow you to selectively use the nvidia card only for specific applications while running everything else on the intel card, at a potential perf hit.

Another alternative to both of those options - which I only thought of now - is this collection of scripts which will open up a new X server on a seperate TTY and shutdown the GPU again afterwards: https://aur.archlinux.org/packages/nvidia-xrun/ -- this is likely the most in line with what you are used to regarding comfort/ease of use.

Easiest way to find out what is currently the used renderer is likely a

glxinfo | grep OpenGL #Requires mesa-demos

Another thing that^s quite important: All of this assumes you are running in a Xorg session, so if the choice is available, make sure to log into Gnome on Xorg in GDM, as it would use Wayland otherwise

Last edited by V1del (2017-06-23 13:58:12)

Offline

Board footer

Powered by FluxBB