My thinkpad w520 will not boot with the default Grub menu if I am using Nvidia drivers and the Nvidia card (it's an Optimus system with two video cards). However, it boots in recovery mode, and goes on to work well.
The culprit is
gfxmode $linux_gfx_mode
If I remove this line with the Grub entry, it boots fine. (This line is not present in the recovery menu option).
Is there a sane way for me to edit the grub menu to get rid of it? Must I fiddle with scripts in /etc/default/grub.d ?
Best Answer
gfxmode was probably not really the problem. There were some kernel parameters that made the experience much better. It proved to be impossible to get this laptop working with Windows 10 (using the Nvidia card always), but it does work with Linux!
So on 16.04 (but with the 4.8 kernel) and Nvidia driver v 367, this is how you can get three monitors working (via a docking station) which is only possible with Optimus. Yes ... nvidia in discrete mode will only drive two outputs; not three. If you only need one external monitor and the laptop panel, you can either use optimus or discrete Nvidia. Discrete nvidia just works, no need for any config.
the machine will hang on boot unless you modify the grub cmd line entry to specify nox2apic /etc/default/grub...
GRUB_CMDLINE_LINUX_DEFAULT="agp=off quiet splash nox2apic"
There are additional suggestions in the history of the w520 but with this kernel, only this change is needed.
In any case, the brightness keys are working for me in optimus-nvidia mode, and changing brightness via the screen control panel works too.
Note: I follow the arch wiki instructions here:
https://wiki.archlinux.org/index.php/NVIDIA_Optimus#LightDM
and added the short script make some xrandr changes. I did this mainly to try to understand why I had only one provider, before I worked out that the nvidia brightness changes was the problem. Possibly I don't need the script, but I'm so pleased that it's all working I don't want to change a thing.
However, changing from nvidia to intel requires a reboot: merely logging out doesn't work.