SD cards trim command

Many modern SD cards support the trim command () in Linux, the problem is that not many SD card readers (Mostly USB) do

So running () on a mounted card will usually return an error such as

fstrim -v /hds/usb
fstrim: /hds/usb: the discard operation is not supported

The command “lsblk –discard /dev/sdf” should tell you whether your SD card/adapter combination support trim right now, so the failure of the fstrim command above can be predicted in advance with this command

Now, assuming your SD card is not mounted, and you need to format it, Will formatting restore the speed ? unfortunately not, to restore the speed, before formatting your SD card, you might want to run the blkdiscard function, mind you, this command will delete all your data !

blkdiscard -f /dev/sdf

but even that might not work

blkdiscard: Operation forced, data will be lost!
blkdiscard: /dev/sdf: BLKDISCARD ioctl failed: Operation not supported

2.5MM audio jacks

2 pin connector TS (tip, sleeve)
3 pin connectors, TRS (tip, ring, sleeve)
4 pin connectors, TRRS (tip, ring, ring, sleeve)


Two standards exist for TRRS (4 Pin)

CTIA, which you can think of as apple, and i will call it apple throughout the post to help you focus on what matters, and OMTP, Which is everything else which i will call Android from here on.

For android (And almost any non apple device), the sleeve (Pin closest to the wire) is the ground, and the ring right above it would be the microphone… the other ring and the tip are the two speakers, right and left, In apple’s setup, the ground and microphone are switched together !


In a 3 pin connector (TRS), When it is meant to carry microphone signal, the tip is the microphone signal, the sleeve is still the ground, and the ring may carry any other signal such as a single speaker channel.

Dummy HDMI adapters

A nice adapter that has both input and output is this which i got from AliExpress (Photos at the bottom)

There are many uses for this dummy adapter, one of them is “Sunshine and moonlight remote desktop”, another is using your GPU for processing while you are away (Nvidia won’t allow it if you don’t have a monitor connected), and most importantly, My video switch since I use multiple machines on the same monitor.

What this adapter is in reality is an eeprom chip that has the EDID data of a monitor with a very high refresh rate (120 hz), namely a fictitious monitor named AOC 28E850, If you want to make sure that this works with your monitor, you will need to flash both ends of the adapter, the one connected to the PC needs to be flashed with your monitor’s EDID

1- Copy the EDID data from your monitor
2- Burn the data onto this adapter

There are two EDIDs one for each way and can (must) be flashed individually

To do that, there are many tools

edid-rw tool:
Analog Way EDID editor:

Text from the original page of the item

Support hot plug, plug and play
Support virtual display, when the display is powered off or the display cable is hot-plugged, It can achieve no video signal loss, no screen change, no windows running, no order disorder;
Support up to 10.8Gbps video bandwidth; It has power-off memory function, power-off/restart display sequence is not chaotic, and the set mode is not lost.
Supports for AMD multi-screen image card splicing extended split-screen mode, eyefinity wide-area multi-screen splicing mode (pulling the monitor cable when it is powered on has no effect on the display of the screen TV wall, and pulling the line will only cause the screen of the dropped line to be black, and other screens will not move)
Support Nvidia image card multi-screen output, the screen sequence is not chaotic after restart

Connect typ:HDMI
Application scope: Display with HDMI interface
Product name :HDMI lock screen treasure
Max Resolution : 2560 x 1440@60HZ / 3840 x 2160@60HZ
Material:Aluminum alloy

Package Contents:
6 x HDMI2.0 Virtual Adapter

Music players for android

When it comes to MP3 players, there is definitely no shortage, but finding a good one is a task

Here are the most popular one, each with it’s advantages and disadvantages

Retro Music Player

Open source: github
Available on google play and F-Droid
Elegant, plays music files and does not do much more
Appears to be written in Kotlin

Fossify Music Player

Open Source: Github
Available on Google Play and F-Droid
Elegant, plays music files and does not do much more
Appears to be written in Kotlin

Editing Music ID3 tags

id3 tags were meant to be a simple way to store metadata in MP3 files, slowly but steadily, things became a bit more complicated

Originally, ID3 tags were meta data near the end of a file, then ID3V2 came along, and meta tags were moved to the beginning (With an ID3V1 copy at the end added by most ID3 editors)

Album artwork is another complication, As it may be embedded in the file, An older method used to depend on keeping an image called “cover.jpg” in the folder where the file is stored.

You can also have “user-defined fields”, which can be helpful if you are developing a music player that has some novel ideas

ID3 tag information can be obtained from, MusicBrainz, Discogs, Amazon


  • EasyTAG: GIT = tag editor for MP3, Ogg Vorbis files and more
    Written in C,
    Dep: libid3-3.8.3v5 libid3tag0 libopusfile0 – Suggested: libid3-tools


  • KID3

LINUX Command Line

  • id3:
  • id3edit: GIT = id3edit is a command line ID3v2 tag editor and debugger


  • MP3TAG: Freeware (Not free as in freedom), But great software nonetheless 😉

Wireless android studio

I run windows in KVM, and the QEMU android Emulator that ships with Android studio crashes all the time, so the obvious solution, with all those android devices I have is to connect a phone to android studio, It is faster and spares me the hassle of finding out why nested virtualization is so terrible

But having a phone connected via USB is not optimal, as i have to pick it up every time i want to run my under development software on it !

The answer seems to be in the

1- install Android WiFi ADB : A plugin easy to install in Android studio

2- A phone with Android 11 and above

So let us do this step by step

  1. Download SDK platform-tools and install it (Copy it somewhere and add that to your system path)
  2. Enable developer options on the phone (Keep tapping build number)
  3. From developer options, Enable wireless debugging
  4. Select Pair device with pairing code. Take note of the pairing code, IP address, and port number displayed on the device (see the above image).
  5. Open the command prompt and run the command adb pair ipaddr:port
    adb pair
    Enter pairing code: xxxxxx
    daemon not running; starting now at tcp:5037
    daemon started successfully
    Successfully paired to [guid=adb-RF8M4xxxxxxx-xxxxxxx]
  6. Now, to have it appear as a device in android studio… Go to wireless debugging and notice the port number, then using that IP and port, use the following command
    adb connect
  7. Recommended: Install the “Android WiFI ADB” plugin in android studio

1- Install RUST with VSCODE

The official VSCODE extension for rust is called (rust-analyzer) by

To install rust, All you need is the installer, you can get it from, it might fire up a visual studio installer for the builder if you are running windows…

So, to check that you have rust installed on your computer, You may want to run the following command

rustc --version

In my case, it responds with (rustc 1.77.0 (aedd173a2 2024-03-17))

To update rust, you will need to run the commadn

rustup update

If you want to create a new rust project you CD into a directory where you want the project to be, and issue the command

cargo new projectname

Now, you can open the projectname directory in VSCODE to start working on a project

If at any time you want to update the dependancies in your project, you can simply issue the command

cargo update

from within the project directory, this should update the cargo.lock file etc….

To add libraries to cargo, visit and you can get the names of the libraries you can add to Cargo.toml

Apps won’t run without an internet connection

As part of my paranoia when using windows (Fear of ransomware or spyware or otherwise), I allow my web browser to connect via proxy, and the rest of the machine’s apps have no internet access (Which is a KVM virtual machine, with USB and graphics passthrough)

Now, recently, Applications are no longer running on windows 10 ! Instead, I am getting a message that reads :

SmartScreen can't be reached right now. 

Check your internet connection. Microsoft defender SmartScreen is unreachable and can't help you decide if this app is okay to run.

Publisher: xxxx
App: xxxx

This seems to be something relevant to Microsoft security, where windows consults with Microsoft before running an app for the first time !

My solution is to disable it, why, because I have to pick one method or the other to protect my computer, and antivirus software, although works if you download torrents etc… doesn’t really detect the latest threats, when they say detects and removes 99% of viruses, this includes all viruses from 1981 onward, and very few of the most recent viruses and threats, so the question remains, if i am not downloading torrents and the like, what are the odds i would meet Michelangelo

So, the steps to disable this are as follows


The list of questions and information will probably continue to grow until i end up buying a new electric car, so i will keep updating this list as i find out more about this car.

I am thinking of getting the Toyota BZ4X, So I will be posting my findings here, the order of the questions is counter intuitive, because I always prefer to start at the place that branches most

– Is the Toyota BZ4x exactly the same as the Subaru Solterra ?

  • All the research up to now says they are identical, but i have not been able to validate this conclusion yet

– Which diagnostics software does the car use ?

Why so early with this question ? because the upcoming questions need to adapt to answer this one which provides better questions down the line !

On the Toyota Techstream website, there is a claim that Version 18 works with the BZ4X, I will test this in person hopefully today.

– The BZ4X sold in china is made by GAC MOTOR (FAW no longer makes them), while the one sold in north america is made in Japan, are those cars exactly the same ?

My research up to this point says they should be, but I can’t seem to find any differences besides the battery size

– Cars sharing the e-TNGA platform share what exactly ?

Electric motor location, driver positioning, and battery width are fixed between all the models that will use this platform (Toyota, Subaru, Suzuki, Daihatsu, and possibly mazda)! Number of batteries, Wheelbase, and anything not mentioned in the fixed list can probably be different

– Maintenance and possible pitfalls

To begin with, I still drive a Nissan Leaf 2014, with over 100K Kilometers on it, and 10 bars of battery health, the car has paid for itself over the past few years (Before the most recent electricity hike in Jordan)

So, because one point leads to the other, going through the 3 points above in the counter intuitive direction (In reverse) makes more sense