Dell laptop setup

Details

Service tag: D88LM13 (from Dell Performance Check - F12 when booting)

Laptop labelling

    Model Latitude 7400
    Service tag: D88LM13
    Mfg year: 2020
    Express service code: 287966345031

Battery

Battery details from Debian Power Manager settings:
    Model: DELL 5VC2M85
    Technology: Lithium ion
    Fully charged: 60.0 Wh
    Voltage: 8.3 V
    Vendor: SMP
    Serial: 30327

This is a 4-cell battery.

Genuine replacement costs £89 from Black Cat PC.
Compatible replacement costs £58 from LaptopBattery.
These are both specified at 7.6V. Maybe the 8.3V listed by the Power Manager is measured.

Visible when base cover removed

Foxconn PN T77W968 05
DW5821e
WWAN

Battery 60Wh MXV9V 7.6V 

From the BIOS

System information
Bios version: 1.39.0
Service Tag: D88LM13
Manufacture daet: 03/21/2020
Ownership date: 04/08/2020
Express service code: 28796345031

Memory information
Memory installed: 8192MB
Memory available: 8053MB
Memory speed: 2400 MHz
Memory channel mode: Dual
Memory technology: DDR4 SDRAM
DIMM A size: 4096MB
DIMM B size: 4096MB

Processor information
Processor type: Intel(R) Core(TM) i5-8365U CPU @ 1.6GHz
Core count: 4
Processor ID: 806EC
Current clock speed: 1.900 GHZ
Minimum clock speed: 0.400 GHz
Maximum clock speed: 4.100 GHz
Processor L2 cache: 1024 KB
Processor L3 cache: 6144 KB
HT capable: Yes
64-bit technology: Yes (Intel EM64T)

Device information
M.2 SATA: none
M.2.SATA1: none
M.2 PCIe SSD-0: 256 GB 10UPD3Z0PTLL
M.2 PCIe SSD-1 34-48-ED-C3-07-01

Video Controller: IntelUHD Graphics 620
Video BIOS version: GOP 1085
Video memory: 64MB
Panel type: 14.0" FHD
Native resolution: 1920 by 1080
Privacy screen: none

Audio controlller: RealTek ALC3264

Wi-Fi device: Intel Wireless
Cellular device: installed
Bluetooth Device: installed

Initial setup

Overview

I had originally intended to install to install Windows 11 and Debian 12 in a dual-boot setup. However, I couldn't get Windows 11 to install and had to have a Debian 12 only system.

Main steps:

  1. Update the BIOS
  2. Update drivers
  3. Configure BIOS
  4. Install Debian
  5. Configure Debian

Notes in italics were my original plan for setting up. Non-italic notes are what I actually did.

Update BIOS

Download and install the latest BIOS.

See Dell Latitude 7300 and 7400 System BIOS for download and installation instructions.

Done OK.

Configure BIOS

Some BIOS settings need changing. See Things to know and check before you start an install.

There is no Legacy option to disable.

Disabled secure boot.

Note that SCSI:RAID has to be disabled - use AHCI instead.

Install Debian

Plugged in Debian installer USB memory stick.
Rebooted and pressed F12 to enter the boot menu.
Selected UEFI: Corsair Flash Voyager 100

Selected "Graphical install" and followed instructions.

Configured WiFi connection to WWNiwiw5.

Set hostname to 'basalt'.
Set domain name to 'wingpath.co.uk'.

Set root password.

Created user 'fog'.

Partitioning:
    Use whole disk.
    Separate /home, /var and /tmp partitions.
This provided 150GB for /home.

Said 'no' to Configuring popularity-contest.

Selected Xfce desktop, web server, SSH server and standard system utilities.

Selected lightdm display manager (gdm3 has some Gnome dependencies).

Configure Debian

See Debian GNU/Linux Installation Guide. For a quick version of the installation instructions see Installation Howto.

See Linux on a Dell Latitude 7400 for dealing with various issues.

Added 'fog' to 'sudo' group.

Used nano editor to remove /media/cdrom from /etc/apt/sources.lst.

Installed vim.

Added sage to /etc/hosts.

Setup ssh between sage and basalt using keys.

Copied .vimrc, .bashrc from sage for fog and root.

Enabled Tap touchpad to click and increased cursor size using Settings->Mouse and Touchpad.

Changed Settings->Appearance->Fonts->Custom DPI setting from 96 to 157.

Installed 'plocate' package.

Installed 'net-tools' package to get netstat, ifconfig and route commands.

Configured power management using Settings->Power Manager:
    On battery:
        System sleep mode: Suspend
        When inactive for: One hour
        On critical battery power: Ask

Installed chromium and purged firefox-esr.

Setup ssh access to granite and flint.

Moved items that I wanted to keep from panel2 from panel1, and removed panel2 (a small panel at bottom centre).
Moved panel1 to bottom of screen (by unlocking it in panel settings, dragging it by a handle at one end, and relocking it).
Added an extra Clock panel item, and used for the date and one for the time. Changed formats of both.
Increased panel Row size to 32, and set Fixed icon size to 32.
Removed session menu (same actions are available under Applications->Log Out).

Changed Settings->Window Manager->Style->Theme to Moheli to get blue title bars on windows.
Changed Settings->Window Manager->Style->Button layout to show only Stick, Minimize and Close at right.

Installed tigervnc-viewer package.

Copied /etc/cron.hourly/fog_backup* to basalt and edited them to backup to /home/backups and to copy backups to sage:/backups/basalt.

Copied bookmarks.html from sage and imported into chromium.

Installed rsync.

Copied ~/private_raw from sage. Installed encfs package - but see below for issues.

Installed cryptsetup.

Created directories /mnt/usbmem and /mnt/tmp.

Created /home/root/bin and copied contents from sage.
Edited usbmount to search drives sdd, sdc, sdb and sda.

Copied sage:/www/index.html to /var/www/html. Needs editing to access local files where appropriate, and to remove irrelevant entries.
Copied hed from sage to /var/www/html. Had to install libjs-jquery-ui package for this.
Copied svgimage.php and svg.svg to /var/www/html.

Increased chromium's Font size to 14 and Minimum font size to 11.

Set Terminal's Preferences->Text->Custom font to Monospace 9.

Switched from pipewire to pulseaudio:

sudo apt install pulseaudio
systemctl --user mask pipewire.socket
systemctl --user mask pipewire.service
systemctl --user mask pipewire-pulse.socket
systemctl --user mask pipewire-pulse.service
systemctl --user stop pipewire
systemctl --user enable pulseaudio
systemctl --user start pulseaudio

Touchpad erratic

The touchpad was behaving erratically. After much web searching and investigation I found two possible issues and fixes.

Created file ~fog/.xinitrc containing:

# Turn off the "bell" (actually a loud click).
xset b off

# Disable 'DELL08E1:00 06CB:CD97 Mouse'. This is a duplicate of 'DELL08E1:00
# 06CB:CD97 Touchpad', which I suspect was causing erratic touchpad behaviour.
xinput --disable 'DELL08E1:00 06CB:CD97 Mouse'

and set it to be run at login using Settings->Session and Startup->Add.

Created file /etc/tmpfiles.d/fog.conf containing:

# Turn off auto power saving on touchpad
w /sys/devices/pci0000\:00/0000\:00\:15.1/power/control - - - - on                   

I think the behaviour has improved, but time will no doubt tell.

Setup sendmail

Followed instructions from Install Sendmail and Set up SMTP on Debian 12 Bookworm – Best Steps:

apt install sendmail
vim /etc/hosts
    # added 'basalt' to '127.0.0.1' line.
cd /etc/mail
vim sendmail.mc    # Add following lines at end
    define(`SMART_HOST',`smtp-host')dnl
    define(`RELAY_MAILER', `esmtp')dnl
    define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
make
/etc/init.d/sendmail reload

This works fine when the laptop is in the home network, either directly by WiFi or indirectly via the phone hotspot and VPN.
If using the phone hotspot without VPN emails are likely to end up in spam - they seem to go via a host that's in block lists.

A possible solution to this would be to send emails via granite using SASL authentication. See Postfix SASL Howto and PostfixAndSASL. This wouldn't be quick to implement!

Installed and configured thunderbird.

Set up VPN to fennel

Followed instructions from Setting up an IPSec VPN to the FRITZ!Box in Linux:

Installed network-manager-vpnc-gnome package.

Ran nm-connection-editor:
    Selected "+ -> VNC Compatible VPN (vpnc)" and clicked Create.
    Filled in details:
        Gateway: sage.wingpath.co.uk
        User name: frank
        User password: my usual (clicked symbol and selected "Store the password for all users")
        Group name: frank
        Group password: BrvJqvduwXkWWKIw (clicked symbol and selected "Store the password for all users")
        Advanced:
            Tunnel interface name: tun0
            Click Apply
        Click Save
    Later edited the VPN connection to change its name from 'VPN connection 1' to 'fennel'.

To open the VPN connection:
    Click the Network icon in the desktop panel.
    Click 'VPN Connections'
    Click the 'fennel' checkbox.

Note that you have switch the WiFi connection to the phone hotspot in order to open the VPN connection.

Note also that basalt will not have its usual IP address when connected via the VPN - it will be something like 192.168.183.201.

Mobile modem

The laptop contains a DW5821e Snapdragon X20 LTE device, and has a slot for SIM card.

It appears as USB Bus 002 Device 002 with ID 413c:81d7.

It apparently supports 3G, 4G and 5G, and is unlocked. It also seems to support GPS.

The kernel modules usb_wan and qki_wan are listed as loaded by lsmod, as expected. See Device 'Dell DW5821e Snapdragon X20 LTE'.

Command mmcli -L lists is as /org/freedesktop/ModemManager1/Modem/0 [Dell Inc.] DW5821e Snapdragon X20 LTE.
The "0" is the index of the modem, so mmcli -m 0 ... can be used to control the modem.

ModemManager is running and showing the state as registered.

Power manager

Documentation

Introduction

"Xfce4 Power Manager manages the power sources of the computer and connected devices (wireless mice, keyboards, media players etc.). It also allows users to control the display backlight brightness and set power-saving modes for displays and monitors."

Getting started - includes command line options.

Preferences 

Frequently asked questions 

Panel plugin 

Usage
Panel plugin

The panel plugin displays the battery icon in the panel and shows the state of charge of the battery.
If you left click on the icon you get further information about the battery charge (expected remaining time), a display brightness slider (the F6 and F7 keys are probably more convenient for this), a Presentation mode switch, and a link to the Power Manager settings.
If the Presentation mode switch is on it "temporarily overrides any suspend settings in Power Manager Settings and will prevent interruptions due to inactivity in the course of giving a presentation". It even disables Suspend on critical battery status, so that the battery will fully discharge without any action or warning! So keep this switch off unless you really need it and have a well charged battery.

Power Manager settings

The Power Manager settings can be accessed from left clicking on the panel plugin, or from Settings->Power Manager.

General

I've set these up as follows:

When power button is pressed        Ask
When sleep button is pressed        Do nothing
When hibernate button is pressed    Do nothing
When battery button is pressed      Do nothing
Handle display brightness keys      On
Brightness step count               10 Not exponential
Status notifications                On
System tray icon                   

The laptop doesn't have sleep, hibernate or battery buttons.
However, the power button (when set to Ask) display a dialog that allows you to choose Log Out, Restart, Shut Down, Suspend, Hibernate, Hybrid Sleep or Switch User.
There's also an option to save the session for future logins.
This is the same dialog as the one you get from the X menu Log Out.

The display brightness keys are F6 and F7 (without holding down the Fn key).

The System tray icon is another battery icon. It doesn't display the battery charge. If you right click on it, it displays the same dialog as you get by left clicking on the plugin icon.

System

I've set these up as follows:

System sleep mode              Suspend: When inactive for one hour on battery, Never when plugged in
When laptop lid is closed      Switch off display
Critical battery level         10%
On critical battery power      Hibernate

Note that the upowerd daemon may put the system into Hybrid-Sleep if the battery reaches critical level, which might be 5%. The upowerd daemon is definitely running, but I've not been able to find out exactly what is does or how to configure its critical battery level.

Display

I've set these up as follows:

Display power management           On
Blank after                        6 minutes on battery, 20 minutes when plugged in
Put to sleep after                 8 minutes on battery, never when plugged in
Switch off after                   9 minutes on battery, never when plugged in
On activity reduce brightness to   20% after 30 seconds on battery, never when plugged in.

I don't know whether there's any difference on the laptop between Blank, Sleep and Switch off.

Security

I decided to lock the screen when the system is going to sleep (i.e. suspend, given my settings for "sleep"). There doesn't appear to be a manual method of locking the screen, so it makes sense to tie it to "sleep", which can be done manually.

Todo

When encfs 1.9.5-3 is released, use it for encrypted ~/private. In the meantime I am using ~/private unencrypted.

Maybe send emails via granite using SASL authentication (see Setup sendmail above)