Placement of -l options matters in GCC

I ran into an interesting puzzle with GCC this afternoon when trying to compile the code below. The first command that I used to compile the code failed: After about one hour of trying to resolve this error, I was resigned to reading the documentation. This is what I found from the section Options for …

Debian Linux, kernel 5.19, and crypttab

A Debian Linux system, running kernel 5.19 with Linux Unified Key Setup (LUKS) encryption, sometimes fails to boot from the suspend state, with the error message: Gave up waiting for suspend/resume device. This failure does not happen on kernel 5.18 and seems related to how the swap partition is set up in LVM volumes. For …

Two-finger scrolling in GNOME

For two-finger scrolling to work consistently in GNOME Wayland, I have to place one finger on the touchpad before the other. In addition, the point of contact of the second finger must be higher than the first’s. I observed this behaviour with a Lenovo ThinkPad. I cannot say whether it is unique to this laptop …

Solving error 1962 with Debian and UEFI on IdeaCentre K430

When setting up Debian Linux (Bullseye) on my Lenovo IdeaCentre K430 computer, I encountered problems related to UEFI. After the installation, the system did not boot and displayed the message Error 1962: No operating system found. It took three attempts before I found the solution, which I describe here. First, ensure that UEFI is enabled …

How to preserve custom /etc/resolv.conf entries with DHCP in Debian Linux

In Debian Linux, when a network interface is configured to obtain an IP address automatically, the DHCP client utility writes the values received from the server over the content of file /etc/resolv.conf. Thus, custom entries that you had saved in this file, typically domain suffixes and domain name servers, are lost. If you need DHCP …

Trap with `gmtime` and other time functions

From man gmtime: The gmtime() function converts the calendar time timep to broken-down time representation, expressed in Coordinated Universal Time (UTC). It may return NULL when the year does not fit into an integer. The return value points to a statically allocated struct which might be overwritten by subsequent calls to any of the date …

ESP8266: Flash images at more than 115200 bps

If esptool is limited to 115200 bps when flashing your firmware to an ESP8266, you can try to increase the bitrate by following the steps below. Locate esptool.py for your installation. On Debian and Ubuntu, this file is located in /usr/share/esptool. Edit esptool.py and change the value on the line starting with ESP_ROM_BAUD from 115200 …