DELL INSPIRON 5577
This is a simple guide or notes on getting Fedora onto an Inspiron 5577, although this should be rather generic to not just the Inspiron 5000 series, but most Dell notebooks with hybrid graphics.
FEDORA/RHEL ON INSPIRON 5000 LAPTOPS
The model tested here were two Inspiron 5577 machines. i7-7700ha + nVIDIA 1050Ti model. The bumblebee portion below is specifically for machines with the NVIDIA discrete GPU. AMD discrete GPU owners (unsure of Dell model for this) are not going to need bumblebee in any way.
PRE - INSTALLATION
- Since this machine is preloaded with Windows 10 currently, you would be stupid not to create a USB recovery just in case you wish to sell this unit or if Dell wants to be jerks about repairs (VERY unlikely with my chats with Dell technicians, they appear to at minimal respect alternate OSs, especially non-Ubuntu distros). Dell ships a Win10 tool to do this, or you can use clonezilla to make a drive dump. I opted for both.
UEFI CHANGES
To get things working you will need to set in the UEFI the following depending on what mode you want the OS to operate in (EFI or BIOS):
BIOS METHOD
Disable "Secure Boot"
Enable "Legacy Option ROMs"
Enable "Attempt Legacy Boot"
UEFI METHOD
Disable "Secure Boot"
Disable "Legacy Option ROMs"
Disable "Attempt Legacy Boot"
FEDORA INSTALLER
-
The network installer should work fine, if you accept the fact that the additional drivers needed that are indeed baked in the full installer are not present. I had to use a 802.11n dongle and an external mouse since the WiFi and touchpad did not work.
-
The full installer was perfect. No issues. Using the BIOS method does incur a slight boot delay as it switches over to the Legacy Boot mode. Advice is to go the UEFI method.
-
My partioning schemes were:
#UEFI
Size | Mount Point | Disk |
---|---|---|
1GB | biosdata | ssd |
1GB | /boot | ssd |
8GB | swap | ssd |
Remaining space | / | ssd |
Entire Disk | /home | hdd |
BIOS
Size | Mount Point | Disk |
---|---|---|
1GB | /boot | ssd |
8GB | swap | ssd |
Remaining space | / | ssd |
Entire Disk | /home | hdd |
POST INSTALL
Update to the latest patch level. Do this first prior to anything else as it will greatly speed things up. Reboot after updating.
There are the two methods to getting the proprietary NVIDIA drivers setup:
- Prime - This is going to setup the NVIDIA card to be the only device that the system will use. As of the time or this article being written, the Intel GPU will not power down.
- Bumblebee - This will setup the Intel GPU to be the primary device, and can on demand call an application to use the NVIDIA GPU. This comes with a performance overhead, and can be quirky
It is advised that if you do not need the NVIDIA GPU to use neither. If you need the NVIDIA GPU to use Prime.
NVIDIA PRIME SETUP
This is the preferred method for using your NVIDIA GPU. Do the following to enable the NVIDIA driver on your system.
-
Update your system and then reboot
dnf -y update systemctl reboot
-
Enable the Negativo19 repo
dnf config-manager --add-repo=https://negativo17.org/repos/fedora-multimedia.repo
-
Install packages and then reboot
dnf install nvidia-settings kernel-devel dkms-nvidia vulkan.i686 nvidia-driver-libs nvidia-driver-libs.i686 akmod-nvidia kmod-nvidia systemctl reboot
-
Login using "GNOME on Xorg" Desktop environment (use the gear icon when typing your password in to select this). Wayland will not work as of this article being written due to a bug in Mutter.
This should give you the NVIDIA X Server Settings application and you can validate that things worked out OK by:
$ glxinfo | grep glx
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
$
BUMBLEBEE (OPTIONAL, ANTIQUATED, SUBOPTIMAL)
Using the guide here : https://fedoraproject.org/wiki/Bumblebee. Please note that Bumblebee is NOT compatible with any other NVIDIA driver source, and is very picky about what is present on the system. It is a mess to try to go from one version of NVIDIA to the other, certainly the case here. As of this article being written, Bumblebee is a very fragile hack, that although works, can break very easily. It is highly advised to start with a fresh install and then immediately update and proceed to Bumblebee installation to avoid problems.
-
First install repos
dnf -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/fedora$(rpm -E %fedora)/noarch/bumblebee-release-1.2-1.noarch.rpm http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree/fedora$(rpm -E %fedora)/noarch/bumblebee-nonfree-release-1.2-1.noarch.rpm
-
Install packages:
dnf install bumblebee-nvidia bbswitch-dkms VirtualGL.x86_64 VirtualGL.i686 primus.x86_64 primus.i686 kernel-devel
-
Fix Grub
- Edit /etc/defaults/grub
- Append to the end of the GRUB_CMDLINE_LINUX= the following acpi_osi=! acpi_osi='Windows 2009'
- BIOS Method : grub2-mkconfig -o /boot/grub2/grub.cfg
- UEFI Method : grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
- Reboot
EFI UPDATING
Updating the EFI is not as easy as Dell and Red Hat would like as of yet. But it is very simple compared to other machines.
The process is straightforward and will require the following:
- The latest Dell firmware which can be downloaded from Dell.com. This will be an EXE file.
- A USB flash drive that we will need to format, or is formatted, as bootable vfat NTFS to hold the EFI firmware
- Reliable power for the computer to work off of. Some Dell models REQUIRE power in order to update, and will not start on battery. Not sure on this model, but lets be safer than sorry, right :D
- 10 minutes for setup and flashing
To make your USB flash drive function as need be we need to do the following steps (presuming sdc as your USB flash drive:
$ sudo fdisk /dev/sdc
Welcome to fdisk (util-linux 2.28.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sdc: 7.4 GiB, 7918845952 bytes, 15466496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1753f2e9
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 15466495 15464448 7.4G b W95 FAT32
Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-15466495, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-15466495, default 15466495):
Created a new partition 1 of type 'Linux' and of size 7.4 GiB.
Command (m for help): a
Selected partition 1
The bootable flag on partition 1 is enabled now.
Command (m for help): t
Selected partition 1
Partition type (type L to list all types): b
Changed type of partition 'Linux' to 'W95 FAT32'.
Command (m for help): p
Disk /dev/sdc: 7.4 GiB, 7918845952 bytes, 15466496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1753f2e9
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 15466495 15464448 7.4G b W95 FAT32
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
$ sudo partprobe
$ sudo fdisk /dev/sdc
Welcome to fdisk (util-linux 2.28.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sdc: 7.4 GiB, 7918845952 bytes, 15466496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1753f2e9
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 15466495 15464448 7.4G b W95 FAT32
Command (m for help): q
$ sudo mkfs -t vfat /dev/sdc1
I gave all the deetails here. But summarized, we create one type 'b' bootable partition on the drive. Quit, save, reload the partition table, make the filesystem.
Now however you want to do so, copy the EFI EXE into that disk partition.
Next we reboot, hit F12, select "BIOS Flash Update".
Inside the flash tool, if it sees a drive with flashable firmware EXE files, it will not throw out warnings. If it does, you have something wrong, and where it is hoping to see a file it cannot. I experienced this ALOT while poking around with where to drop the file so it would be happy. Failed attempts were /boot/efi/ and /boot/efi/EFI/. Perhaps I gaffed in the install on this particular unit (own several) and it is in BIOS mode instead (don't recall that being the case however).
Presuming success sofar, you should see the tool with the bottom right box should have your EFI EXE listed. Use the tab key and enter key to tab over to it, select it. That will light up the continue button to start the flash procedure. That procedure will take around 2m and involve a reboot to load and run the update file (you did see that it was an EXE, right), flash, and then reboot to a usable state. For the love of God, do not screw with the unit while it is flashing, let it do its thing. When it reboots the second time, you will eventually hit the GRUB2 bootloader and be able to enter into Fedora.
To validate EFI revision you can either actually go into the EFI, or use dmidecode:
$ sudo dmidecode -t 0
#dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: Dell Inc.
Version: 1.0.4
Release Date: 06/07/2017
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 16 MB
Characteristics:
PCI is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
EDD is supported
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int 13h)
3.5"/2.88 MB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
ACPI is supported
USB legacy is supported
Smart battery is supported
BIOS boot specification is supported
Function key-initiated network boot is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 1.0
$ sudo dmidecode -t 0 | grep Version
Version: 1.0.4
SUMMARY & CONCLUSION
- Backup Dell's Windows preload using their tool in Win10 or use clonezilla
- Modify the UEFI so Fedora can boot after installation
- Partition appropriately
- After first boot, update and reboot
- Install bumblebee repos
- Fix grub
- Reboot
Thats about it. Most of the effort here is all Bumblebee's fault. So whenever NVIDIA gets their stuff together, things will be much nicer. Sadly, there is no way to script this. But once you get this going, a clonezilla dump is fast and easy way to never have to do it again, barring a change in distro.
NOTES & COMMENTS
- Try to avoid anything that may muck with bumblebee.
- Dell wasn't kidding in chat -- this laptop is VERY linux friendly. Literally the ONLY issue is bumblebee (and not that big of one now that I know what I am doing)
- To change the trackpad behavior to the usual method of moving the viewport, rather than content, go into GNOME's Settings -> Mouse -> Turn off Natural Scrolling". Back to normal.
-
Fedora 25 has some really crappy results with regards to either Cinnamon or MATE packaging. Or both. The installation of such desktops screwed up GNOME badly with regards to how default xdg associations were set. The nasty one was getting rid of nautilus as the default. Working on making a script for this one. Just need time to test it, which is when I can afford to not need this machine (getting harder, I prefer this to my beast tower). BTW, the fix for a jacked-up defaults would be:
exo-preferred-applications
-
The laptop's power management really prefers suspend over hibernate. Not sure if this is a Red Hat/Fedora thing, or if other distributions have this behavior (actully works VERY well, no complaints at all). Hope to have time to test out SLE/OpenSUSE and perhaps even Ubuntu. Ubuntu is interesting to me again now that GNOME3 is back on the defaults menu.