Monday, April 24, 2017

drivers - NVIDIA-PRIME: Cant switch to intel

Whenever I switch from my gpu (gtx 1060) to my igpu (Intel 530), I cant boot.
The loading screen is stuck with the following message:





[Failed] Failed to start NVIDIA Persistence Daemon. See 'systemctl
status nvidia-persistenced.service' for details.




However, I can boot when I switch back to the Nvidia gpu and switching to my igpu without rebooting works temporarily.
I'm using Kubuntu 16.10 and only my internal laptop display.
That's the output when I switch to my igpu:




sudo prime-select intel
Info: the current GL alternatives in use are: ['nvidia-378', 'nvidia-378']
Info: the current EGL alternatives in use are: ['nvidia-378', 'nvidia-378']
Info: selecting nvidia-378-prime for the intel profile
update-alternatives: using /usr/lib/nvidia-378-prime/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-378-prime/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-378-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-378-prime/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf (i386-linux-gnu_egl_conf) in manual mode

sudo prime-select nvidia

Info: the current GL alternatives in use are: ['nvidia-378-prime', 'nvidia-378-prime']
Info: the current EGL alternatives in use are: ['nvidia-378-prime', 'nvidia-378-prime']
Info: selecting nvidia-378 for the nvidia profile
update-alternatives: using /usr/lib/nvidia-378/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-378/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-378/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-378/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf (i386-linux-gnu_egl_conf) in manual mode


Result of lspci -k | grep -EA2 'VGA|3D'




00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
DeviceName: Onboard IGD
Subsystem: CLEVO/KAPOK Computer HD Graphics 530
--
01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060] (rev a1)
Subsystem: CLEVO/KAPOK Computer Device 6a03
Kernel driver in use: nvidia



I tried to solve this issue on my own for over a week and have not a clue what to do. Everything I tried failed.



Could you please help me?



UPDATE 5.2.2017:



I tested it again today and realized that switching to the intel gpu does not work at all with 375 and 378. Logging out freezes the screen. So why did it work once? If I install all the drivers again after I deleted the old ones and afterwards use prime-select intel (without reboot!), prime-select does not update the prime profiles -> It selects one of the old non-nvidia profiles (mesa profiles instead of nvidia) and it works. But as soon as I switch to an nvidia profile or reboot, the prime profiles are updated and it doesn't work anymore. So I guess there's something wrong with the EGl alternatives for the intel gpu? Sorry for any inconvenience.



UPDATE 12.2.2017:




Yesterday, I modified the nvidia-prime software and fixed the bug. I will soon publish (probably next week) my modified version and paste a link here, but I still encounter an issue: when I shutdown my PC after I executed sudo prime-select intel:



ksmserver crashes (I'm using Kubuntu, probably not a problem with Ubuntu)



-> the PC can't shutdown completely and the old (wrong) update-alternatives for the Intel GPU are restored



-> I can't boot.



However, if I run sudo prime-select intel after shutdown in recovery mode everything works alright and I can use the Intel GPU.




UPDATE 17.2.2017:



I posted my workaround and am still trying to get the Bug fixed in the official Repositories. However, this is probably a Bug in update-alternatives, so at next I have to post a bug-report there.



In the meantime, enjoy my workaround! I hope it works for you too. If there are any questions please leave a comment.



UPDATE 26.2.2017



As @whizzzkid pointed out, the nvidia graphics card still remains active after applying my patch. However, today I was able to resolve this issue. I will probably update my answer to include my 2nd patch next week. Here are some tests I ran:




Nvidia: 43-45W



Intel (nvidia on): 29-31W



Intel (nvidia off): 15-17W

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...