Screen Flicker with Linux Mint 22

After upgrading to Linux Mint 22 on my Lenovo ThinkPad T470 I began to experience screen flicker.

Research revealed that the problem was introduced to installations using Intel video drivers in the Linux Kernel 6.8 and subsequent releases in the 6.8 stream.

A fix was implemented with a couple of boot options. Instructions on what those options are and how to implement them will follow.

My continued research suggests that the problem is resolved in the 6.9 kernel.

There are ways to start using the newer kernel but for now I’ll stick with the workaround until Linux Mint 22 makes the 6.9 kernel available in an update/upgrade.

The boot options that will prevent screen flickering are:

i915.enable_dc=0 intel_idle.max_cstate=2

To make these boot options semi-permanent, they can be added to the default grub menu template.

Using your favourite text editor with sudo, edit the /etc/default/grub file

Look for a line containing:

GRUB_CMDLINE_LINUX=""

Note that there may already be some boot options between the “” on that line.

Add the above two options between the quotes on that line (along with any other options, if there are any).

The line in will now look something like:

GRUB_CMDLINE_LINUX="i915.enable_dc=0 intel_idle.max_cstate=2"

Then run:

sudo update-grub

Now, reboot your computer and when the grub menu appears you can confirm that the options have been added to the “linux” line in the menu entries.

Connecting Bluetooth keyboard to Linux Mint

I was having trouble connecting my Nexxtech Bluetooth keyboard to my ThinkPad T470 running Linux Mint.

I have encountered this problem before with other computers.

I decided to record what worked for me this time so that I can easily refer to it when and if it happens again with another computer.

Once the connection is made, the keyboard seems to work well.

The article I used from Medium, written by Wainaina Gichuhi, had instructions for both GUI and the terminal.

The GUI method did not work, but the instructions for the Linux command line in a terminal worked perfectly.

In case the article disappears the instructions are adapted from the source article as follows:

Connect via Terminal

Put your mouse or keyboard in pairing mode (the instructions are provided by the device manufacturer).

At the terminal prompt, type

bluetoothctl

In the bluetoothctl prompt, type as follows:

scan on

You should see available bluetooth devices and their MAC address listed. Note your keyboard or mouse and copy the MAC address.

Then, at the prompt:

pair MAC

And then

connect MAC

and then

trust MAC

Trusting a Bluetooth device ensures that it reconnects automatically after a reboot, wake or when turned on.

Remember to replace MAC with your keyboard or mouse MAC address.

For example, when I did the scan, the MAC address for my keyboard was 20:11:10:12:24:0B

Various Tips and Tricks in Linux Bash

Find wireless device names:

nic=$(cat /proc/net/wireless | awk -F: '/^w/ {print $1}')

Check for internet connectivity:

nc -z 1.1.1.1 53 >/dev/null 2>&1 && echo "online" || echo "offline"

Explanation of the above command:
nc – netcat – Read and write data across networks – arbitrary TCP and UDP connections and listens.
-z Just scan for listening daemons, without sending any data to them.
1.1.1.1 – is a free Domain Name System (DNS) service by the American company Cloudflare in partnership with APNIC.
53 – is the port number associated with Domain Name System
> all standard and error output is directed to the null device
a zero response indicates success “online”, a non-zero response indicates “failure”

Stop/Start Cron Processing in Raspbian (Raspberry Pi OS)

sudo systemctl stop cron.service

sudo systemctl start cron.service