Grub2

Schenker XMG P407

Installing Xubuntu on the P407

I stumbled across some big problems with nouveau, like i could not login or even turn of the pc properly.

First fix already happens on booting the live-cd.
You need to change the boot entry for the Installer from:

linux options options ... 
to
linux options options nouveau.blacklist=1

Press F10 to apply and continue booting.

If it still does not work you need to add acpi=off additionally.
If it still does not work try acpi_osi=! acpi_osi=\"Windows 2009\"

Now install xubuntu to your liking, it might not be able to turn off successfully, just ignore that and hard reset the laptop, it should boot normally.
You need to add the same lines again to the grub bootloader as to the live-cd, so if the grub menu doesn't appear for you, boot from a live cd again and skip the next step.

Search again for the linux line and add the nouveu.blacklist=1 to the end

linux options options ... 
to
linux options options nouveau.blacklist=1

Press F10 to apply and continue booting.

Now login and add /etc/default/grub as root.
There you look for the line

GRUB_CMDLINE_LINUX_DEFAULT=options

and replace it to

GRUB_CMDLINE_LINUX_DEFAULT=options noveau.blacklist=1

and apply it with sudo update-grub2.

Now to installing the latest drivers:

Remove all existing drivers on your system and update the cache.

sudo apt-get purge nvidia*
sudo apt-get update

Now look for the latest nvidia driver via apt-cache

sudo apt-cache search nvidia binary

and install the latest one (a.k.a the one with the highest number). There might be stability issues, so research a bit if there is a recommended, older one. In my case i had to install nvidia-384.

sudo apt-get install nvidia-384

The system should now be working.

Arch/Manjaro on P407

Basically the same as above, i used Manjaro Architect to get a nice i3 feeling going.
As it does not boot into a Window Manager, i had no problem with boot parameters, might need to add the noveau blacklisting and acpi if problems ensure (see above).

Use the manjaro mhwd tool to configure bumblebee and the nvidia drivers for you, easy as sudo mhwd -a pci nonfree 0300.

To actually get the nvidia card, your window manager (lightdm or so) and x11 to work together, the acpi settings need to be set to acpi_osi=! acpi_osi=\"Windows 2009\".
This is done in /etc/default/grub, my grub cmdline:

GRUB_CMDLINE_LINUX_DEFAULT="quiet udev.log_priority=3 audit=0 acpi_osi=! acpi_osi=\"Windows 2009\""

the headphone amp is not working

Use the following package to enable the headphone amp
Also supports predefined equalizer effect
GitHub init-headphones

Surface Pro 3 Grub Boot

How to install grub2 in efi after it failed to install it automatically

  1. Boot into Ubuntu LiveCD

  2. Open a Terminal, access sudo

  3. modprobe efivars
    
  4. Mount the installed ubuntu partition on /mnt

    mount /dev/sdaX /mnt
    for i in /dev /dev/pts /proc /sys; do mount --bind $i /mnt$i; done
    

    Mount the efi partition in the ubuntu system partition

    mount /dev/sdaX /mnt/boot/efi
    
  5. Chroot into mnt chroot /mnt

  6. Check if you got access to the efi boot manager entries

    efibootmgr -v
    

    If you get errors like Input/Output error for Boot0003 or so you have to enter the entries manually later.

  7. install grub:

    apt-get update && apt-get install --reinstall grub-efi
    grub-install 
    update-grub
    

    If you got no error you should be done.
    If you got an error on efibootmgr before you are NOT done.

  8. Open another terminal with sudo access

  9. Look up all boot entries with

    efibootmgr -v
    

    delete all unused entries with

    efibootmgr -b <X> -B
    
    • -b X defines the Boot000X number
    • -B removes
  10. Àdd the boot entry for your system

    efibootmgr -c -d /dev/sda -p X -L "BootEntryName" -l "\efi\ubuntu\grubx64.efi"
    
    • -c creates new entry -d is the disk -p is the sdaX entry of the EFI partition
    • -L is the shown Name on the Grub Loader -l is the path on the EFI Partition to the loader

    on ubuntu it SHOULD BE \efi\ubuntu\grubx64.efi but verify first!
    YES BACKSLASHES NEEDED

Fixing missing EFI Boot Entry on mainboard firmware

Somehow my laptop did not want to boot into my Arch Linux installation anymore. The only message i received was an "No Operating System found" error. After backing up the data on the disk, i booted into an Ubuntu live image to investigate further.

First, I verified that a valid EFI parition was on the disk and if the EFI/GRUB/grubx64.efi file was on it. EFI boot partition looked fine, however, the laptop itself did not have any valid UEFI selection entry for the disk except the entire disk itself.

Using the tool 'efibootmgr', I check all UEFI entries for the laptop, and surprise, there was none for Arch Linux. So I added one using the following efibootmgr command.

sudo efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "Arch Linux" --loader \\EFI\\GRUB\\grubx64.efi

Relevant text from source on reddit:

Not sure if it's the same problem, but I think it's worth checking anyway.
I had trouble booting from an SSD when I tried to put it into another PC and it wouldn't see it as a bootable device.
Turns out I had to add a corresponding boot entry to the so-called NVRAM on the motherboard.
You may have skipped this step during the installation process somehow.
Try running efibootmgr from a live environment to see the current entries. 
If it's not listed there, you can create it by doing something like this:
sudo efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "Arch Linux" --loader \\EFI\\GRUB\\grubx64.efi
where /dev/nvme0n1 is the device with the EFI partition, and \\EFI\\GRUB\\grubx64.efi is the path to your loader's EFI application.