Linux on Dell Inspiron 7591
Introduction
Around September of 2020, my Asus laptop finally died. Given that the last Dell laptop I owned lasted for six years, I decided to once again buy a Dell. Here's my experience with this laptop, both upgrading and installing OpenSUSE LEAP 15.2.
Note that, as of 11/14/2020, this page will not be updated. This laptop was a fluke and had an intermittent keyboard controller issue where 10% of keys pressed didn't register. Dell promptly replaced the keyboard, sending a technician to my house, who did a fantastic and professional job. But the issue came back. I asked Dell to replace the motherboard (because I loved this laptop) but they didn't have parts and had no clue when they would come in. So Dell reached out to me and offered to replace the laptop entirely, upgrading me in the process.
Understand that the more complex integrated
circuits become, the more likely random strange problems like
this will occur. This isn't Dell's fault. In fact,
this page is a testimony to the fact that Dell went above and
beyond by upgrading me to an i7 2-in-1 Inspiron 7506. But
I'll leave this page up so that people see how to install Linux
on this machine. At the bottom of this page you will find
instructions for how to migrate and survive the next Dell OS
Recovery update when it seems like Linux "disappears."
HARDWARE COMPONENTS |
STATUS UNDER LINUX |
NOTES |
Intel 9th Gen 4-core CPU [Coffee Lake H]
(rev 07) @ 2.4GHz |
Works |
|
System Memory: 16GB (upgraded to 32GB) |
Works |
|
Intel Corporation UHD Graphics 630 (Mobile) |
Works |
|
Intel Xeon E3-1200 v5/E3-1500 v5/6th Gen
Processor Thermal Subsystem |
Works |
|
Intel Xeon E3-1200/E3-1500 Gaussian Mix
Model |
Works |
|
Intel Cannon Lake PCH Thermal Controller |
Works |
|
Intel Audio |
Works |
|
Intel Corporation Device a37c (sensor hub) |
Works |
22 Sensors! |
Intel Cannon Lake PCH USB 3.1 xHCI Host
Controller |
Works |
|
Intel Wireless-AC 9560 [Jefferson Peak] |
Works |
|
Intel Cannon Lake PCH Serial IO I2C
Controller (x3) |
Works |
22 Sensors! |
Intel Cannon Lake PCH HECI Controller |
Works |
Communicates w/ Management Engine |
Intel Cannon Lake Mobile PCH SATA AHCI
Controller |
Works |
|
Intel Cannon Lake PCH PCI Express Root Port
#17 & #9 |
Works |
|
Intel HM470 Chipset LPC/eSPI ISA Controller |
Works |
|
Intel Cannon Lake PCH cAVS |
Works |
|
Intel Cannon Lake PCH SMBus Controller |
Works |
22 Sensors! |
Intel JHL6340 Thunderbolt 3 NHI &
Bridge (C step) (x4) |
Don't Know |
I don't own thunderbolt devices |
Intel JHL6340 Thunderbolt 3 USB 3.1
Controller (C step) |
Works |
|
Seagate Technology PLC Device 5012
(Barracuda 510 SSD) (added) |
Works |
Fast as heck |
3-cell Dell Battery |
Works |
Claims 5 hrs battery life |
Dell back-lit keyboard |
Works |
Can only change settings in BIOS |
Dell 512GB factory Solid State Drive
(removed) |
Works |
Fast as heck (upgraded with Barracuda 1TB) |
Goodix Fingerprint Reader (built into power
button) |
DOES NOT WORK | Works in Windows but Windows 10 is dumb |
Upgrading the Hard Drive at the Start
I wanted to upgrade the hard drive to a 1 TB solid state drive (SSD) right from the beginning. That way, at first boot, Windows 10 would just boot off the new hard drive and not be able to tell the difference. It worked with my previous Asus laptop, but the drives (old to new) were identical in size. This was different: I was going from 512 GB SSD to 1 TB SSD.
I thought the first thing to change in the
BIOS was to put the drives in AHCI mode instead of RAID
mode. I booted OpenSUSE LEAP 15.2 install without changing
BIOS settings but having plugged in the new drive and my old
Seagate Hybrid 1 TB laptop which had my old files. (I
deleted all the EFI and Windows partitions from the Hybrid so
that the laptop didn't try to boot from it. It initially
did try to boot from that drive, and Windows 10 claimed it
migrated my hardware over, but I shut it off.) The new SSD
didn't show up. Once I changed the BIOS configuration for
the SSD M2 controller to AHCI rather than RAID, it seemed the
drive showed up.
My first attempt, after taking a Linux image of the factory 512 GB SSD was to try to use dd to copy the old drive, byte for byte, onto the new card.
That absolutely didn't work. It failed miserably, and the Dell software assistant ("You couldn't boot your computer!") came up.
When the Dell software assistant told me it was going to reinstall the entire OS, however, I balked because I had not backed up my files, still on the Hybrid, to one of my USB hard drives. I thought it might try to write the OS to the Hybrid instead of the SSD, so I booted back into OpenSUSE LEAP 15.2 to copy my files. For some unknown reason, OpenSUSE LEAP 15.2's installer doesn't include rsync, so I was left with no choice but to literally copy all the files all over again, which took a lot of time. Normally I back things up when the host system is still working, but the sudden hardware failure of my Asus laptop caught me off guard.
Many attempts to "shoehorn" Windows back into behaving did not work. Good thing I took a dd image of the original hard drive before ever powering it on. I wiped the original drive back to factory, reset BIOS to factory, and the hard drive still did not want to start up. Windows failed to boot twice, kicking the system into the Dell support software (a very nice feature, by the way). The Dell software found no hardware issues and tried to repair Windows but to no avail, so the second time it came up, I told it to restore the whole computer. I told it to download the image from Dell after logging into my home WiFi, and it successfully completed this task with few errors.
Then once I had everything on the 512GB SSD and it was essentially ready and working in Windows, I made another dd image of this, and then also directly wrote this image to my 1TB SSD, which booted up without any problems. This proves, to a point, that my Dell got shipped in a state that was not ready. But I'm not going to bash Dell for this, as their support software (forgot the name) did an incredible job.
From there, since I had removed the Seagate Hybrid so that the recovery software could focus on the SSD, I reconnected it. The hard drive bracket is a lightweight metallic fabric, that while I was at first skeptical of its physical strength, I was pleasantly surprised that it worked great. I commend Dell: this laptop is built inside to the quality level of some of the militarized Panasonic Toughbooks we used in the military.
So then I updated the BIOS firmware real quick.
Next, I booted into Clonezilla, only to realize it isn't able to move partitions around. I had already told Windows, on reboot, to resize the current Windows partition to 240GB, and I wanted to move the recovery partitions over to make way for Linux. So I rebooted into the OpenSUSE LEAP 15.2 install DVD to see if it was capable of moving partitions around. The answer to this question: nope, it won't let you. So I burned a DVD of GParted Live and moved the partitions over so that there was no empty space between Windows and the recovery partitions. Having to do two LUKS unlocks at every boot would be exceedingly annoying.
Note that I am using the drive configuration in the BIOS that came factory: I changed this back and then when I got the 512GB to work, I left it this way.
Finally, after using the Seagate 1TB SATA Hybrid Drive for a while, I noticed that I lost battery life due to using it as my "scratchpad" for college stuff. And it didn't have the advantage of being removable in case I needed to take my work with me. So I ended up removing it after getting my files off of it. I instead went to Walmart and bought a $20 64GB MicroSD and used the slot on the right of the laptop.
Another point: there really is not a way to use the second SSD slot on my specific Inspiron 7591. This is because the second slot has no retaining devices to keep the drive from falling out:
This may be because on other models, like those with ReadyBoost or Optane, there may have been hardware to put it in. For example, this is the first SSD slot:
Note that it has not only a bracket above (see previous images) but a bracket below for mounting. The tab in the photo can be re-positioned for other form factor types of SSDs. Indeed, it was in the other position when I got it (the 512GB SSD is smaller). By the way, this is why you should buy a Dell: they make their laptops in a way that you can modify them. This is very close to how military-grade laptops are made on the inside. And this is why I love Dell.
Here is the original hard drive in my enclosure:
Here is a view of the RAM underneath their
protective flaps (another very nice touch, Dell!):
All in all, this is a superb laptop.
The craftsmanship is top notch.
Installation of OpenSUSE LEAP 15.2
Once those were moved, which was at a rate
of about 1GB/second, I then booted back into OpenSUSE LEAP 15.2
installer. It recognized my wireless card and I was able
to do a network-enabled installation. Of course it
complained that the EFI partition isn't 256MB or higher, but I
wouldn't dare alter this partition.
As usual, even though I have 16GB of RAM, I chose to create a 1GB swap partition at first. I also aligned all sectors and chunks in filesystem creation to 4096K segments to favor the SSD. Note that there is no option in the OpenSUSE LEAP 15.2 installer to align to 4096K sectors or segments (to favor the SSD) in terms of partition creation. I would like to see this behavior changed in the installer.
But after using this laptop for a little
while, I realized I didn't need swap, so I deleted my
swap. I didn't see any performance hit as a result.
Installation went without a problem, until I tried to use Firefox. It didn't want to retain the settings and bookmarks I had put in place. But that's ok because dumping my ~/.mozilla folder and then signing into Firefox Sync fixed the problem.
There were no difficulties during the installation and first boot. The new thing for me was knowing that the NVME drive (the 1TB SSD) is /dev/nvme###. That might take some thinking when I'm playing around in the shell.
Tweaking tmpfs
Due to a memory bug (see a page or two below), LEAP 15.2 digs into swap pretty quick. At first I tried limiting the amount of tmpfs that certain mount points use. This didn't fix the problem. I thought this might help fix the problem. It helped only a little. I'll list my solution here even though it's not really needed. Basically, creating boot scripts with systemd doesn't work for me despite hours on IRC being helped by the experts. But I found a "hack", in that OpenSUSE LEAP 15.2 seems to load tmpfs entries (systemd) and then reads the contents of /etc/fstab. So to change these mount points, I simply put mount points in /etc/fstab with the "remount" and "nofail" option, which causes them to all get remounted subsequently. My entries are as follows (to include adding a tmpfs /tmp in the next paragraph).
tmpfs /tmp tmpfs rw,nodev,nosuid,size=1g 0 0
tmpfs /dev/shm tmpfs
rw,nosuid,nodev,size=1g,remount,nofail 0 0
tmpfs /run tmpfs
rw,nosuid,nodev,mode=755,size=1g,remount,nofail 0 0
tmpfs /sys/fs/cgroup tmpfs
ro,nosuid,nodev,noexec,mode=755,size=1g,remount,nofail 0 0
tmpfs /run/user/1000 tmpfs
rw,nosuid,nodev,relatime,size=1g,mode=700,uid=1000,gid=1000,remount,nofail
0 0
Second, the point of using tmpfs for /tmp is
that the purpose of /tmp is for files that only need to exist
temporarily. OpenSUSE LEAP 15.2 ships with /tmp configured
as a normal hard drive entry. Not only is this less than
ideal, I want to eliminate any unnecessary thrashing of the hard
drive. So (see above) I made it a tmpfs entry. Now
all things in /tmp disappear on reboot, and there's a bit less
SSD use. I would like to see the LEAP 15.2 installer give
the user the option to create tmpfs mount points or at least
recommend (if it detects an SSD) that the user make /tmp a tmpfs
entry. I would prefer to create them at installation, but
I digress.
Hard Drive Speeds
Having my Seagate Hybrid as a secondary drive to the Barracuda 1TB SSD was interesting. Drive speeds are so fast that sometimes I wonder if the computer is going fast because something is wrong with it. Hdparm testing of the drives results in some interesting numbers:
/dev/nvme0n1:
Timing cached reads: 35832 MB
in 1.98 seconds = 18056.97 MB/sec
Timing buffered disk reads: 3362 MB in
3.00 seconds = 1120.21 MB/sec
/dev/sda:
Timing cached reads: 33720 MB
in 1.99 seconds = 16981.04 MB/sec
Timing buffered disk reads: 330 MB in 3.00
seconds = 110.00 MB/sec
Note that the non-cached reads of the Seagate are much slower. First, this is because it has lots of cache (hence, Hybrid Drive). But second, note that this is why I prefer a hybrid drive over a traditional hard disk drive. Your read speeds can be incredible for booting and other things that fit into the read cache.
Note that I ended up removing the 1TB
Seagate Hybrid SATA because I just didn't need it.
Instead, I bought (with the money I got from selling hard
drives) a $35 WD 120GB SATA SSD to use as my "music drive" to go
between Windows and Linux (which keeps some wear and tear off
the 1TB SSD acting as my main drive).
Keyboard
Gone is the day of non-number-pad keyboards on laptops. I'm actually sad that this went away. To get a keyboard without a number pad, you essentially have to get a laptop too small to have the number pad, or get lucky. I'll be honest: I don't need a number pad. If I did, I'd get one for USB. But I digress.
The keys on this keyboard are between light and medium, but feel very firm and resolute. I had no problems mapping the calculator shortcut key. The back-lighting key works exactly as it should (switching from off/low/high brightness), though you cannot change settings in Linux. You can change them in the BIOS. I set mine for the shortest duration because I want to save power. In average living room lighting, the back-light on the keys only makes it harder to read the keys, and when the keyboard is new to you, you need to see the keys.
The function key locking feature works in Linux as well. I tend to keep it in the shortcut key (not function key) mode. This can be slightly annoying when you want to, say, rename a file and you're used to the F2 shortcut: now you need to learn Fn+F2. But this enables the home/end keys rather than F11/F12 keys, so it's useful when typing papers.
Fingerprint Reader
This computer has a Goodix fingerprint
reader. It works in Windows. However, because of
Windows 10's stupid "Windows Hello," which forces you to create
a PIN with the fingerprint, I didn't use it. You see, a
PIN is easier to guess than even a password, which is how I
currently log into Windows. So unfortunately, due to how
poorly programmed Windows is, enforcing PIN creation which then
weakens the security of your login, I'm not using it. It's
a major problem that you can't specify that your PASSWORD be
used as the back-up to the fingerprint, and not a (weak)
PIN. PIN numbers are far weaker than random alphanumeric
passwords.
I followed procedures to add the fingerprint
reader to OpenSUSE LEAP 15.2 but the hardware itself isn't
registering. So for now, unfortunately, I cannot use my
fingerprint for logging into OpenSUSE LEAP 15.2. The
fingerprint reader does not show up under the PCI bus. As
well, running i2cdetect -l
doesn't list any i2c
buses.
Intel Audio
Intel Audio (onboard) DOES NOT WORK on Leap 15.2. But note that this laptop is brand new, so sometimes this happens. You can connect your Bluetooth audio device and use it just fine, so audio works, just not through the native Intel audio card. As well, when using Zoom in OpenSUSE LEAP 15.2, when I plugged in my USB Logitech QuickCam Pro 9000 (yes, I still have one that works) it detected the microphone built into my QuickCam Pro 9000 and successfully recorded audio: I did a test recording.
But again, this is a brand new laptop, so
I'm sure that, very soon, OpenSUSE and the Linux kernel will
catch up and support it.
Swappiness Issues During Heavy Disk I/O
One of the recent problems with the Linux kernel has been that it will grab all available RAM to help with Disk I/O operations even when it should not care. This results in the operating system digging into swap. There are a couple of things you can do to minimize it:
First, you can set swappiness to 1, using
the command
sudo sysctl vm.swappiness=1
.
Second, you can increase the "pressure" on
the OS to free up Disk I/O memory using the command
sudo sysctl vm.vfs_cache_pressure=200
.
Finally, some people who are long-time Linux users have recommended that I simply not have a swap partition at all. This is totally possible. So I got rid of my swap partition and didn't notice a difference.
I would still recommend the above tweaks in sysctl. Even if not swappiness, vfs_cache_pressure needs to change. Linux needs to feel "not pressured" to hold on to Disk I/O buffers. This isn't a server, after all.
Note that there is a bug filed about the behavior of the stock LEAP 15.2 kernel. The issue is resolved by upgrading to the latest stable Linux kernel available through OpenSUSE. My advice: if you are advanced enough in the ways of Linux that you are comfortable upgrading to this kernel, do it. However, if not, just be aware that disk I/O operations could result in some swap usage. The above sysctl commands should at least help minimize this issue whether you move to the bleeding-edge current Linux kernel or not.
But the OpenSUSE team is still working on
this (as you can see in the bug link above). One of the
interesting things is that running with
cgroup_disable=memory in the boot parameters, with certain
kernels it goes away. Again, read the above bug.
There should be a kernel patch coming out soon remedy this
problem. Or you can use any of the kernels mentioned in
the bug. Just be sure (in my opinion) to keep the 15.2
stock kernel (whatever update version it is) installed in case
you need it.
Another thing to point out: if you have 16GB
or more RAM, especially if you use a SSD for your main drive,
consider not even using a swap partition at all. In my
experience, you don't really need it. I disabled virtual
memory in Windows 10 also, as well as the hibernate
feature. I also put "noresume" in my GRUB2 boot parameters
to reflect the fact that I do not use swap (so there will never
be a hibernate/resume). This laptop has 32GB RAM now that
I have upgraded it, and I don't run into any problems.
Sensors
I added the XFCE sensors plugin and enabled
all the options (sensors) inside of it to see how many sensors
the computer manifests over SMBus/I2C/serial. Apparently
it manifests 22 of them! So humorously I would have to
either decide which sensors I want to monitor or else change
other settings because the bottom panel in my XFCE desktop goes
off the screen due to how many sensors there are!
Here are the sensors:
BUS |
SENSOR |
Dell SMM 0 |
Fan 1 |
Fan 2 |
|
Battery |
Voltage |
PCH Cannon Lake |
Temp 1 |
NVME 3 |
Composite |
Core Temp (ISA) |
Package ID |
Core 0 |
|
Core 1 |
|
Core 2 |
|
Core 3 |
|
IWL WiFi |
Temp 1 |
ACPI Interface |
Temp 1 |
ACPI |
Dell Battery mWh |
Thermal Zone 0 |
|
Thermal Zone 1 |
|
Thermal Zone 2 |
|
Thermal Zone 3 |
|
Thermal Zone 4 |
|
Thermal Zone 5 |
|
Thermal Zone 6 |
|
Thermal Zone 7 |
|
Thermal Zone 8 |
Contingency: What To Do When Dell/Microsoft Lock You Out Of Linux
So you ran a Dell OS Recovery update and then Linux didn't boot? Let me relate my experience with this.
Everything was going well until Dell updated my OS Recovery firmware/software (note: NOT the BIOS). All of the sudden, Linux wouldn't boot. When I tried to go into the OpenSUSE installer to either rescue the boot loader or reinstall, the onboard SSD (M.2 NVME) didn't even show up in the list of partitions. It's as if Windows or Dell locked me out of my hard drive. (Given their past behavior, I am tempted to say it's Microsoft and not Dell, especially given how their service technician behaved in chat in regards to this app: it seems Microsoft runs things now.)
When I migrated over to my Inspiron 2-in-1 for other reasons, I figured it out. The idea just came to me. I think it was God, but believe whatever you want.
What I found is that the BIOS was set back to using the onboard hard drive in RAID, not AHCI. This seems weird, and stupid to be honest, because you can't RAID with only one drive (at least not in hardware). But this and BitLocker were all attempts by Microsoft or Dell (they claim) to keep customers secure from boot sector viruses. Anyone who understands computer virus history knows this is mostly a lie because the virus and anti-virus game is a cat-and-mouse game: when one adapts, the other adapts.
First, you need to switch it back to AHCI, but not so fast. You need to do it carefully or you risk losing all your data. So here's what you need to do: this link points to a post on Dell's support page that links here to instructions. Note that the following information is what I did with my laptop. I am NOT telling you it will work for you, and I am NOT in any way liable for anything that happens as a result of these instructions. I am only telling you what worked for me.
I followed the instructions, booting to safe mode and intercepting (pressing F2 like a cocaine monkey) the BIOS boot right after this to switch to AHCI. Windows booted to safe mode but gave no indications it had done anything. I then followed the instructions to tell it to boot back into normal mode, and it worked.
After this, the drive populated in Linux. Before I did this, I told Windows to shrink its partition to 256GB to make space for Linux, which it did. Note that BitLocker makes it so that you have less space than the partition, probably due to encryption. Dell also includes BitLocker in this update and on their Inspiron laptops, a nice feature usually reserved for Windows 10 Pro. I think it's worth it, but it will complicate matters. I had already learned with Windows and the interplay with Linux and college work to do all my work on a removable SD card and then down-sync the changes into Linux when I back up my stuff.
So anyways, make sure your Microsoft account works before you do anything.
I then booted up Linux. Because my Inspiron laptop is so new, the new Intel iRIS graphics didn't work with GParted Live, so I had to install OpenSUSE (MAKING SURE I created a partition in the second larger area of free space, i.e. the second half of the 1TB drive because I had burned the 512GB image to the 1TB which left 512GB of empty space). I installed OpenSUSE with gnome just to jump on WiFI, install GParted, and then move the recovery partitions over so that all the free space was at the end of the drive. Then I rebooted into the OpenSUSE installer again and deleted the original installation and reinstalled using my typical LUKS encrypted configuration.
When I rebooted, Windows 10 did not start but took me to the BitLocker unlock key page. I logged into the Microsoft BitLocker recovery keys page and typed in the long password. When I first saw this page, I went to log in using my phone and the page disappeared: my laptop shut down. This seems to be a time-out protection or something, so I wouldn't let that bother you.
Now GRUB2 boots up and lets me select Windows 10 and Windows works fine. This is a lot of complex work but it was worth it, I think.
If I had to do this over again, however, I
would recommend buying the Ubuntu LTS version of whatever Dell
machine you want, then buy a copy of Windows 10 separately and
use it in a Virtual Machine on Linux. It's getting to the
point where, I believe, Microsoft is throwing up needless hoops
for people to jump through just to get into Linux, and I think
it's because they stand to profit if people can't use Linux.