You are not logged in.

#1 2020-05-22 03:02:59

prk07
Member
Registered: 2018-12-16
Posts: 15

How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

I have a Turing GPU which is capable of dynamic power management. Using optimus-manager to switch between three different modes, viz. intel, hybrid and nvidia. 
intel and nvidia modes works as designed but when I switch to hybrid mode to make GPU available for Prime offloading with power management, the Xorg generated by the optimus-manager loads Xorg on NVIDIA card as shown in the output of nvidia-smi.

Since Xorg remains on GPU, it prevents power management to switch off the GPU and thus I would like to make the intel iGPU to load the Xorg and make the NVIDIA GPU free of any pre-loaded applications. 

A similar post is available in the forums here, but the OP had no Turing GPU and thus the quest to unload the Xorg was stopped prematurely.

Please share some insight on Xorg config to make the iGPU load the Xorg. The Xorg config as generated by optimus-manager's hybrid mode is as shown below:

Section "ServerLayout"
        Identifier "layout"
        Screen 0 "intel"
        Inactive "nvidia"
        Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
        Identifier "intel"
        Driver "modesetting"
        BusID "PCI:0:2:0"
        Option "TearFree" "true"
        Option "DRI" "3"
EndSection

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

Section "Device"
        Identifier "nvidia"
        Driver "nvidia"
        BusID "PCI:1:0:0"
        Option "Coolbits" "28"
        Option "TripleBuffer" "true"
EndSection

Section "Screen"
        Identifier "nvidia"
        Device "nvidia"
EndSection

Offline

#2 2020-05-22 05:14:02

jonno2002
Member
Registered: 2016-11-21
Posts: 111

Offline

#3 2020-05-22 08:07:08

prk07
Member
Registered: 2018-12-16
Posts: 15

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

I have read these pages. The prime rendering is available in the hybrid mode of optimus-manager after using the information provided.
The issue is that the NVIDIA GPU is loading the xorg automatically in the hybrid mode which is preventing the dynamic power management to unload the nvidia card.

Offline

#4 2020-05-22 10:53:27

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 8,230

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

Have you checked the power management doc page from Optimus-manager wiki ?

optimus-manager readme wrote:

Power management

Since version v1.2, power management is disabled by default, so the Nvidia GPU will stay powered on (consuming energy) until manual configuration is done. This choice was made because there is no catch-all configuration that works for all laptop models, and incorrect configurations often break the boot process.

Please refer to the guide on power management in the Wiki.

Last edited by Lone_Wolf (2020-05-22 10:54:28)


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#5 2020-05-22 11:02:57

prk07
Member
Registered: 2018-12-16
Posts: 15

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

Lone_Wolf wrote:

Have you checked the power management doc page from Optimus-manager wiki ?

optimus-manager readme wrote:

Power management

Since version v1.2, power management is disabled by default, so the Nvidia GPU will stay powered on (consuming energy) until manual configuration is done. This choice was made because there is no catch-all configuration that works for all laptop models, and incorrect configurations often break the boot process.

Please refer to the guide on power management in the Wiki.


I have performed the manual configuration mentioned here but when I use hybrid mode in the optimus-manager, the Xorg process is loaded on the nvidia card which keeps the card active and thus keeps consuming energy.

Offline

#6 2020-05-22 11:45:15

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 8,230

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

The config you posted specifically allows the nvidia card to be inactive while the intel gpu is always active in that configuration .

It does sound like you may be facing a conflict between optimus-manager and the nvidia proprietary driver .
Please check https://github.com/Askannz/optimus-mana … nt-options .


Xorg process is loaded on the nvidia card

I don't understand what you mean by that, are you paraphrasing some error message ?
If so, post the actual error message.


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#7 2020-05-22 12:03:44

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,018

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

As far as I know a xorg process will remain, but the power saving should be kicked in anyway. What actual power draw is listed in the nvidia-smi output?

Offline

#8 2020-05-22 12:03:56

prk07
Member
Registered: 2018-12-16
Posts: 15

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

Lone_Wolf wrote:

The config you posted specifically allows the nvidia card to be inactive while the intel gpu is always active in that configuration .

It does sound like you may be facing a conflict between optimus-manager and the nvidia proprietary driver .
Please check https://github.com/Askannz/optimus-mana … nt-options .


Xorg process is loaded on the nvidia card

I don't understand what you mean by that, are you paraphrasing some error message ?
If so, post the actual error message.


The following is the output of nvidia-smi in the hybrid mode of optimus-manager.

https://i.imgur.com/3QLeUIG.png


This is showing that the NVIDIA card is executing Xorg on itself. I would like to execute Xorg on intel iGPU in the hybrid mode so that the power management of NVIDIA can take the card to a lower state when there is no process on it.


Also, I do not understand how optimus-manager is in conflict with proprietar driver? Please explain.

Last edited by V1del (2020-05-22 12:10:29)

Offline

#9 2020-05-22 12:06:10

prk07
Member
Registered: 2018-12-16
Posts: 15

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

V1del wrote:

As far as I know a xorg process will remain, but the power saving should be kicked in anyway. What actual power draw is listed in the nvidia-smi output?

The xorg process gets removed in the intel mode. Although the power cosumption is ~5W but it can decrease down further due to new power management in the nvidia drivers, I believe.

Offline

#10 2020-05-22 12:11:37

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,018

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

Please post text as text and try not to doublepost. This output looks like it's supposed to, the card is off, fans aren't running, no GPU utilisation and has a residual consumption of 2W that you are unlikely to completely rid yourself of.

The "hybrid" mode configuration allocates your logical xorg screen (the AllowNvidiaGPUScreen option) to be available to the nvidia gpu on demand via the nvidia-prime (or rather the relevant environment variables that need to be passed to the process) utility. If you run

glxinfo -B

you will see that intel is being used to actually drive the screen if you run

nvidia-prime glxinfo -B #or manually pass the necessary environment variables

nvidia will be used.

Last edited by V1del (2020-05-22 12:17:46)

Offline

#11 2020-05-22 12:16:15

prk07
Member
Registered: 2018-12-16
Posts: 15

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

V1del wrote:

Please post text as text and try not to doublepost. This output looks like it's supposed to, the card is off and has a residual consumption of 2W that you are unlikely to completely rid yourself of.

Well, my goal is to get rid of Xorg from Nvidia card.

Offline

#12 2020-05-22 12:19:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,018

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

It's not, see my edit that hopefully adds some clarification. You are basing this on an incorrect assumption that the active xorg process prevents the card from being disabled. It is disabled, every other piece of information from that output shows that.

Last edited by V1del (2020-05-22 12:21:35)

Offline

#13 2020-05-22 12:27:43

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 8,230

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

Also, I do not understand how optimus-manager is in conflict with proprietar driver? Please explain.

Conflict may have been a bad choice.
The nvidia driver plus optimus-manager combination functions differently then the solo nvidia driver.
nvidia readme describes how things work without 3rd party additions like optimus-manager, optimus-manager wiki is where the behaviour of the combination is to be found.


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#14 2020-05-22 12:39:28

prk07
Member
Registered: 2018-12-16
Posts: 15

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

V1del wrote:

It's not, see my edit that hopefully adds some clarification. You are basing this on an incorrect assumption that the active xorg process prevents the card from being disabled. It is disabled, every other piece of information from that output shows that.

Okay.
So, the xorg process on nvidia waits for any external display that may utilize it in future??

Offline

#15 2020-05-22 12:41:34

prk07
Member
Registered: 2018-12-16
Posts: 15

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

Lone_Wolf wrote:

Also, I do not understand how optimus-manager is in conflict with proprietar driver? Please explain.

Conflict may have been a bad choice.
The nvidia driver plus optimus-manager combination functions differently then the solo nvidia driver.
nvidia readme describes how things work without 3rd party additions like optimus-manager, optimus-manager wiki is where the behaviour of the combination is to be found.

I have achieved prime rendering with nvidia-prime package and optimus-manager's hbrid mode. What do you suggest?? Can I use some better way to achieve the same results?

Offline

#16 2020-05-22 14:40:41

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,018

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

I doubt optimus-manager has much relevance on this (people often overestimate what optimus-manager is and does. it's basically a fancy way to have the correct xorg config set up on a given xorg initialization, whether you do that xorg configuration manually or let optimus-manager generate it, doesn't matter much once xorg is started). I don't think there's much you can do here and it does look like power management is applied to the best of its possibility. What is the overall system draw (check with powertop) ?

Last edited by V1del (2020-05-22 14:41:17)

Offline

#17 2020-05-22 15:43:24

prk07
Member
Registered: 2018-12-16
Posts: 15

Re: How to prevent Xorg on Nvidia dGPU [optimus] for laptop display?

V1del wrote:

I doubt optimus-manager has much relevance on this (people often overestimate what optimus-manager is and does. it's basically a fancy way to have the correct xorg config set up on a given xorg initialization, whether you do that xorg configuration manually or let optimus-manager generate it, doesn't matter much once xorg is started). I don't think there's much you can do here and it does look like power management is applied to the best of its possibility. What is the overall system draw (check with powertop) ?

The overall average power consumption is between 18-22W on battery with firefox, Jupyter, okular and wifi on.

But while charging the power draw steeply increases and remains constant at around 42W.

It is the main cause of heat generation during charging.

Sometimes it gets stuck in high power consumption state too during battery and I was believing that xorg is the culprit.

Sys info:

DELL XPS7590
512GB SSD
32GB RAM
Arch Linux KDE

Offline

Board footer

Powered by FluxBB