The desired end state is a dual-boot setup with Windows 10 and Linux, with some sort of discrete graphics switching available from the Linux OS. I use Linux as the primary OS and rarely need the dedicated GPU as battery life is usually a higher priority.
- In the BIOS settings, disable secure boot,.
- Boot from the Ubuntu installation flash drive. Make sure you choose the UEFI boot option, not Legacy!
- Hit 'e' when you get to the grub prompt. This brings up an editor for the grub command line, but it will be very laggy. To get around this when we actually boot, add 'nomodeset' after 'quiet splash'.
- Hit F10 to boot with the modified command line.
- Run the Ubuntu installer. I made a 16 GB swap space at the end of the disk with a 180 GB ext4 partition before that for the mount point '/'. Make sure the actual internal SSD is the device selected for bootloader installation. It's way easier to make grub boot to Windows than to make the Windows bootloader see a Linux OS.
- When you reboot into the actual installed OS, follow the same steps to add 'nomodeset' to the boot command line. Otherwise the system will be unusable.
- The open-source nouveau driver for the GTX 1050 does not work well, at least for me, so we won't be using it. Open "Driver Manager" within Ubuntu. It will scan your system and determine that closed-source drivers are available for the 1050. Select the NVIDIA driver. As of when I'm writing this, the current release is 390 which is quite good. It will take a bit to download and install.
- To select which GPU to use (integrated or discrete), open the Nvidia X Server Settings. Under 'Prime Profiles', you can select between NVIDIA and Intel GPUs. You'll need to reboot (or at least logout and log back in) every time you do this. If you want to verify which GPU is in use, you can run glxgears. It should return around 60 fps on integrated and many thousands on the discrete card.
- For some reason, Ubuntu still loads the nouveau driver as a fallback. This prevents the laptop from suspending properly and is generally a huge pain. To disable it, add 'nouveau.modeset=0' to the default command line in /etc/default/grub. The line should look like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.runpm=0 nouveau.modeset=0"
Once that line has been added, reload the grub config.
sudo update-grub
- Some other things that might be helpful to do:
- Change the desktop scaling to 1.5x, which makes the 4K display more usable
- Change the touchpad settings to allow tap to click
- Also consider the post-install script at jamesbrahm.us/files/setup.bash
No comments:
Post a Comment