Closed DevDorrejo closed 5 years ago
i will do a clean install, have 1 year and i did too much config
Seems your nvidia driver installation failed or is broken meanwhile, so 'nvidia-xconfig --query-gpu-info' fails, so we cannot find the required information for PCI BusID.
For some reason the command apparently still returns 0 (I cannot reproduce this even on a non-nvidia machine), so our check if the command is successful doesn't cover this behaviour.
I can improve the check so it also covers an empty string (assuming it is empty!), but this won't fix your nvidia driver installation of course.
diff --git a/prime-select.sh b/prime-select.sh
index 045db5d..63d868f 100755
--- a/prime-select.sh
+++ b/prime-select.sh
@@ -166,7 +166,7 @@ EOF
`
gpu_info=$(nvidia-xconfig --query-gpu-info)
# This may easily fail, if no NVIDIA kernel module is available or alike
- if [ $? -ne 0 ]; then
+ if [ $? -ne 0 -o "$gpu_info" == "" ]; then
logging "PCI BusID of NVIDIA card could not be detected!"
exit 1
fi
@@ -223,7 +223,7 @@ function common_set_intel {
gpu_info=$(nvidia-xconfig --query-gpu-info)
# This may easily fail, if no NVIDIA kernel module is available or alike
- if [ $? -ne 0 ]; then
+ if [ $? -ne 0 -o "$gpu_info" == "" ]; then
logging "PCI BusID of NVIDIA card could not be detected!"
exit 1
fi`
If this helps to fix the behaviour of the script (I doubt!) I can add this patch, but first you should reset your config by running 'prime-select unset' (which doesn't fix your nvidia driver installation of course).
I've got the same error during boot. I think it caused by bbswitch that turns off nvidia card during boot and the "nvidia offload" setting in the intel xorgfile. Edit: resolved without setting bbswitch to keep power state nvidia during boot (edit /etc/modprobe.d/09-nvidia-modprobe-bbswitch-G04.conf, set load and unload to "-1", then do "sudo mkinitrd")
@simopil But then the switch should fail and script should bail out with exit 1. It apparently does not. That's what I don't understand here.
The error for me was during boot and not during switch, so I resolved it with preventing bbswitch to switching off nvidia itself during boot (and before prime-select execution)
@simopil OK. If this required a patch against suse-prime, could you do a pull request, please? Thanks!
hello, i did a fresh install and the problem was solved, i found before the fresh install, that the folder /etc/X11/xorg.conf.d was empty, and gave bad perfomance on the nvidia and on the intel, i will close this issue.
Ok. Thanks for the update!
hello, when i install the prime-select, none of the listed files on the github are on the folder and neither the .service files, and when try use prime-select got error and false positive: