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.

BIOS CHANGES

To get things working

Method 1 (BIOS Method)

Disable Secure boot in the UEFI
Enable Legacy boot

Method 2 (UEFI Method)

Disable Secure boot in the UEFI

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 /boot/efi 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.

Bumblebee setup:

Using the guide here : https://fedoraproject.org/wiki/Bumblebee

  1. 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
    
  2. Install packages:

    dnf install bumblebee-nvidia bbswitch-dkms VirtualGL.x86_64 VirtualGL.i686 primus.x86_64 primus.i686 kernel-devel
    
  3. Fix Grub

    1. Edit /etc/defaults/grub
    2. Append to the end of the GRUB_CMDLINE_LINUX= the following acpi_osi=! acpi_osi='Windows 2009'
    3. BIOS Method : grub2-mkconfig -o /boot/grub2/grub.cfg
    4. UEFI Method : grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
    5. 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

  1. Backup Dell's Windows preload using their tool in Win10 or use clonezilla
  2. Modify the UEFI so Fedora can boot after installation
  3. Partition appropriately
  4. After first boot, update and reboot
  5. Install bumblebee repos
  6. Fix grub
  7. 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. I had to dump Negativo's wonderful repo early on as a way to troubleshoot why things would work, then after a day (I installed stuff) or so things were hideously broken. This came from Negativo's packaging of things like Handbrake that have (still do) dependencies on things that pull in bits of the NVIDIA driver, which screws 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).
  • 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.