apt get life

Life around technology

  • Technology
    • Guides
    • Linux
    • Development
      • Laravel
    • Misc
    • Raspberry Pi
  • Writing
  • Crafts
    • Crochet
    • Model Making
    • Painting
  • Privacy Policy
You are here: Home / Home

System Hang on Ubuntu 24.04 “e1000_print_hw_hang”

2025/05/15 by sudo Leave a Comment

I recently ran into an issue on an Ubuntu 24.04 server where the system would intermittently hang and become unresponsive. Checking /var/log/syslog, it seems the onboard Intel network card was the problem.

May 14 01:38:09 server-1 kernel: e1000e 0000:00:1f.6 eno1: Detected Hardware Unit Hang:
...
May 14 01:38:25 server-1 kernel: workqueue: e1000_print_hw_hang [e1000e] hogged CPU for >13333us 4 times, consider switching to WQ_UNBOUND

This repeats every 2 seconds, filling the logs and hogging CPU time. The NIC in question is using the e1000e driver for the onboard Intel Ethernet controller. This is a known issue with certain Intel NICs and the e1000e driver. The kernel repeatedly reports a “Hardware Unit Hang” when the NIC’s transmit queue stalls. Apparently, it is more often see this after the system has been up for a while, usually under I/O or network load. Power-saving features and offloads like ASPM and TSO seem to trigger or worsen it.

Fixing e1000_print_hw_hang

1. Disable TSO (TCP Segmentation Offload)

This stops the NIC from offloading TCP segmentation — which can misbehave on this driver.

sudo ethtool -K eno1 tso off

But this won’t persist after reboot, so we’ll make it stick with a systemd service…

Make TSO Setting Persistent with systemd

Create a service file:

sudo nano /etc/systemd/system/disable-tso.service

Paste this in:

[Unit]
Description=Disable TSO on eno1
After=network.target

[Service]
Type=oneshot
ExecStart=/sbin/ethtool -K eno1 tso off
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Enable it:

sudo systemctl daemon-reexec
sudo systemctl enable disable-tso.service

Optional: start it now without rebooting:

sudo systemctl start disable-tso.service

2. Disable PCIe ASPM via GRUB

Edit the GRUB config:

sudo nano /etc/default/grub

Find this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

And change it to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=off"

Then update grub:

sudo update-grub

After these changes, the e1000e driver should became stable again.

Filed Under: Guides, Linux, Technology Tagged With: Linux, ubuntu 24.04, ubuntu server

Disable iLO on HP Microserver Gen8

2025/03/26 by sudo Leave a Comment

I use my HP Microservers as NAS style boxes running Ubuntu or Truenas, and keeping power consumption low is an important consideration for me. Since I don’t have a license for iLO, it is mostly useless to me, so I wanted to disable it to save a few watts of power.

To disable iLO:

  1. Enter iLO RBSU: Press F8 during the Power-On Self-Test (POST) to access the iLO configuration utility.
  2. Navigate to Configuration Settings: Select Settings -> Configure, and press Enter.
  3. Modify iLO Functionality: Select the iLO Functionality option and press the Spacebar to toggle the setting between ENABLED and DISABLED. A warning message will be displayed when selecting DISABLED.
  4. Save Configuration: Press F10 to save the modified settings.
  5. Exit iLO RBSU: Select File -> Exit to close the utility.

When managing iLO (Integrated Lights-Out) functionality on HP servers, disabling and re-enabling iLO requires specific steps involving both RBSU (ROM-Based Setup Utility) and the system board’s iLO Override Switch.

To re-enable iLO using the Security Override Switch:

  1. Power down the server completely.
  2. Set the S1 system maintenance switch to the ON position.
  3. Power on the server and wait for the F8 prompt to appear. Press F8 to enter iLO RBSU.
  4. Re-enable iLO through the configuration utility.
  5. Power off the server again.
  6. Return the S1 switch to its default OFF position.

Important Notes:

  • The System Maintenance Switch S1 controls iLO security.
  • By default, the switch remains in the OFF position, which means HP iLO security is enabled.
  • The iLO Security Override Switch uses switch #1 on the DIP switch panel.

Filed Under: Guides, Technology Tagged With: HP Microserver

Ubuntu Desktop 24.04 Change Wallpaper Settings

2025/01/10 by sudo Leave a Comment

One annoyance with Ubuntu 24.04 is the lack of option to change background adjustment option from its default of “zoom” to something more sensible like “centred”. In order to achieve this, users are required to install the gnome tweaks tool:

sudo apt-get install gnome-tweaks

Once installed, there’s an option under the appearance tap for “background” and a drop down “Adjustment”, which can be changed in order to prevent backgrounds doing crazy things, especially with external monitors plugged in.

Ubuntu 24.04 Gnome Tweaks screenshot showing "background adjustment" option

Ubuntu 24.04 Gnome Tweaks screenshot showing “background adjustment” option

 

Filed Under: Guides Tagged With: ubuntu desktop

Customising Ubuntu Desktop 24.04

2024/12/14 by sudo Leave a Comment

This blog post aims to serve as a guide to anyone who is setting up Ubuntu Desktop 24.04. It will be split into sections incase you’re only interested in specific parts of the setup process, and follow up posts will cover setting up development tools.

Improvements to Ubuntu’s UI

While the default Ubuntu user interface is usable, I have grown up with Windows and Windows parallel user interfaces with the taskbar at the bottom of the screen. I don’t like installing lots of plugins (like dash to dock on gnome extensions, which I do recommend if you’re more used to Windows or Cinnamon style layouts). Instead I’ve opted to simply edit the preferences within Ubuntu Desktop to set the dock at the bottom of the screen.

Setting the dock to the bottom of the screen

This can be achieved by going to the settings and locating “Ubuntu Desktop” from the list on the left hand side. Then changing the “Position on Screen” to “bottom” and altering the icon size as desired.

Ubuntu Desktop Settings screenshot

Ubuntu Desktop Settings screenshot

Window tiling improvements

One additional enhancement that is worth while is “Tiling Shell” by domferr, which is available as a gnome extension.

Install gnome browser connector to browse and install gnome packages:

sudo apt-get install gnome-shell-extension-manager gnome-browser-connector

This can then be found in the system menu by searching for shell

From the tool, search for Tiling Shell by domferr and install it.Gnome Extension Manager "Search for extenions" screenDisable Ubuntu snapping from the shell extension manager, and enable tiling. a new menu appears top left on the task bar to select the window layout. Hot keys can be defined in the extension manager.Gnome Extension Manager installed extensions options screenThis also allows you to view and configure any options for the tiling manager, but by default the keybindings are super (windows key) + arrow keys. A new icon will appear at the top of the desktop, indicating windows in a tiled pattern. This lets you control what tiling option is currently enabled, as well as creating additional ones.

Tiling sell configuration screen, showing window position options.Tiling shell is a really neat little extension. Historically I’ve used gTile, also a gnome shell extension, but have found it a bit harder to setup – it is more flexible though.

Web Browsers and Plugins

Ubuntu Desktop 24.04 ships with Firefox as it’s default web browser. Firefox is one of the only open source browsers that is not based on the Chromium engine, used by Chromium, Chrome, Brave, etc. While it’s title position as the most used web browser is long lost to history, it is still highly recommended and there’s no reason to install another browser, unless you’re a web developer and need some additional browsers for testing. The only thing worth doing is installing some plugins.

Blocking adverts has become a default, given how obtrusive they have become. Firefox supports uBlock Origin and it is available from it’s own extensions site. To find it, open Firefox and enter “about:addons” in the address bar. This will take you to the extensions screen where you can “Find more add-ons” and search for it.

Firefox addons selection screen

There are other plugins for firefox which may be worth browsing through to see if you like the look of them. A password manager like BitWarden or LastPass may be useful, as may Privacy Badger or Facebook Container – both used to help maintain privacy.

 

Quality of Life Additional Software

Cleaning up old snaps

Annoyingly, Ubuntu’s snap ecosystem does not automatically remove old snaps when new versions are installed. While it’s not clear if there have been improvements in Ubuntu 24.04, certainly 22.04 needed a dedicated script to help clean up these old snaps. It seems reasonable to include the script on Ubuntu 24.04 just in case:

#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
snap list --all | awk '/disabled/{print $1, $3}' |
    while read snapname revision; do
        snap remove "$snapname" --revision="$revision"
    done

This can then be executed as part of general system updates:

sudo apt-get update; sudo apt-get upgrade -y; sudo ~/clean_snaps.sh

 

Aliases

Lots of people use aliases in their shell to streamline commonly used commands or sets of commands, however I like to re-enforce my use of standard commands so I can be relatively systems agnostic. If I pick up work doing support on someone elses Linux system I am not fighting my own muscle memory using aliases that don’t exist. Should you wish to setup your own aliases, this can be done using the ~/.bash_aliases file.

Firewall

One final note on the base machine setup is that by default Ubuntu 24.04 (infact any Ubuntu version) does not start the system firewall by default. Usually it’s better to enable it, even if your machine does not have any ports open by default. This can be done simply with the following command:

sudo ufw enable

Filed Under: Guides, Linux, Technology, Uncategorized

Remove domains from Let’s Encrypt using Certbot

2024/07/22 by sudo Leave a Comment

When decomissioning sites on a server hosting multiple domains and Let’s Encrypt for SSL certificate renewals, it’s necissary to remove the domains from both the virtual hosts file(s) and Let’s Encrypts configuration using certbot. If the domain is not removed from certbot, the remaining domains hosted on the server can encounter SSL certificate errors on renewal.

If old domains are present during the renewal request, it’s likely an error will appear in /var/log/letsencrypt/letsencrypt.log:

ERROR:certbot._internal.log:1 renew failure(s), 0 parse failure(s)

This summary line may also appear:

The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.

To ensure that only the domains that still require SSL certificates are part of the certbot renewal request, the following steps need be followed:

  1. List Installed Certificates:
    Run the following command to list all installed certificates and their associated domains:
certbot certificates

You should be able to see the Certificate Name as well as the Domains included in the output.

  1. Update Certificate Renewal Configuration:
    Use the following command to update the renewal configuration, specifying only the domains that should be included in the renewal:
certbot certonly --cert-name example_cert_name -d example.com -d example.org

Replace example_cert_name with the name of the certificate to be updated. Include only the domains that should be renewed (e.g., example.com and example.org).

Let’s Encrypt should now have renewed the certificate for just the domains specified, removing any domains not listed from the renewal request. It is possible to test this by running the certbot certificates command again and checking the output.

Filed Under: Guides, Technology

  • 1
  • 2
  • 3
  • …
  • 15
  • Next Page »

Recent Posts

  • System Hang on Ubuntu 24.04 “e1000_print_hw_hang”
  • Disable iLO on HP Microserver Gen8
  • Ubuntu Desktop 24.04 Change Wallpaper Settings
  • Customising Ubuntu Desktop 24.04
  • Remove domains from Let’s Encrypt using Certbot

Tags

API auditing crochet data recovery debian debudding development Dingo API docker email Getting started with Laravel 5 & Dingo API hard drive health HP Microserver KVM Laravel larvel 5 lenovo Linux Minion mint netgear nas networking network shares php PHP development Postfix raspberry pi review samba security SMART smartctl smartmontools smb testing traefik ubuntu ubuntu 18.04 ubuntu 20.04 ubuntu 22.04 ubuntu server vagrant Virtual machines xdebug xubuntu

© Copyright 2015 apt get life

 

Loading Comments...