New Laptop 2: Fedora

This is the second article in a three-article series. Continuing the setup and benchmark of my new black Dell G7-I5 7588 laptop using an Intel I9-8950HK CPU, with both Intel UHD 640 graphics and NVidia GeForce GTX 1060 graphics. See the previous article dealing with Windows for the first section on acquiring the new laptop and benchmarking the Windows installation.

Preparing Fedora

If you’ve never put Fedora Live on a USB stick, it’s impressively easy. On Windows, use Rufus or UNetbootin to write the ISO file to the stick. If you have access to a Linux system, use the following instructions:

  1. Download the ISO. The Workstation version is less than 2 GB so it can fit on a small USB stick. Downloading from Fedora’s site is easy. If you want to do it from the command line, use:
    $ time wget https://download.fedoraproject.org/pub/fedora/linux/releases/28/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-28-1.1.iso
    [...]
    Connecting to ewr.edge.kernel.org (ewr.edge.kernel.org)|147.75.197.195|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1787822080 (1.7G) [application/octet-stream]
    Saving to: ‘Fedora-Workstation-Live-x86_64-28-1.1.iso’
    
    Fedora-Workstation- 100%[===================>] 1.67G 1.38MB/s in 21m 47s
    
    2018-08-30 08:47:38 (1.30 MB/s) - ‘Fedora-Workstation-Live-x86_64-28-1.1.iso’ saved [1787822080/1787822080]
    
    real 21m49.894s
    user 0m44.151s
    sys 1m8.583s
  2. Insert the stick. Typically, Linux automatically mounts it. The ISO file will overwrite the stick. Backup what you want to preserve from this stick.
  3. Unmount the stick, but leave the device available to the system. To do this, do not use nautilus, the files app, to unmount it. Nautilus removes the device access from the system. Instead, open a terminal, verify what device it uses with df:
    $ df -h
     Filesystem Size Used Avail Use% Mounted on
    [...]
    /dev/sdb1  1.9G 4.0K  1.9G   1% /run/media/username/FEDORA28

    In this example, it lists /dev/sdb1. So it’s on device /dev/sdb where sdb1 means SCSI Disk “b” and partition 1.

    Use umount /dev/sdb1 to unmount the partition. That leaves the device (/dev/sdb) available. Nautilus still sees the stick after the umount, but the triangle icon used to unmount does not appear. df won’t show it any more, but you can prove the device remains available using sudo sfdisk -l:

    $ sudo sfdisk -l
    [...]
    Disk /dev/sdb: 1.9 GiB, 2003795968 bytes, 3913664 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: 0x3a663a44
     
    Device      Boot Start     End Sectors Size Id Type
    /dev/sdb1        2048 3913663 3911616 1.9G  c W95 FAT32 (LBA)

    The stick, e.g., /dev/sdb, probably listed last, shows all its partitions, in this case only one. It doesn’t matter how many partitions remain on this stick. The Fedora ISO will overwrite all of them. If the stick is no longer visible in the list, unplug the stick, plug it back in, verify it’s there with sfdisk, then umount the partitions, and finally verify again.

  4. Use the following command to write the ISO file directly on the stick. Using status=progress shows the bytes and time progress as it goes. The oflag=direct writes the bytes directly on the device without buffering. Using && sync flushes any remaining buffers if the dd command finishes successfully.
    $ time sudo dd if=Fedora-Workstation-Live-x86_64-28-1.1.iso of=/dev/sdb bs=8M status=progress oflag=direct && sync
    1787822080 bytes (1.8 GB, 1.7 GiB) copied, 276 s, 6.5 MB/s
    213+1 records in
    213+1 records out
    1787822080 bytes (1.8 GB, 1.7 GiB) copied, 276.153 s, 6.5 MB/s
    
    real 4m36.187s
    user 0m0.032s
    sys 0m1.421s
  5. When the command finishes, remove the stick. Remember, it’s not mounted on the file system.

You now have a bootable version of Fedora. This is known as the LIVE version because booting it starts a workable Fedora to experiment with on any system or you can install it on that system.

First thing you should do: Boot it on your system and test the media. You may have to use a boot menu to tell it to boot the stick instead of your main disk drive. On many Dell systems, press the F12 key when the Dell logo shows up. Booting the Fedora LIVE stick, the menu shows three choices:

  • Start …
  • Test …
  • Troubleshooting

A highlight of the “Test” line means it’s the current selection. If you don’t do anything right away, the timer will finish and start the highlighted entry. UP and DOWN arrow keys move the highlight. Use that “Test” option to check the media.

Your system will go through a boot process and may report messages on the screen. Ignore error messages so long as it starts testing.

  • Success: When it gets through 100% it tries to start Fedora LIVE. Either reboot your system and remove the stick if you don’t want to explore more or install.
  • Failure: If the test complains about an error, go back to dd, rewrite the ISO on the stick, and test again. If your stick continues failing, use another stick.

When the stick passes, use it for system testing and installing.

Update BIOS

Getting into BIOS differs among the many manufacturers’ systems. On the Dell G7, just after turning the power on, you have to press the special key when the Dell logo comes on the screen. Wait too long — even though the logo is still onscreen — and you’ll miss the timing and have to reboot.

User-hostile design is widespread.

Lately they don’t even tell you onscreen what key to press or when to press it. When you know which special key to press — on the G7, F2 gets into the BIOS and F12 gets into the Boot Option menu, so you have to try different keys until you find the right one — press the key repeatedly. When the system recognizes your keypressing it will put something on screen telling you what it will do.

Make sure you have the latest BIOS version installed. My new black Dell system’s BIOS will install a file downloaded from Dell.

Although the BIOS file comes as a Windows-oriented EXE file, rename the suffix from .exe to .rcv and put it on a different USB stick formatted with the FAT32 or NTFS filesystem. Out of the box, USB sticks typically use the FAT32 filesystem.

Put that downloaded renamed BIOS file on a different stick, plug it in, and use the BIOS update option to install it. Do the remaining instructions after installing the updated BIOS.

Prepare BIOS

Before installing Fedora, you must change the BIOS settings. Coming from a Windows installation, the system has “Secure UEFI” set.

Linux works with UEFI (Unified Extensible Firmware Interface), but not with the Secure setting.

Before turning on or rebooting the system, plug in the USB stick. If the stick is not in place before turning the system on, BIOS won’t know about it.

It has to be there before BIOS starts.

When using a USB v2 stick, plug it into a USB v3 slot if you have one. USB v3’s faster speed makes USB v2 sticks transfer faster.

The BIOS objectives: Keep UEFI and turn off the Secure setting. On my G7’s BIOS, I checked or modified the following settings:

BIOS Settings for UEFI:

§ General section:

  1. Boot Sequence: Both UEFI and USB stick tag and info should show.
  2. Advanced Boot Options: Enable Legacy and Enable Attempt.
  3. UEFI Boot Path Sec: Always, Except Internal HDD

§ Sys Config section:

  1. SATA Operation: AHCI
  2. USB Config: Enable USB Boot and Enable USB Port

§ Security section:

  1. PTT Security: Turn it off.

§ Secure Boot section:

  1. Enable: Turn it off.
  2. Mode: Set to Audit.

§ Post Behavior section:

  1. Fastboot: Thorough

§ SupportAssist System Resolution section [Optional]:

  1. Auto OS: Turn it off.
  2. Recovery: Turn it off.

The SupportAssist changes are entirely optional. Dell provides this special test operation for recovering the system when it cannot boot or it discovers some other extreme problem. While this could be a nice feature, when experimenting with these settings it’s a pain to have it on. When off, BIOS puts a simple text menu onscreen. Much easier to work with text during repeated experiments.

If you absolutely must install using a non-UEFI legacy boot, which uses the Master Boot Record (MBR) instead of UEFI, change the General section’s Boot Sequence to Legacy, with USB Storage first and Onboard NIC for PXE booting second if you need it.

Installing Fedora

After upgrading the BIOS, insert the Fedora LIVE installation stick, reboot the system, and start the Boot Option menu. Fedora’s LIVE menu should show in the boot menu. Among other settings, typically under the title “Legacy External Device Boot”, should appear “USB Storage Device”. Select that.

When the Fedora Live stick boots, it presents the typical Fedora install menu: “Start”, “Test”, and “Troubleshooting”. The second option, “Test”, is default.

With the BIOS set to unsecured UEFI, Fedora 28 still wouldn’t install on my black G7 using either the first menu option, “Start Fedora”, or the second menu option, “Test & Start Fedora”.

After some messing around I finally found out the problem: the default graphics install.

G7 typically hangs trying to start Fedora Live using high-end graphics. Just wouldn’t cooperate with the chipset on this Dell G7.

Only way to install was the third menu option: Troubleshooting.

Troubleshooting brings up a new menu. Its first option: “Start Fedora in Basic Graphics Mode”. Also known as KMS (Kernel Mode Setting), it ignores more advanced graphics facilities available. Instead the system uses llvmpipe.

In this mode, Fedora LIVE starts with its typical graphic login screen. G7 sets up the i915 driver for Intel graphics and the nouveau driver for NVidia graphics. Don’t know what Fedora expects in the more-than-Basic Graphics mode installation, but this works.

Fedora LIVE offers a user named “Live System User”. Pressing ENTER shows a password input box. That times out and presents a GNOME desktop.

Two large graphic box options appear:

  1. Try Fedora
  2. Install To Hard Drive

If you Try Fedora it gives you instructions to install when ready and lets you explore Fedora.

Guess what Install to Hard Drive does.

Installing first asks to set the timezone and select the disk drives. I select to encrypt the drives using LUKS (Linux Unified Key Setup). By selecting both my Samsung 970 and 860 drives, it combines them into a single filesystem.

Installing takes very little time to finish. When done, it returns to Fedora LIVE. Reboot.

Selecting reboot after installing may hang the system. Just hold down the power button until it turns off. Then turn it on again.

After installing, booting Linux shows the UEFI boot menu style.

Which Graphics?

Normal KMS booting uses the following boot command line:

$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-4.17.9-200.fc28.x86_64 root=/dev/mapper/fedora_localhost--live-root ro resume=/dev/mapper/fedora_localhost--live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap nomodeset rhgb quiet LANG=en_US.UTF-8

Notice the nomodeset entry near the end of the boot command line. It bypasses the GPUs with software rendering using llvmpipe.

Use lspci(8) to find the video devices in use. It shows all PCI bus hardware, so isolate just the VGA devices:

$ lspci -vnn | egrep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:3e9b] (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile] [10de:1c20] (rev a1) (prog-if 00 [VGA controller])

Use lsmod(8) to see which driver modules the kernel loaded:

$ lsmod | egrep video
[...]
video                 45056 4 dell_wmi,dell_laptop,i915,nouveau

Notice lsmod‘s last line shows drivers named i915 and nouveau. Use modinfo(8) to see a bit more about these drivers:

$ modinfo i915 | egrep 'description|author|name'
filename:       /lib/modules/4.17.12-200.fc28.x86_64/kernel/drivers/gpu/drm/i915/i915.ko.xz
description:    Intel Graphics
author:         Intel Corporation
author:         Tungsten Graphics, Inc.
name:           i915

$ modinfo nouveau | egrep 'description|author|name'
filename:       /lib/modules/4.17.12-200.fc28.x86_64/kernel/drivers/gpu/drm/nouveau/nouveau.ko.xz
description:    nVidia Riva/TNT/GeForce/Quadro/Tesla/Tegra K1+
author:         Nouveau Project
name:           nouveau

Even with KMS, Fedora loads both i915 and nouveau drivers:

$ lsmod | egrep 'i915|nouveau|nvidia'
nouveau             2023424 0
i915                2052096 0
ttm                  126976 1 nouveau
i2c_algo_bit          16384 2 i915,nouveau
drm_kms_helper       196608 2 i915,nouveau
mxm_wmi               16384 1 nouveau
drm                  458752 4 drm_kms_helper,i915,ttm,nouveau
video                 45056 4 dell_wmi,dell_laptop,i915,nouveau
wmi                   32768 7 intel_wmi_thunderbolt,dell_wmi,wmi_bmof,dell_smbios,dell_wmi_descriptor,mxm_wmi,nouveau

But neither of them are in use when booting with nomodeset.

Testing Graphics

Wanting to see the system’s graphics facility from barebones, no GPUs, through each distinct GPU driver requires several boot methods for testing:

  1. Disallow all graphics drivers triggering baseline LLVM support
  2. Allow the i915 driver for Intel GPU support
  3. Allow the nouveau driver for open source NVidia GPU support
  4. Allow both i915 and nouveau drivers

After these tests, install the latest NVidia driver and test again.

Test LLVM Only

Turns out disabling the graphics drivers is simple for LLVM testing.

When booting, the kernel list shows a menu of the latest three kernels, including a rescue boot entry. If your latest kernel upgrade, which is first in the list, had a problem booting you could use the arrow keys to move the selector from the first to the second — the previous kernel — or to the third if the second is also compromised.

  1. Press ENTER on the highlighted line to start that kernel.
  2. Press “e” to edit the boot commands for the selected menu entry. A boot parameter list appears on a plain text screen. Use DOWN-ARROW to move the cursor to the vmlinuz line.
  3. Use the RIGHT-ARROW or LEFT-ARROW to move the cursor to the end of the line.
  4. Insert the word “nomodeset” with a space to separate it from other arguments. Here’s what the boot line might look like:
    $ cat /proc/cmdline
    BOOT_IMAGE=/vmlinuz-4.17.9-200.fc28.x86_64 root=/dev/mapper/fedora_localhost--live-root ro resume=/dev/mapper/fedora_localhost--live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap rhgb quiet LANG=en_US.UTF-8 nomodeset
  5. When done, press CTRL-X to boot it.

NOTE: After installing with Basic Graphics Drivers, the nomodeset kernel parameter is already part of the boot command line.

Changing the vmlinuz boot command line like this allows testing without making the change permanent. You get the change only for that one boot. Changing the command line for all default booting requires changing grub2.

For experiments like these, better to not make a permanent change until you know what you like. That way, getting out of trouble is only a reboot away.

Running glmark2 identified the renderer as follows:

=======================================================
     glmark2 2017.07
=======================================================
     OpenGL Information
     GL_VENDOR: VMware, Inc.
     GL_RENDERER: llvmpipe (LLVM 6.0, 256 bits)
     GL_VERSION: 3.0 Mesa 18.0.5
=======================================================

The run showed error messages with every test:

** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.

Face it! The llvmpipe can’t handle everything, but it works when not pushed too far. The higher the FPS (Frames Per Second) the better.

+------------------------------------------------------------------------------------------------------+-----+
|                                             glmark2 Test                                             | FPS |
+------------------------------------------------------------------------------------------------------+-----+
|[build] use-vbo=false                                                                                 |  704|
+------------------------------------------------------------------------------------------------------+-----+
|[build] use-vbo=true                                                                                  |  702|
+------------------------------------------------------------------------------------------------------+-----+
|[texture] texture-filter=nearest                                                                      | 1078|
+------------------------------------------------------------------------------------------------------+-----+
|[texture] texture-filter=linear                                                                       | 1108|
+------------------------------------------------------------------------------------------------------+-----+
|[texture] texture-filter=mipmap                                                                       |  956|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=gouraud                                                                             |  514|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=blinn-phong-inf                                                                     |  511|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=phong                                                                               |  454|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=cel                                                                                 |  453|
+------------------------------------------------------------------------------------------------------+-----+
|[bump] bump-render=high-poly                                                                          |  265|
+------------------------------------------------------------------------------------------------------+-----+
|[bump] bump-render=normals                                                                            | 1072|
+------------------------------------------------------------------------------------------------------+-----+
|[bump] bump-render=height                                                                             | 1025|
+------------------------------------------------------------------------------------------------------+-----+
|[effect2d] kernel=0,1,0;1,-4,1;0,1,0;                                                                 |  738|
+------------------------------------------------------------------------------------------------------+-----+
|[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;                                                      |  527|
+------------------------------------------------------------------------------------------------------+-----+
|[pulsar] light=false:quads=5:texture=false                                                            |  864|
+------------------------------------------------------------------------------------------------------+-----+
|[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4                                 |  218|
+------------------------------------------------------------------------------------------------------+-----+
|[desktop] effect=shadow:windows=4                                                                     |  439|
+------------------------------------------------------------------------------------------------------+-----+
|[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map     |  335|
+------------------------------------------------------------------------------------------------------+-----+
|[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata |  333|
+------------------------------------------------------------------------------------------------------+-----+
|[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map      |  346|
+------------------------------------------------------------------------------------------------------+-----+
|[ideas] speed=duration                                                                                |  517|
+------------------------------------------------------------------------------------------------------+-----+
|[jellyfish] <default>                                                                                 |  266|
+------------------------------------------------------------------------------------------------------+-----+
|[terrain] <default>                                                                                   |   20|
+------------------------------------------------------------------------------------------------------+-----+
|[shadow] <default>                                                                                    |  315|
+------------------------------------------------------------------------------------------------------+-----+
|[refract] <default>                                                                                   |   45|
+------------------------------------------------------------------------------------------------------+-----+
|[conditionals] fragment-steps=0:vertex-steps=0                                                        |  679|
+------------------------------------------------------------------------------------------------------+-----+
|[conditionals] fragment-steps=5:vertex-steps=0                                                        |  571|
+------------------------------------------------------------------------------------------------------+-----+
|[conditionals] fragment-steps=0:vertex-steps=5                                                        |  661|
+------------------------------------------------------------------------------------------------------+-----+
|[function] fragment-complexity=low:fragment-steps=5                                                   |  646|
+------------------------------------------------------------------------------------------------------+-----+
|[function] fragment-complexity=medium:fragment-steps=5                                                |  598|
+------------------------------------------------------------------------------------------------------+-----+
|[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5                                            |  639|
+------------------------------------------------------------------------------------------------------+-----+
|[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5                                         |  641|
+------------------------------------------------------------------------------------------------------+-----+
|[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5                                          |  583|
+------------------------------------------------------------------------------------------------------+-----+
|                                                                                         glmark2 Score|  570|
+------------------------------------------------------------------------------------------------------+-----+

Two tests, terrain & refract, showed abysmal scores. However, most had three-digit FPS rates.

While glmark2 ran, the CPU averaged about 40% or less, but the high was over 60%.

Trying Unigine benchmark tests overwhelmed the system: llvmpipe totally failed.

Test i915 Intel GPU Only

Disabling the nouveau driver to isolate the i915 requires modifying the vmlinuz command line again:

$ cat /proc/cmdline
 BOOT_IMAGE=/vmlinuz-4.17.9-200.fc28.x86_64 root=/dev/mapper/fedora_localhost--live-root ro resume=/dev/mapper/fedora_localhost--live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap rhgb quiet LANG=en_US.UTF-8 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau

Setting rd.driver.blacklist tells the kernel not to use nouveau. Using modprobe.blacklist tells modprobe(8) to make it unavailable to the system. Use modprobe.blacklist instead of adding “blacklist nouveau” to the /etc/modprobe.d/blacklist.conf file.

Booting the kernel with nouveau blacklisted delivers a module list showing only i915:

$ lsmod | egrep 'i915|nouveau|nvidia'
i915                 2048000 21
i2c_algo_bit           16384 1 i915
drm_kms_helper        196608 1 i915
drm                   458752 15 drm_kms_helper,i915
video                  45056 3 dell_wmi,dell_laptop,i915

How does the glmark2 test do? No errors reported. Here’s the renderer:

=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR: Intel Open Source Technology Center
    GL_RENDERER: Mesa DRI Intel(R) HD Graphics (Coffeelake 3x8 GT2)
    GL_VERSION: 3.0 Mesa 18.0.5
=======================================================

Its glmark2 results:

+------------------------------------------------------------------------------------------------------+-----+
|                                             glmark2 Test                                             | FPS |
+------------------------------------------------------------------------------------------------------+-----+
|[build] use-vbo=false                                                                                 | 3982|
+------------------------------------------------------------------------------------------------------+-----+
|[build] use-vbo=true                                                                                  | 3813|
+------------------------------------------------------------------------------------------------------+-----+
|[texture] texture-filter=nearest                                                                      | 3898|
+------------------------------------------------------------------------------------------------------+-----+
|[texture] texture-filter=linear                                                                       | 3880|
+------------------------------------------------------------------------------------------------------+-----+
|[texture] texture-filter=mipmap                                                                       | 3590|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=gouraud                                                                             | 3571|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=blinn-phong-inf                                                                     | 3373|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=phong                                                                               | 3117|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=cel                                                                                 | 3134|
+------------------------------------------------------------------------------------------------------+-----+
|[bump] bump-render=high-poly                                                                          | 2485|
+------------------------------------------------------------------------------------------------------+-----+
|[bump] bump-render=normals                                                                            | 3730|
+------------------------------------------------------------------------------------------------------+-----+
|[bump] bump-render=height                                                                             | 3664|
+------------------------------------------------------------------------------------------------------+-----+
|[effect2d] kernel=0,1,0;1,-4,1;0,1,0;                                                                 | 2366|
+------------------------------------------------------------------------------------------------------+-----+
|[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;                                                      | 1299|
+------------------------------------------------------------------------------------------------------+-----+
|[pulsar] light=false:quads=5:texture=false                                                            | 3214|
+------------------------------------------------------------------------------------------------------+-----+
|[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4                                 | 1220|
+------------------------------------------------------------------------------------------------------+-----+
|[desktop] effect=shadow:windows=4                                                                     | 2252|
+------------------------------------------------------------------------------------------------------+-----+
|[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map     | 1463|
+------------------------------------------------------------------------------------------------------+-----+
|[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata | 1304|
+------------------------------------------------------------------------------------------------------+-----+
|[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map      | 1660|
+------------------------------------------------------------------------------------------------------+-----+
|[ideas] speed=duration                                                                                | 2811|
+------------------------------------------------------------------------------------------------------+-----+
|[jellyfish] <default>                                                                                 | 2169|
+------------------------------------------------------------------------------------------------------+-----+
|[terrain] <default>                                                                                   |  274|
+------------------------------------------------------------------------------------------------------+-----+
|[shadow] <default>                                                                                    | 2582|
+------------------------------------------------------------------------------------------------------+-----+
|[refract] <default>                                                                                   |  670|
+------------------------------------------------------------------------------------------------------+-----+
|[conditionals] fragment-steps=0:vertex-steps=0                                                        | 2999|
+------------------------------------------------------------------------------------------------------+-----+
|[conditionals] fragment-steps=5:vertex-steps=0                                                        | 3046|
+------------------------------------------------------------------------------------------------------+-----+
|[conditionals] fragment-steps=0:vertex-steps=5                                                        | 2985|
+------------------------------------------------------------------------------------------------------+-----+
|[function] fragment-complexity=low:fragment-steps=5                                                   | 3004|
+------------------------------------------------------------------------------------------------------+-----+
|[function] fragment-complexity=medium:fragment-steps=5                                                | 3074|
+------------------------------------------------------------------------------------------------------+-----+
|[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5                                            | 3038|
+------------------------------------------------------------------------------------------------------+-----+
|[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5                                         | 3021|
+------------------------------------------------------------------------------------------------------+-----+
|[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5                                          | 3034|
+------------------------------------------------------------------------------------------------------+-----+
|                                                                                         glmark2 Score| 2718|
+------------------------------------------------------------------------------------------------------+-----+

As before, terrain and refract had the worst scores, but with the i915 driver they ran about 14x faster than the llvmpipe software graphics. While glmark2 ran, the CPU averaged about 2% with the high under 10%.

Unigine 64-bit tests all ran in a 1920×1080 window so I could watch the CPU performance. SuperPosition ran with a “1080p Medium” setting. Here are the results:

+-------------+-------+-------+-------+-------+
|    Name     |  FPS  |MinFPS |MaxFPS | Score |
+-------------+-------+-------+-------+-------+
|Heaven       |   32.3|    9.2|   59.4|    813|
+-------------+-------+-------+-------+-------+
|Valley       |   31.0|   21.0|   50.2|   1295|
+-------------+-------+-------+-------+-------+
|SuperPosition|    5.3|    4.1|    6.6|    709|
+-------------+-------+-------+-------+-------+

Heaven typically had a CPU average of about 3% with a high around 6%. Valley averaged about 4% with a high around 5%.

SuperPosition showed a serious problem. Its framerate went high then low then high then low. Lows typically showed about 2 FPS. During the transition the images would fuzz then clear. This i915 driver just cannot handle SuperPosition.

These scores compare terribly against Windows. But Windows had both the Intel and NVidia chipset available.

Test Nouveau Driver Only

It’s disappointing: Can’t test the nouveau driver for NVidia without the i915 Intel driver also loaded. The kernel simply ignores blacklisting i915. Both drivers load, as shown by lsmod.

Running glmark2 announces using Intel, just as when nouveau was blacklisted with only i915 active. Thus, scores were the same as using i915 only.

Test Both i915 and Nouveau Drivers

Take nomodeset out of the vmlinuz boot line. Don’t blacklist any video drivers. The boot line might look like this:

$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-4.17.9-200.fc28.x86_64 root=/dev/mapper/fedora_localhost--live-root ro resume=/dev/mapper/fedora_localhost--live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap rhgb quiet LANG=en_US.UTF-8

The lsmod output looks the same as when nomodeset is present except nomodeset prevents both drivers from doing the work. llvmpipe does it all. Without nomodeset both have a chance for use. Here’s what lsmod‘s output look like:

$ lsmod | egrep 'i915|nouveau|nvidia'
i915                 2048000 20
nouveau              2023424 2
ttm                   126976 1 nouveau
i2c_algo_bit           16384 2 i915,nouveau
drm_kms_helper        196608 2 i915,nouveau
mxm_wmi                16384 1 nouveau
drm                   458752 19 drm_kms_helper,i915,ttm,nouveau
video                  45056 4 dell_wmi,dell_laptop,i915,nouveau
wmi                    32768 7 intel_wmi_thunderbolt,dell_wmi,wmi_bmof,dell_smbios,dell_wmi_descriptor,mxm_wmi,nouveau

Both i915 and nouveau drivers present. How does glmark2 do this time?

As with the boot allowing only the i915 driver, glmark2 only sees i915 even though nouveau is present.

=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR: Intel Open Source Technology Center
    GL_RENDERER: Mesa DRI Intel(R) HD Graphics (Coffeelake 3x8 GT2)
    GL_VERSION: 3.0 Mesa 18.0.5
=======================================================

Its results are equivalent:

+------------------------------------------------------------------------------------------------------+-----+
|                                             glmark2 Test                                             | FPS |
+------------------------------------------------------------------------------------------------------+-----+
|[build] use-vbo=false                                                                                 | 3740|
+------------------------------------------------------------------------------------------------------+-----+
|[build] use-vbo=true                                                                                  | 3690|
+------------------------------------------------------------------------------------------------------+-----+
|[texture] texture-filter=nearest                                                                      | 3555|
+------------------------------------------------------------------------------------------------------+-----+
|[texture] texture-filter=linear                                                                       | 3567|
+------------------------------------------------------------------------------------------------------+-----+
|[texture] texture-filter=mipmap                                                                       | 3715|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=gouraud                                                                             | 3313|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=blinn-phong-inf                                                                     | 3250|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=phong                                                                               | 3090|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=cel                                                                                 | 3009|
+------------------------------------------------------------------------------------------------------+-----+
|[bump] bump-render=high-poly                                                                          | 2495|
+------------------------------------------------------------------------------------------------------+-----+
|[bump] bump-render=normals                                                                            | 4058|
+------------------------------------------------------------------------------------------------------+-----+
|[bump] bump-render=height                                                                             | 3758|
+------------------------------------------------------------------------------------------------------+-----+
|[effect2d] kernel=0,1,0;1,-4,1;0,1,0;                                                                 | 2341|
+------------------------------------------------------------------------------------------------------+-----+
|[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;                                                      | 1295|
+------------------------------------------------------------------------------------------------------+-----+
|[pulsar] light=false:quads=5:texture=false                                                            | 3177|
+------------------------------------------------------------------------------------------------------+-----+
|[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4                                 | 1296|
+------------------------------------------------------------------------------------------------------+-----+
|[desktop] effect=shadow:windows=4                                                                     | 2174|
+------------------------------------------------------------------------------------------------------+-----+
|[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map     | 1445|
+------------------------------------------------------------------------------------------------------+-----+
|[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata | 1281|
+------------------------------------------------------------------------------------------------------+-----+
|[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map      | 1616|
+------------------------------------------------------------------------------------------------------+-----+
|[ideas] speed=duration                                                                                | 2740|
+------------------------------------------------------------------------------------------------------+-----+
|[jellyfish] <default>                                                                                 | 2130|
+------------------------------------------------------------------------------------------------------+-----+
|[terrain] <default>                                                                                   |  278|
+------------------------------------------------------------------------------------------------------+-----+
|[shadow] <default>                                                                                    | 2530|
+------------------------------------------------------------------------------------------------------+-----+
|[refract] <default>                                                                                   |  681|
+------------------------------------------------------------------------------------------------------+-----+
|[conditionals] fragment-steps=0:vertex-steps=0                                                        | 2983|
+------------------------------------------------------------------------------------------------------+-----+
|[conditionals] fragment-steps=5:vertex-steps=0                                                        | 3024|
+------------------------------------------------------------------------------------------------------+-----+
|[conditionals] fragment-steps=0:vertex-steps=5                                                        | 2978|
+------------------------------------------------------------------------------------------------------+-----+
|[function] fragment-complexity=low:fragment-steps=5                                                   | 2983|
+------------------------------------------------------------------------------------------------------+-----+
|[function] fragment-complexity=medium:fragment-steps=5                                                | 3049|
+------------------------------------------------------------------------------------------------------+-----+
|[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5                                            | 2982|
+------------------------------------------------------------------------------------------------------+-----+
|[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5                                         | 2991|
+------------------------------------------------------------------------------------------------------+-----+
|[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5                                          | 3020|
+------------------------------------------------------------------------------------------------------+-----+
|                                                                                         glmark2 Score| 2673|
+------------------------------------------------------------------------------------------------------+-----+

Running the Unigine tests, while no test could identify the GPU in use, they said, “GPU model: Unknown GPU (256MB) x1”. This same text appeared when only the i915 driver module was loaded. Unigine cannot identify the Intel GPU.

Running the Unigine tests, again, in a 1920×1080 window:

+-------------+-------+-------+-------+-------+
|    Name     |  FPS  |MinFPS |MaxFPS | Score |
+-------------+-------+-------+-------+-------+
|Heaven       |   32.2|    8.8|   62.7|    810|
+-------------+-------+-------+-------+-------+
|Valley       |   31.2|   21.7|   48.0|   1307|
+-------------+-------+-------+-------+-------+
|SuperPosition|    5.3|    4.2|    7.0|    712|
+-------------+-------+-------+-------+-------+

These scores are equivalent to the run when only the i915 was loaded. The nouveau driver was present but not voting.

Install NVidia Driver

Putting NVidia’s driver on the system changes a lot. NVidia’s code is definitely not open source, but the driver is free. Some people have a rough time installing it manually. The simplest way is to install akmod-nvidia using dnf(8). This automatically remakes the NVidia driver whenever you update kernel.

Reviewing, if you’re installing Fedora 28 fresh, it goes as follows:

  1. Install from the “Fedora LIVE” stick.
    1. When LIVE comes up, select “Try Fedora”.
    2. Need WiFi? Set it up now. It remains setup after installation. Even if you connect with a network cable, select “Network” in the upper right corner menu.
    3. Use the Super key — the one with an angled four-square window image — to open the Activities screen and select the “Install Fedora” icon.
    4. Set the timezone & drives setup, then install. Don’t forget to setup your account while it’s installing.
  2. Reboot and remove the stick when the Dell logo comes up. The kernel select menu will automatically use the installation kernel.
  3. When the system comes back up with Fedora, go through the various setup questions. If along the way it hangs after the first set of questions, power down as needed, reboot, and login.
  4. Answer the user setup questions.
  5. Using the Super key, open the Activities screen and type term. ENTER to launch a gnome-terminal.
  6. In the terminal, run the command:
    $ sudo dnf -y upgrade
    
    1. Give your user password to sudo. The upgrade will begin. Expect this upgrade will take a while to run.
    2. When dnf finishes, reboot.
  7. Login, open a gnome-terminal, and run the following command to setup the RPMFusion repository:
    $ sudo dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-28.noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-28.noarch.rpm
  8. When RPMFusion is setup, run the following command:
    $ sudo dnf -y install akmod-nvidia
  9. When akmod-nvidia installation finishes, reboot.

After logging in from this last reboot, verify the NVidia installation:

$ lsmod | egrep 'i915|nouveau|nvidia'
nvidia_drm             45056  10
nvidia_modeset       1093632  11 nvidia_drm
nvidia              14061568  510 nvidia_modeset
ipmi_msghandler        57344  2 ipmi_devintf,nvidia
i915                 2052096  4
i2c_algo_bit           16384  1 i915
drm_kms_helper        196608  2 nvidia_drm,i915
drm                   458752  12 drm_kms_helper,nvidia_drm,i915
video                  45056  3 dell_wmi,dell_laptop,i915

Notice nouveau is gone and nvidia is present with i915. If you cat /proc/cmdline you’ll see the nouveau driver is blacklisted:

$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-4.17.14-202.fc28.x86_64 root=/dev/mapper/fedora_captblood-root ro resume=/dev/mapper/fedora_captblood-swap rd.lvm.lv=fedora_captblood/root rd.luks.uuid=luks-38897bbd-3b34-49a9-971e-47828864c903 rd.luks.uuid=luks-923cc46e-c1cc-4c57-893a-43121ecb1723 rd.lvm.lv=fedora_captblood/swap rhgb quiet LANG=en_US.UTF-8 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1

Test NVidia Driver

Running glmark2 with the NVidia driver active showed the following header:

=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR: NVIDIA Corporation
    GL_RENDERER: GeForce GTX 1060 with Max-Q Design/PCIe/SSE2
    GL_VERSION: 4.6.0 NVIDIA 396.45
=======================================================

No question about it seeing the NVidia GPU.

As with the other glmark2 tests, I let it run in its default 800×600 resolution. Here are the results:

+------------------------------------------------------------------------------------------------------+-----+
|                                              glmark2 Test                                            | FPS |
+------------------------------------------------------------------------------------------------------+-----+
|[build] use-vbo=false                                                                                 |10775|
+------------------------------------------------------------------------------------------------------+-----+
|[build] use-vbo=true                                                                                  |18682|
+------------------------------------------------------------------------------------------------------+-----+
|[texture] texture-filter=nearest                                                                      |17471|
+------------------------------------------------------------------------------------------------------+-----+
|[texture] texture-filter=linear                                                                       |17318|
+------------------------------------------------------------------------------------------------------+-----+
|[texture] texture-filter=mipmap                                                                       |17629|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=gouraud                                                                             |16783|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=blinn-phong-inf                                                                     |16796|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=phong                                                                               |16209|
+------------------------------------------------------------------------------------------------------+-----+
|[shading] shading=cel                                                                                 |16332|
+------------------------------------------------------------------------------------------------------+-----+
|[bump] bump-render=high-poly                                                                          |12322|
+------------------------------------------------------------------------------------------------------+-----+
|[bump] bump-render=normals                                                                            |19046|
+------------------------------------------------------------------------------------------------------+-----+
|[bump] bump-render=height                                                                             |18950|
+------------------------------------------------------------------------------------------------------+-----+
|[effect2d] kernel=0,1,0;1,-4,1;0,1,0;                                                                 |13815|
+------------------------------------------------------------------------------------------------------+-----+
|[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;                                                      | 8332|
+------------------------------------------------------------------------------------------------------+-----+
|[pulsar] light=false:quads=5:texture=false                                                            |17360|
+------------------------------------------------------------------------------------------------------+-----+
|[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4                                 | 6290|
+------------------------------------------------------------------------------------------------------+-----+
|[desktop] effect=shadow:windows=4                                                                     |10439|
+------------------------------------------------------------------------------------------------------+-----+
|[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map     | 1669|
+------------------------------------------------------------------------------------------------------+-----+
|[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata | 1913|
+------------------------------------------------------------------------------------------------------+-----+
|[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map      | 2014|
+------------------------------------------------------------------------------------------------------+-----+
|[ideas] speed=duration                                                                                |13559|
+------------------------------------------------------------------------------------------------------+-----+
|[jellyfish] <default>                                                                                 |12204|
+------------------------------------------------------------------------------------------------------+-----+
|[terrain] <default>                                                                                   | 1156|
+------------------------------------------------------------------------------------------------------+-----+
|[shadow] <default>                                                                                    |11875|
+------------------------------------------------------------------------------------------------------+-----+
|[refract] <default>                                                                                   | 4019|
+------------------------------------------------------------------------------------------------------+-----+
|[conditionals] fragment-steps=0:vertex-steps=0                                                        |17787|
+------------------------------------------------------------------------------------------------------+-----+
|[conditionals] fragment-steps=5:vertex-steps=0                                                        |17369|
+------------------------------------------------------------------------------------------------------+-----+
|[conditionals] fragment-steps=0:vertex-steps=5                                                        |17656|
+------------------------------------------------------------------------------------------------------+-----+
|[function] fragment-complexity=low:fragment-steps=5                                                   |17469|
+------------------------------------------------------------------------------------------------------+-----+
|[function] fragment-complexity=medium:fragment-steps=5                                                |16924|
+------------------------------------------------------------------------------------------------------+-----+
|[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5                                            |17270|
+------------------------------------------------------------------------------------------------------+-----+
|[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5                                         |18131|
+------------------------------------------------------------------------------------------------------+-----+
|[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5                                          |17841|
+------------------------------------------------------------------------------------------------------+-----+
|                                                                                         glmark2 Score|13442|
+------------------------------------------------------------------------------------------------------+-----+

While some framerates were surprisingly low compared with the others, terrain lowest as typical of all the glmark2 tests, even terrain was over 1000 FPS and most of the rest ranged 10-18 times that. Nearly 5x better than the Intel GPU.

Curious, I ran glmark2 at 1920×1080. Final score: 6178. About 4x the resolution with 46% speed drop.

What about the Unigine benchmarks? They all identified the GeForce GTX 1060 with Max-Q Design PCI Express 396.45 (6144MB) x1. As with the others, they ran in a 1920×1080 window.

+-------------+-------+-------+-------+-------+
|    Name     |  FPS  |MinFPS |MaxFPS | Score |
+-------------+-------+-------+-------+-------+
|Heaven       | 98.2  |   14.9|  188.5|   2472|
+-------------+-------+-------+-------+-------+
|Valley       | 91.8  |   38.8|  153.5|   3840|
+-------------+-------+-------+-------+-------+
|SuperPosition| 51.7  |   43.4|   65.6|   6914|
+-------------+-------+-------+-------+-------+

Compare this with the Intel GPU. Using NVidia, Heaven was about 3x faster, as was Valley, but SuperPosition was almost 10x faster.

Compared with the Windows runs, NVidia’s own driver for Windows was faster than NVidia’s own Linux driver:

  • About 20% faster for Heaven
  • About 28% faster for Valley
  • About 14% faster for SuperPosition

Sure looks like NVidia has optimized for Windows in ways they’re not delivering to Linux.

NOTE: While running Fedora 28 on the black G7 after upgrading everything, but before installing akmod-nvidia, I noticed two problems:

  1. GNOME Night Light, which shifts the screen away from blue and toward red between sunrise and sunset, wasn’t working.
  2. Suspend — saving system operation context to memory and reducing power usage to minimum — wasn’t working.

Some research suggested both these problems are GNOME problems going back a couple years. After installing akmod-nvidia, both problems disappeared.

Next article: Qubes Testing.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.