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 …
Author Archives: Eddy Young
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 …
Continue reading “Solving error 1962 with Debian and UEFI on IdeaCentre K430”
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 …
Continue reading “How to preserve custom /etc/resolv.conf entries with DHCP in Debian Linux”
Adopting the kibi
In dial-up Internet days we surmised that a 56K modem transferred data at 56 000 bits per second (or 56 kbps). Dividing this speed by 10 gave a result of 5.6 kilobytes per second (or 5.6 kBps). Thus, it was easy to calculate download times for files with the following formula, given that their sizes …
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 …
Continue reading “Trap with `gmtime` and other time functions”
ESP8266: Always call ‘wifi_wps_enable’ before ‘wifi_set_wps_cb’
For WPS to work on the ESP8266 and using the non-OS SDK, be sure to call wifi_wps_enable() before setting the callback function with wifi_set_wps_cb(). For example: In the callback itself, call wifi_wps_disable() before wifi_station_connect(). For example:
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 …
Continue reading “ESP8266: Flash images at more than 115200 bps”
ESP8266: Always call `uart_init` before `gpio_init`
I don’t remember if this information is in the documentation, but having spent a few hours to figure things out, I think it is important to record it here. For example: