Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong xrandr pattern match? #12

Open
a-m-s opened this issue Nov 14, 2019 · 7 comments
Open

Wrong xrandr pattern match? #12

a-m-s opened this issue Nov 14, 2019 · 7 comments

Comments

@a-m-s
Copy link

a-m-s commented Nov 14, 2019

The applet doesn't appear to work correctly for me. It shows the Prime Profile I currently have selected, but does not offer any others for me to switch to.

If I select On-demand mode in the NVidia X Server Settings, reboot, and then try offload-glx, it says xrandr: NVIDIA GPU screen not detected.

I have an NVidia Quadro M3000M. It shows in xrandr --listproviders like this:

Providers: number : 2
Provider 0: id: 0x2b5 cap: 0x1, Source Output crtcs: 4 outputs: 6 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x49 cap: 0x6, Sink Output, Source Offload crtcs: 3 outputs: 7 associated providers: 1 name:modesetting

The problem seems to be that mate-optimus is expecting to find NVIDIA-G where I have NVIDIA-0.

If I change the pattern match to NVIDIA-0, then both scripts function as expected (although I can't see any performance difference between on-demand and performance mode, but I don't think that's your fault as I still can't if I reboot into performance mode only.)

@MJimitater
Copy link

I had that problem too, until I created a file at /etc/X11/xorg.conf.d/nvidia.confand put

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

in it. Then I rebooted and xrandr --listproviders showed NVIDA-G0

@a-m-s
Copy link
Author

a-m-s commented Feb 4, 2020

I created that file, but it doesn't seem to have had an affect on my system.

@MJimitater
Copy link

What driver are you using?

@a-m-s
Copy link
Author

a-m-s commented Feb 4, 2020

NVidia 435.21 from Ubuntu 19.10. The driver appears to be working fine; it's just the optimus applet that would be nice to have.

@MJimitater
Copy link

I see. I found this nice instruction, its for Mint actually, but works well for Ubuntu too. By following these instructions and also creating that file at /etc/X11/xorg.conf.d/nvidia.conf, I managed to have NVIDIA-G0 show up. Try it out and report back how it went :)

@a-m-s
Copy link
Author

a-m-s commented Feb 4, 2020

I followed those instructions, I think.
Good:

  • I get the NVIDIA-G0 thing, so the applet detects the driver.
  • "On demand" mode works: glxinfo shows Intel by default, and shows NVidia with the magic environment variables.

Bad:

  • nvidia-settings shows no X display and has can't make application profiles with any actual settings in them.
  • Neither nvidia-settings nor mate-optimus-applet can change the mode. It looks like it's changed, but there's no actual difference in behaviour after reboot.
  • The applet is therefore not useful.

So, it seems like I can choose between full mode switching via the applet (if I patch it to allow NVIDIA-0), or on demand switching via environment variables, but not both. Oh well.

I still think the applet needs to recognise both strings.

@MJimitater
Copy link

@a-m-s thanks, good to know. Yes, I agree that applet needs to recognize both strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants