[Bug 1103816] New: nvidia-prime for openSUSE
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816 Bug ID: 1103816 Summary: nvidia-prime for openSUSE Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: x86-64 OS: Other Status: NEW Severity: Enhancement Priority: P5 - None Component: X11 3rd Party Driver Assignee: xorg-maintainer-bugs@forge.provo.novell.com Reporter: ilvipero@dazuzu.com QA Contact: sndirsch@suse.com Found By: --- Blocker: --- Hello, I know this is a very old topic and was discussed on forums many times. My only goal here is to help improve adoption of openSUSE on the desktop. I hope AMD Ryzen APUs will take over soon and eliminate the issue for everyone on GNU/Linux. Unfortunately, as of today, Nvidia-Optimus based laptops are still the majority out there. I have fiddled with this optimus issue for quite a while. I tried openSUSE, Arch, Ubuntu(and derivatives). In my humble opinion, as of today, the one distro that managed to get the best out of this largely unsupported optimus, is Ubuntu. I know Nvidia-Prime is actually a dumber switching method compared to bumblebee. However, because it is a dumb switch, it is also true that it works fine out of the box, it is easy for a regular desktop user to understand and operate. Basically, nvidia-prime exposes only one GPU at a time to the OS. therefore all software, games, steam, even wine apps, do not need any special parameter to choose the GPU. they just use the only one that is enabled, as if it was a regular desktop PC with a single GPU. Performance is really good too. And, as I said, this is really easy and straightforward for any user that either comes from other OS, or never had to deal with the infamous optimus on GNU/Linux. The main drawback is that switching between proprietary Nvidia and Intel, needs a system reboot. That's a bit of a bummer but I believe performance and simplicity advantages greatly out-weight this annoyance. There are some issues with nvidia-prime but those are being actively developed. As this example of a bug, Alberto Milone introduced some really nice fixes that made nvidia-prime even better, use less power, and switch faster. I submitted some feedback on this bug, showing power consumption, GPU switching speed, and reboot times. https://bugs.launchpad.net/ubuntu/bionic/+source/gdm3/+bug/1778011 I hope the openSUSE team considers this as an alternative to bumblebee. Best Regards Mauro -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c1
Michal Srb
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c2
--- Comment #2 from Mauro Gaspari
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c3
--- Comment #3 from Mauro Gaspari
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c4
--- Comment #4 from Mauro Gaspari
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c5
--- Comment #5 from Michal Srb
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c6
--- Comment #6 from Mauro Gaspari
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c7
Michal Srb
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c8
--- Comment #8 from Mauro Gaspari
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c9
--- Comment #9 from Michal Srb
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c10
--- Comment #10 from Michal Srb
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c11
--- Comment #11 from Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c13
--- Comment #13 from Michal Srb
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c14
--- Comment #14 from Stefan Dirsch
Hm. I tried local build of the 396 and it seems I was wrong. It does not appear to support server-side GLVND. So we would keep the alternatives switching for now.
Hmm. Maybe you need to set some option (check README). Not sure, why you thought NVIDIA would support this already. Has this been announced somewhere? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
Dr. Werner Fink
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c15
Michal Srb
Hmm. Maybe you need to set some option (check README). Not sure, why you thought NVIDIA would support this already. Has this been announced somewhere?
I saw announcement that 396 supports the 1.20.0 ABI and saw multiple GLVND related options in the help of the .run file. But upon closer inspection they are all client-GLVND related. No server-side GLVND support yet. I took the suse-prime scripts and removed things that are no longer needed: https://github.com/michalsrb/SUSEPrime https://build.opensuse.org/package/show/home:michalsrb:optimus-experiments/s... It works for me now. With xorg-x11-server and suse-prime from that repository I can easily switch between intel and nvidia. As root: prime-select nvidia systemctl restart display-manager As user in session: xrandr --listproviders Providers: number : 2 Provider 0: ... associated providers: 1; name: NVIDIA-0 Provider 1: ... associated providers: 1; name: Intel glxinfo | grep 'OpenGL renderer string' OpenGL renderer string: GeForce GT 640M LE/PCIe/SSE2 As root: prime-select intel systemctl restart display-manager As user in session: xrandr --listproviders Providers: number : 1 Provider 0: ... associated providers: 0; name: modesetting glxinfo | grep 'OpenGL renderer string' OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile Mauro, can you please test the xorg-x11-server and suse-prime from the https://download.opensuse.org/repositories/home:/michalsrb:/optimus-experime... repository? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c16
--- Comment #16 from Mauro Gaspari
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c22
Damian Zaręba
Indeed with modesetting things look better.
xrandr --listproviders Providers: number : 2 Provider 0: id: 0x29f; cap: 0x1 (Source Output); crtcs: 0; outputs: 0; associated providers: 1; name: NVIDIA-0 Provider 1: id: 0x47; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 3; outputs: 5; associated providers: 1; name: modesetting output eDP-1-1 output DP-1-1 output HDMI-1-1 output DP-1-2 output HDMI-1-2
# glxinfo|grep "OpenGL renderer string" OpenGL renderer string: Quadro M1200/PCIe/SSE2
Unfortunately screen remains blank. :-(
The original intel setting with xf86-video-intel installed didn't change anything to the original problem. Try with adding: xrandr --setprovideroutputsource modesetting NVIDIA-0 xrandr --auto to the .xinitrc or startup script of login manager like lightdm or GDM and check if it helps.
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c23
--- Comment #23 from Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c24
--- Comment #24 from Damian Zaręba
Ok. Made another test today with out Dell Precision 5510, the predecessor of 5520 (same Intel/NVIDIA GPU combo AFAIK) and there I get without intel X driver installed:
# prime-select intel # xrandr --listproviders Providers: number : 1 Provider 0: id: 0x47; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 3; outputs: 5; associated providers: 0; name: modesetting output eDP-1 output DP-1 output HDMI-1 output DP-2 output HDMI-2 # glxinfo |grep 'OpenGL rend' OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)
--> Wonderful (as before)
# prime-select nvidia # xrandr --listproviders Providers: number : 1 Provider 0: id: 0x219; cap: 0x1 (Source Output); crtcs: 0; outputs: 0; associated providers: 0; name: NVIDIA-0
So this time even no modesetting driver loaded at all when nvidia driver is loaded. :-( So results are even worse this time. And I can't give Damian's suggestions a try obviously. And of course I also get a black screen in NVIDIA mode. Sigh.
Damian, seems you have better results on your hardware, right?
Notatki really, I have black screen without NVIDIA PRIME, so we can try with original Ubuntu(In reply to Stefan Dirsch from comment #23)
Ok. Made another test today with out Dell Precision 5510, the predecessor of 5520 (same Intel/NVIDIA GPU combo AFAIK) and there I get without intel X driver installed:
# prime-select intel # xrandr --listproviders Providers: number : 1 Provider 0: id: 0x47; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 3; outputs: 5; associated providers: 0; name: modesetting output eDP-1 output DP-1 output HDMI-1 output DP-2 output HDMI-2 # glxinfo |grep 'OpenGL rend' OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)
--> Wonderful (as before)
# prime-select nvidia # xrandr --listproviders Providers: number : 1 Provider 0: id: 0x219; cap: 0x1 (Source Output); crtcs: 0; outputs: 0; associated providers: 0; name: NVIDIA-0
So this time even no modesetting driver loaded at all when nvidia driver is loaded. :-( So results are even worse this time. And I can't give Damian's suggestions a try obviously. And of course I also get a black screen in NVIDIA mode. Sigh.
Damian, seems you have better results on your hardware, right?
Notatki really. I have Dell Precision 5510 too. I have black screen when trying to use without suse-prime. I think we should get it nowy from fedora but from Ubuntu directly or focus on primus-vk instead of full switching oraz look how nvidia-xrun did it, mix with primus-vk and bumblebee then we have perfect switching, just like DRI_PRIME. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c25
--- Comment #25 from Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c26
--- Comment #26 from Damian Zaręba
You lost me. No idea what you mean exactly with "Notatki", "Original Ubuntu", "nowy", "primus-vk" and "oraz" ...
Sorry, polish autocorrect on a phone. "Notatki" meant "Not", "Original Ubuntu" meant original PRIME implementation from Ubuntu, "nowy" meant "not" and "oraz" meant "or". This is Primus-vk - https://github.com/felixdoerre/primus_vk -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c27
--- Comment #27 from Michal Srb
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c28
--- Comment #28 from Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c29
--- Comment #29 from Michal Srb
BTW, with which laptop are you testing?
It is s laptop I privately borrowed. It is Sony Vaio SVS15117FLB. It has Nvidia GeForce GT 640M LE. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c30
--- Comment #30 from Mauro Gaspari
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c31
Michal Srb
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c32
Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c33
--- Comment #33 from Michal Srb
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c34
--- Comment #34 from Damian Zaręba
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c35
--- Comment #35 from Michal Srb
Will It be configurable to use Intel driver instead of modesetting driver? Because Modesetting gives me a huge tearing and acceleration problems on mine Intel i7-6820HQ machine. I will try this out right now and post results here.
Yes, you would just need to change "modesetting" to "intel" in both /prime/xorg-intel.conf and /prime/xorg-nvidia.conf. It should work the same with it. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c36
--- Comment #36 from Damian Zaręba
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c37
--- Comment #37 from Stefan Dirsch
Created attachment 785791 [details] Xorg.8.log
Unfortunately It don't work for me - still uses Intel, checked with glxinfo. I have Dell Precision 5510 with Quadro M1000M dGPU. System generates only Xorg.8.log, which is weird, because I don't have bumblebee on system at all. I've added that Xorg.8.log as attachment.
... iommu=on intel_iommu=on,igfx_off i915.enable_guc=3 rdblacklist=nouveau,nvidia nouveau.modeset=0 noibpb noibrs nopti nokpti threadirqs intel_pstate=skylake_hwp nmi.watchdog=0 spectre_v2=off scsi_mod.use_blk_mq=1 dm_mod.use_blk_mq=1 Please reduce your kernel options to the minimum. I was testing on my Inspiron 5510 with no additional kernel option. We try to enhance things for TW. So if you don't use TW yet, things may not work for you for this reason. [ 11906.312] (++) Using config file: "/etc/bumblebee/xorg.conf.nvidia" [ 11906.312] (++) Using config directory: "/etc/bumblebee/xorg.conf.d" [ 11906.312] (==) Using system config directory "/usr/share/X11/xorg.conf.d" Apparently you still have Bumblebee installed. I doubt this is a good idea and may mess things up. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c38
--- Comment #38 from Stefan Dirsch
I sent email to Bo Simonsen (original author of the suse-prime scripts) asking if he is interested in getting the changes back to his repository.
Thanks a lot!
I could submit the suse-prime and xorg-x11-server to X11:XOrg and from there to Factory and Tumbleweed. Then I can update the opensuse wiki to document how to use this.
Yes! Please go ahead! :-)
We could go bit further and make it selectable in display manager if we decide that it is worth it and we have the time. I would do it like this: * Add option to xorg.conf to select the libglx implementation, so we can switch between xorg-libglx and nvidia-libglx without having to change the symlink on disk.
Not sure how this is going work. Rename (also internally) both glx modules? I would assume you simply cannot easily rename NVIDIA's glx module internally.
* The intel-only setup would be the default and the nvidia+intel setup would be selected by launching X server with alternative configuration. (X -config ...)
Hmm. This makes things rather complicated, possibly even more complicated than using symlinks.
* Add intel/nvidia selection to display managers, at least to SDDM and GDM. So the display manager itself would always use the intel GPU, but it would be able to launch user sessions using either the intel or the intel+nvidia setup. All it needs to do is start X with alternative configuration.
Hmm. I would assume that if intel+nvidia works within a full Xsession, it would also work in the greeter. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c41
--- Comment #41 from Mauro Gaspari
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c47
--- Comment #47 from Stefan Dirsch
(In reply to Andrei Amuraritei from comment #45)
Thanks for this Michael. Any news / progress on display manager GPU select or change as detailed in #33?
I don't think I will have time to work on that. Hopefully Nvidia will implement their server-side GLVND some time next year and that will make all these workarounds obsolete.
https://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c21
My plan now is to wait for the suse-prime package to get accepted into Factory, then I'll document it in openSUSE wiki and then close this bug.
Thanks! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c51
--- Comment #51 from Mauro Gaspari
(In reply to Andrei Amuraritei from comment #45)
Thanks for this Michael. Any news / progress on display manager GPU select or change as detailed in #33?
I don't think I will have time to work on that. Hopefully Nvidia will implement their server-side GLVND some time next year and that will make all these workarounds obsolete.
My plan now is to wait for the suse-prime package to get accepted into Factory, then I'll document it in openSUSE wiki and then close this bug.
Michal, I have a quick question for you. Until the suse-prime gets accepted in Factory and available in Tumbleweed, do you encourage us to use your nvidia experiments repository and use suse-prime in production, report bugs, breaks etc? Or is it better to wait until we get it in Tumbleweed? Thanks Mauro -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c52
--- Comment #52 from Michal Srb
Until the suse-prime gets accepted in Factory and available in Tumbleweed, do you encourage us to use your nvidia experiments repository and use suse-prime in production, report bugs, breaks etc?
The package should be (hopefully soon) in Factory/Tumbleweed, so feel free to use it as it is in my repo. Bug reports are welcome - please assign them directly to me. But consider it bleeding-edge, just like the rest of Tumbleweed. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c53
--- Comment #53 from Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c55
--- Comment #55 from Stefan Dirsch
... then I'll document it in openSUSE wiki and then close this bug.
So that would be next. ;-) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c56
Michal Srb
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c57
--- Comment #57 from Stefan Dirsch
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816
http://bugzilla.opensuse.org/show_bug.cgi?id=1103816#c58
--- Comment #58 from Mauro Gaspari
participants (1)
-
bugzilla_noreply@novell.com