Workaround for a Glitch during Linux Mint Installation on an Acer Laptop

I was asked to provide assistance on the installation of Linux Mint on Acer laptop due to the End of Life for Windows 10 in October 2025.

The first step was to boot Linux Mint from a thumb drive to check that there was enough free space on the Windows partition for Linux.

Upon that initial boot, Linux could not “see” the NVME SSD hard drive.

A bit of googling suggested that fast boot and secure boot might be the problem.

It took some fiddling to get those turned “off” in the UEFI Settings, and in fact I had to do some of it using BCDEDIT in adminstrator mode in Windows.

Even after all that I still needed to tweak the storage controller mode in the UEFI Settings. But I still couldn’t “see” that option in the UEFI.

When I tried booting Linux using Compatibility mode I saw the boot messages flashing by and noticed a reference to RAID – and that was a clue that the Storage Controller Mode needed to change.

Then somewhere deep in a forum message I noticed a reference to CTRL-S inside the UEFI Settings.

I tapped CTRL-S and lo and behold the setting for Storage Controller Mode popped up. I changed it to AHCI and on the next Linux Boot the Hard Drive was visible.

The install went well after that, but when I was showing how to boot Windows from the GRUB menu, Windows seemed to think that it was a bit broken. It took a few restarts for the “so-called” repair to complete and when it finally did boot to Windows, I noticed it was in Safe Mode.

I’m pretty sure I could have eventually got it to boot in Normal mode, but time was starting to become of the essence.

So the Acer laptop was packed up and left with dual boot now on the Acer Laptop.

Unfortunately, most of these issues were the result of Windows trying to lock itself in on the computer with secure and fast boot, but it is a bit daunting for people not used to seeing UEFI Settings pages and having to tweak stuff to get the operating system and hardware recognized.

I offer this to you as a caveat for Linux installation. Unlike you I’ve run into a number of glitches doing Mint installations all a bit different. But each one adds to my knowledge base.

I suspect that in the lead up to October we might be doing many more installs on a wider variety of brand names and configurations. So, experience with these various idiosyncrasies might be helpful.

How to re-connect quickly to internet when the laptop lid is lifted

I am running Linux Mint 22 on my Lenovo Thinkpad T470.

When I re-open the laptop lid it would take several minutes for internet to re-connect.

In order to solve this problem I consulted ChatGPT and was given a few options to try. I discovered that restarting the NetworkManager did the trick.

I then asked ChatGPT how to automate this process. It suggested setting up a service that would launch whenever the laptop lid is opened.

Here is how I implemented it:

1. Create a systemd service

You can create a custom systemd service that triggers when the laptop lid opens.

Open Terminal and create a new service file:

sudo vim /etc/systemd/system/lid-open.service

Add the following configuration:

[Unit]
Description=Run a command when the laptop lid is opened
After=suspend.target

[Service]
Type=oneshot
ExecStart=/path/to/your/script.sh

[Install]
WantedBy=suspend.target

Replace /path/to/your/script.sh with the path to the script or command you want to run when the lid opens

2. Create the Script

Create the script that will be executed when the lid opens.

In your home directory, create the script file:

vim ~/lid-open-script.sh

Add your desired command to the script. For example, if you want to reconnect to Wi-Fi, your script might look like this:

#!/usr/bin/bash
sudo systemctl restart NetworkManager

Make the script executable

chmod +x ~/lid-open-script.sh

3. Enable and Start the Service

Enable and start the service so that it runs when the laptop resumes after the lid opens.

Enable the service:
sudo systemctl enable lid-open.service

Start the service:

sudo systemctl start lid-open.service

4. Test the Setup

Close and reopen your laptop lid to see if the script runs as expected. You can also check the status of your service to troubleshoot if necessary:

sudo systemctl status lid-open.service

This method allows you to automate the execution of any command or script when the laptop lid opens. If you run into any issues, you can check the logs with journalctl -xe for further details.

Wake up Linux Mint with PS/2 Mouse

Thanks to ChatGPT which gave me specific and accurate instructions I can now wake my computer running Linux Mint when the monitor goes to sleep (not Suspend) after the time specified in the Power Management settings.

Here is what ChatGPT told me to do:

To enable your Linux Mint system to wake up from suspend using a PS/2 mouse, you can try the following steps:

Check if the PS/2 mouse is recognized:

Open a terminal and run:

cat /proc/bus/input/devices

This command will list all input devices. Look for a section related to your PS/2 mouse. It might be labeled something like “ImPS/2 Generic Wheel Mouse” or similar.

Enable wakeup for the PS/2 mouse:

First, identify the device file corresponding to the PS/2 mouse. You can usually find it under /sys/bus/serio/devices/serioX/power/wakeup where X is the specific identifier of your mouse device.


Check if wakeup is enabled for the device by running:

cat /sys/bus/serio/devices/serioX/power/wakeup

Replace serioX with the correct identifier for your mouse. If it says “disabled,” you’ll need to enable it.


To enable it, run the following command (you’ll need root privileges):

echo enabled | sudo tee /sys/bus/serio/devices/serioX/power/wakeup

Make the change persistent:

To ensure that the setting persists after a reboot, you can add the command to a startup script.

Edit the file /etc/rc.local (create it if it doesn’t exist) and add the wakeup command just before the exit 0 line. For example:

# Enable wakeup for PS/2 mouse
echo enabled > /sys/bus/serio/devices/serioX/power/wakeup
exit 0

Make sure the file is executable:

sudo chmod +x /etc/rc.local

Test it out:

Suspend your system and then try moving the PS/2 mouse to see if it wakes up your system.

Lilypond for Presentation Slides

I have some lilypond files that need to be modified so that the text is larger so that they can be added to Presentation slides and still be readable.

The process requires a few different steps.

Change the font size as follows (vim substitute command)

s/huge/sans \\fontsize #3.8/

Modify the source file so that the number of lines of text will fit approximately on half of a half page.

Convert the pdf that is generated by Lilypond to a png or jpg file while keeping the quality.

convert \
-verbose \
-density 150 \
-trim \
test.pdf \
-quality 100 \
-flatten \
-sharpen 0x1.0 \
24-18.jpg

Fixing the Scanner Error after a new Install of Linux Mint

I have a Samsung M2885FW All in One Printer/Scanner.

When I install Linux Mint the scanner is automatically configured, and shows up in Scan jobs, but when a scan is initiated the error “unable to scan” “scanner not found” crops up.

The error seems to be related to the fact that the driver is listed as WSD (Web Services on Devices). It seems to be a driverless way to make printing simple and easy. However it is anything but that in my case.

I struggled to remember/recall the way this was fixed in the past, so I am recording it here with the hope that it will save a lot of time on the next install or upgrade of Linux Mint.

I disabled WSD on the printer setting interface that can be found at: https://LocalIPAddressOfPrinter/

Then I added the SULDR repository found at https://www.bchemnet.com/suldr/

Make sure that you follow the new standard for specifying the keyring. It needs to go into the /usr/share/keyrings/ directory and the deb entry in the additional-repositories.list file needs to have the signed-by attribute added as follows:

deb [signed-by=/usr/share/keyrings/suldr-keyring.gpg] https://www.bchemnet.com/suldr/ debian extra

Update the list of (installed) software, and then install the appropriate driver.

In my case it was suld-driver2-1.00.39 (or whatever the latest revision number).

Run apt install with the appropriate driver and then you should be good to go. Make sure that the scanner listed by “Document Scanner (aka simple-scan)” does not have a WSD designation attached to it.

Un-Chipmunking a Logitech Webcam Microphone

Just for fun I added an extra webcam to my desktop computer, thinking that it might be useful from time to time to add a different perspective to my video conferencing sessions etc.
However, I quickly discovered that the microphone on this new webcam was making me sound like Alvin of the Chipmunks. The simple solution was to switch to the microphone on the other webcam, but this became increasingly annoying. Also, I thought there must be a solution that would fix the problem once and for all.
Every problem creates an opportunity to dive deeper into the technology behind something. Get introduced to the world of webSDR and you end up learning about Autoplay policy in different browsers and exploring how to change the default policy programmatically. All because you had the idea to schedule recordings of shortwave broadcasts instead of juggling your calendar in order to be there at the proper time.
However, I digress.
Back to my squeaky microphone.
It turns out that you get to learn about sampling rates and other arcane tech trivia.
Once you hit the right results in your Google searches, the fix was relatively easy. All you need to do is change a setting in a Pulseaudio configuration file.(On a Linux machine, that is!)
In the process you learn about a new command line command, learn how to identify your sound devices (such as microphones) and modify the appropriate config file to fix the problem.
Voilà no more Alvin and lots more Peter.
Here are the details:
Apparently, Logitech webcams have a tendency to get configured with a sampling rate of 48000, which is three times too much. So you need to get a device name for the offending microphone and then change the configuration so that it is registered at the proper 16000 instead.
On my Linux machine I did the following, thanks to this helpful post:

https://evgenykuznetsov.org/en/posts/2020/webcam-sound/

What I learned:

A new command to list audio devices:

pacmd list-sources

Identifying the desired device from the output of the above command, and modifying the appropriate config file:

/etc/pulse/default.pa

to add a line to set the proper sampling rate:

load-module module-remap-source master=<device name from above> rate=16000

Get interface names

I remember something on Stack Overflow or one of the other similar technical help forums that showed a way to get all the interface names on a particular computer. I could not find the reference and my attempts to recall it from memory were not successful, so I wrote the following command line that seems to do the trick:

for i in $(ip -o link show | cut -d: -f2 | xargs); do if [[ $i != "lo" ]]; then echo $i; fi; done

Explanation: use the ip command using the “one line” option to list all the network interfaces. They will be the second field on each line of the resulting output. The xargs command will trim leading and trailing spaces from the interface name. Filter out the loopback interface “lo” and then echo each entry.

Mounting a VirtualBox Hard Drive image in Linux

I was looking for a way to access files on a Virtual Box hard drive. As usual StackExchange came to the rescue. Here is how I mounted a FreeDos virtual hard drive and gained access to the files that were on it:

sudo modprobe nbd
sudo qemu-nbd -r -c /dev/nbd1 /home/peter/VirtualBox\ VMs/Knoppix/FreeDos/NewVirtualDisk1.vmdk
sudo mount /dev/nbd1p1 /media/peter/vmdk/

Now the hard drive files are available on /media/peter/vmdk/

When done:
sudo umount /media/peter/vmdk

Solving “Hang” on Dell Laptop running Linux Mint

I found this workaround and applied it to my Dell Inspiron 3551 (purchased with Ubuntu pre-loaded, but currently running Linux Mint 19.1 (Tessa)

Source: https://easylinuxtipsproject.blogspot.com/p/bugs.html#ID25

Random freezes on Intel-based computers

25. On certain hardware combinations with Intel CPU’s, you can experience random freezes of your system. In particular the Bay Trail series of Intel CPU’s is known to be affected by this.

(The Dell Inspiron 3551 fits this description exactly.)


This can often be solved by sharply reducing the maximum sleep state of the CPU when idle (maximal C-state). Namely from 6 (or 9) to 1.

The price you pay for that is some extra power consumption, which is of course rather annoying for laptops (you’ll notice a somewhat higher battery drain speed). But at least your machine should run stable now.

Proceed like this:

a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. First check your current max C-state. Use copy/paste to transfer the following command line into the terminal:

cat /sys/module/intel_idle/parameters/max_cstate

Press Enter.

The output will probably be 6 or 9.

c. Now copy/paste the following line into the terminal, in order to edit a settings file:

xed admin:///etc/default/grub

Press Enter.

d. Delete this existing line:

GRUB_CMDLINE_LINUX=””

Replace it by this line (use copy/paste to transfer it):

GRUB_CMDLINE_LINUX=”intel_idle.max_cstate=1″

e. Save the changes and close the modified file.

f. Then execute this command line in the terminal:

sudo update-grub

g. Reboot.

h. Check the change with this command:

cat /sys/module/intel_idle/parameters/max_cstate

The output should be 1 now.

Live Edit of MariaDB generated table using Jquery and Bootstrap

My latest research involved the generation of a web table from a MySql/MariaDB database, with live CRUD capability (Create, Read, Update, Delete).
Key Learnings: JQuery is your friend. Bootstrap is also your friend. W3Schools is your friend. StackOverflow is your friend. Github is your friend.

With the help of all the above mentioned resources I was able to take a database of information, list it in a web page and then have options to delete records, update records, and add records. The biggest headache came with the question of how to signal a change to existing information in the listed table. An example I found on Github used the .on(blur…) functionality of JQuery but it had a bug(?) associated with it when the blur event fired multiple (an infinite number?) times. I solved the problem unsatisfactorily by changing .on(‘blur’,…) to .on(‘dblclick’…). I wanted to try avoiding mouse operations, but for now this has fixed the issue.

Update: April 1, 2023 (and this is not an April Fool)

The latest version of JQuery appears to have fixed this issue. The ‘dblclick’ references were changed to ‘blur’ references and the page appears to be working as intended.

This example on Github was particularly helpful:

https://github.com/rahmat058/Live-Table-Add-Edit-Delete-using-Ajax-Jquery-in-PHP-Mysql