I installed Optimus-swtich following this guide Optimus Switch - Another Solution for Optimus Laptops but I’m having some problems when I switch to nvidia prime mode. When I run sudo set-nvidia.sh and reboot, X doesn’t want to start. I’m greeted with a black screen and blinking cursor…switching back to “intel only” mode everything works perfectly fine.
Going back over my installation, one thing I noticed was that I did not edit my ~/optimus-switch-sddm/switch/nvidia/nvidia-xorg.conf before installing, I actually went back afterwards and changed the format to what was suggested in the manual on the github page (I changed nvidia bus ID to 1:0:0 instead of 01:00.0 VGA). Oddly enough there was no BusID listed for the intel card in ~/optimus-switch-sddm/switch/intel/intel-xorg.conf so I didn’t change anything there.
I’ve tried using it with both the standard kernel and lts, but I have the same result. I suppose I can try un-installing optimus-switch using the uninstall script included and try again from scratch but though I’d ask here first to see if anyone had run into any similar issues.
Appreciate the help and let me know if I can provide any additional logs. Thanks!
By not editing the file BEFORE you ran the install, the conf file installed is not correct. You should not need to uninstall it. Your best option is to run the install script again. However, BEFORE you do that, you need to do the following:
Open a terminal and run: lspci | grep -E 'VGA|3D' and take note of the nvidia Bus ID.
After you have cloned the git repository to your home directory by typing: git clone https://github.com/dglt1/optimus-switch-sddm.git go to the following folder ~/optimus-switch-sddm/switch/nvidia and open the nvidia-xorg.conf and make sure the Bus ID matches what is listed for the nvidia card.
Save the file.
Now run the install script.
If you still get to a black screen when trying to run on your nvidia card, you may need to use a kernel parameter. I would suggest either acpi_osi='Windows 2012' or acpi_osi='Windows 2018' or acpi_osi=Linux
If you need help in how to apply kernel parameters, take a look at this post.
Without any further information about your system, I can’t give you any more advice. More information can be obtained by opening a terminal and typing inxi -fxxz and posting the results here. This will tell us what kind of cpu you have and what nvidia card is installed in your system.
Thanks @linesma so much for your help! I tried a number of things you’d suggested, starting with re-running the installation script AFTER editing nvidia-xorg.conf but unfortunately no luck with anything I’ve tried. Here’s a breakdown thus far:
I edited my ~/optimus-switch-sddm/switch/nvidia/nvidia-xorg.conf following the GitHub guide and here’s what it currently looks like:
etc/X11/xorg.conf.d/99-nvidia.conf
#adjust BusID to match your nvidia GPU
#uncomment and edit the DPI option as needed
#to fix scaling issues.
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI: 0.1.0"
#Option "DPI" "96 x 96" #adjust this value as needed to fix scaling
Option "AllowEmptyInitialConfiguration"
EndSection
Section "Extensions"
Option "Composite" "Enable"
EndSection
I changed the BusID for the Nvidia to the format suggested in the GitHub guide. Compare that to the output of lspci | grep -E 'VGA|3D' in my original post for that particular card. I re-ran the installation script, issued sudo set-nvidia.sh, rebooted, and same black screen with a cursor.
Next I tried adding ACPI kernel parameters to grub as you advised - I actually started off with acpi_osi='Windows 2009' since my laptop originally came with Windows 7. Ran sudo grub-mkconfig -o /boot/grub/grub.cfg and rebooted (still in nvidia prime mode)…laptop hangs on TLP System startup/shutdown now. I tried this with the Windows 8 and Windows 10 parameters you’d suggested too and same issue. I even disabled TLP and tried again with the Windows 7 kernel parameter and still hangs on TLP system startup/shutdown. So for now I removed the Windows kernel parameter and re-enabled TLP and am back at square 1.
The more I’m reading the more I wonder if Bumblebee may be the better option for my system, especially because my laptop is older. I may try Bumblebee at some point later unless someone thinks it’s a terrible idea. Beyond that the only thing I can think of trying with optimus-switch is installing the legacy Nvidia drivers from AUR and trying to use them with switch…
I would give it a try with the AUR driver. Since you already have everything installed, this should be they only thing you need to do. I would do this all in a TTY session while in Intel mode. Make sure to remove or disable the nouveau driver BEFORE you reboot.
You may still need the kernel parameter, even with the proper driver installed. With my 2019 vintage Asus FX504GD, I have to use a kernel parameter to have everything work properly. Give it a try with the proper driver first. If it does not work, then try the kernel parameters. You should not need to go back to Windows 2009. The newer ones SHOULD be compatible with older hardware.
I have never been able to get Bumblebee to work properly with any laptop that I have owned that had Optimus capabilities. However, it may work better for you. It really depends on what you want to do. If all you are using your laptop for is e-mail, web, etc… In other words, not gaming. You may be able to get by in just Intel mode.
Thanks for the guidance! I’ll try this later tonight or tomorrow…it’s been a wild day at work today so might not get to it until later. I’ll be back with some updates!
After installing those, I attempted to blacklist the Nouveau driver(s) by doing the following 2 things:
Added blacklist nouveau to this file: /etc/modprobe.d/nouveau.conf
Regenerated initramfs with mkinitcpio -p linux
Added modprobe.blacklist=nouveau to my /etc/default/grub, and then updated with grub-mkconfig -o /boot/grub/grub.cfg
Here’s my current output for lspci -nnk | grep -i vga -A3 | grep 'in use'
` Kernel driver in use: i915
`
I then ran sudo set-nvidia.sh and rebooted, but it still hangs on the TLP System Startup/Shutdown. So I then tested each of the acpi kernel parameters for Windows (2009, 2012, and 2018) one by one. Still hangs on teh TLP message.I haven’t tried the Linux one just yet, but my laptop is a Toshiba so I didn’t think that one would apply. Not sure if it means anything, but the point that TLP message seems to hang is when Network Manager seems to be attempting to start…this is the same regardless of which acpi parameter I use.
Any more info I can provide I’ll be happy to share…I’m running out of ideas unfortunately . As always thanks for everyone’s help!!
I honestly do not know what could be going wrong at this point. You might really want to give Bumblebee a try. I have not tested this setup with a card that old. You also might try a couple of things. I am assuming you can get to a TTY? Or you can still boot to Intel mode. I would do the following:
I would delete anything that may even be graphics related. If you even THINK it is graphics related, delete it. Run the set-nvidia.sh command again and reboot.
Uninstall Nouveau. Sometimes blacklisting does not work properly.
Try the following kernel parameter: acpi_osi=! acpi_osi='Windows 2009' This will reset any vendor ACPI strings ans then apply a Windows 2009 ACPI table.
Nouveau is part of the mesa package, right? So I’d be looking at doing something like sudo pacman -Rs mesa. I’ll give that a try as well as the kernel parameter you suggested. All of those files in /etc are completely empty, so I didn’t need to clean anything out. They were actually empty before I installed Optimus Switch…
I suppose I’ll give this one more try then I’ll have to uninstall it and try Bumblebee instead. Crossing my fingers…
At least you have nvidia packages from different series. There are stuff from 470 series, 390 series and 340 series.
You should have only 390 series stuff.
And if you have nvidia-390xx-dkms, then you don’t need nvidia-390xx.
Nouveau is either a kernel module or from xf86-video-nouveau package.
Really appreciate everyone’s help with this…unfortunately I still can’t seem to get my nvidia card working properly with optimus-switch. I tried @linesma’s last suggestion and no luck…same issue. I’m pretty confident at this point that optimus-switch may just not be compatible with my system because of its age.
I actually uninstalled switch completely and am currently giving Bumblebee a go. So far it seems to be working perfectly, I just need to read up a bit more on how to configure it the way I want to and how to use it for stuff like Steam.
I suppose I’ll mark this as “Solved” only because I learned that my Optimus card is too old to be able to use optimus-switch but can still be useful with an app like Bumblebee. Again, thanks everyone for your help this week!!! Love this community!