CD Rom slot is not acting as plug and play

so my cdrom drive is easily swappable, i push the lock, drive pops out and i push a spare hdd in, the problem is on my windows i don't have to do anything, it behaves as a plug and play device but on my linux i have to rescan for scsi devices if i don't wanna reboot with:

for host in /sys/class/scsi_host/*; do echo "- - -" | sudo tee $host/scan; ls /dev/sd* ; done

any chance this can be automated under linux?

inxi:

System:    Kernel: 5.7.0-3-MANJARO x86_64 bits: 64 compiler: gcc v: 10.1.0 
           Desktop: KDE Plasma 5.18.5 tk: Qt 5.15.0 info: latte-dock wm: kwin_x11 dm: SDDM 
           Distro: Manjaro Linux 
Machine:   Type: Laptop System: Dell product: Latitude E6440 v: 00 serial: <filter> Chassis: 
           type: 9 serial: <filter> 
           Mobo: Dell model: 0YX2X3 v: A00 serial: <filter> UEFI: Dell v: A24 
           date: 06/13/2019 
Battery:   ID-1: BAT0 charge: 3.7 Wh condition: 29.2/37.7 Wh (77%) volts: 12.8/11.1 
           model: LGC-LGC2.8 DELL TVMVN19 type: Li-ion serial: <filter> status: Charging 
Memory:    RAM: total: 7.68 GiB used: 2.68 GiB (34.8%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Topology: Dual Core model: Intel Core i7-4600M bits: 64 type: MT MCP arch: Haswell 
           rev: 3 L2 cache: 4096 KiB bogomips: 23159 
           Speed: 798 MHz min/max: 800/3600 MHz Core speeds (MHz): 1: 798 2: 798 3: 798 
           4: 798 
           Flags: abm acpi aes aperfmperf apic arat arch_perfmon avx avx2 bmi1 bmi2 bts 
           clflush cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts 
           epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht ibpb 
           ibrs ida invpcid invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe msr 
           mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni 
           popcnt pse pse36 pti pts rdrand rdtscp rep_good sdbg sep smep smx ss ssbd sse sse2 
           sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust 
           tsc_deadline_timer vme vmx vnmi vpid x2apic xsave xsaveopt xtopology xtpr 
Graphics:  Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Dell 
           driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0416 
           Display: x11 server: X.Org 1.20.8 driver: modesetting alternate: fbdev,intel,vesa 
           compositor: kwin_x11 resolution: 1600x900~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4600 (HSW GT2) v: 4.5 Mesa 20.0.7 
           compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: Dell 
           driver: snd_hda_intel v: kernel bus ID: 00:03.0 chip ID: 8086:0c0c 
           Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: Dell 
           driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:8c20 
           Sound Server: ALSA v: k5.7.0-3-MANJARO 
Network:   Device-1: Intel Ethernet I217-LM vendor: Dell driver: e1000e v: 3.2.6-k port: f080 
           bus ID: 00:19.0 chip ID: 8086:153a 
           IF: eno1 state: down mac: <filter> 
           Device-2: Intel Centrino Advanced-N 6235 driver: iwlwifi v: kernel port: f040 
           bus ID: 03:00.0 chip ID: 8086:088e 
           IF: wlp3s0 state: up mac: <filter> 
           IP v4: <filter> type: dynamic noprefixroute scope: global broadcast: <filter> 
           IP v6: <filter> type: noprefixroute scope: link 
           IF-ID-1: docker0 state: down mac: <filter> 
           IP v4: <filter> scope: global broadcast: <filter> 
           WAN IP: <filter> 
Drives:    Local Storage: total: 709.83 GiB used: 567.05 GiB (79.9%) 
           ID-1: /dev/sda vendor: Lexar model: 512GB SSD size: 476.94 GiB speed: 6.0 Gb/s 
           serial: <filter> rev: 117H scheme: GPT 
           ID-2: /dev/sdb vendor: Samsung model: HM251HI size: 232.89 GiB speed: 3.0 Gb/s 
           rotation: 5400 rpm serial: <filter> rev: 0001 scheme: MBR 
           Message: No Optical or Floppy data was found. 
RAID:      Message: No RAID data was found. 
Partition: ID-1: / size: 294.86 GiB used: 250.04 GiB (84.8%) fs: ext4 dev: /dev/sda1 
           label: manjaro uuid: 3866f20b-c246-4d7b-b731-8a4900c8c24f 
           ID-2: /boot/efi size: 96.0 MiB used: 25.1 MiB (26.1%) fs: vfat dev: /dev/sda4 
           label: N/A uuid: D299-1920 
           ID-3: /run/media/hami/Spare size: 232.88 GiB used: 199.96 GiB (85.9%) fs: ntfs 
           dev: /dev/sdb4 label: Spare uuid: 2BCB980C33BB1DE2 
           ID-4: /run/media/hami/Windows 10 size: 75.53 GiB used: 24.60 GiB (32.6%) fs: ntfs 
           dev: /dev/sda6 label: Windows 10 uuid: 28609C45609C1C1E 
           ID-5: /run/media/hami/spare size: 98.12 GiB used: 92.43 GiB (94.2%) fs: ext4 
           dev: /dev/sda2 label: spare uuid: 51ad01a2-5cc2-43ec-9c5e-b2d8b63ef35e 
           ID-6: /var/lib/snapd/snap/caprine/37 raw size: 63.4 MiB size: <root required> 
           used: <root required> fs: squashfs dev: /dev/loop7 label: N/A uuid: N/A 
           ID-7: /var/lib/snapd/snap/caprine/38 raw size: 63.5 MiB size: <root required> 
           used: <root required> fs: squashfs dev: /dev/loop10 label: N/A uuid: N/A 
           ID-8: /var/lib/snapd/snap/core/9289 raw size: 97.0 MiB size: <root required> 
           used: <root required> fs: squashfs dev: /dev/loop4 label: N/A uuid: N/A 
           ID-9: /var/lib/snapd/snap/core/9436 raw size: 96.5 MiB size: <root required> 
           used: <root required> fs: squashfs dev: /dev/loop3 label: N/A uuid: N/A 
           ID-10: /var/lib/snapd/snap/core18/1705 raw size: 54.9 MiB size: <root required> 
           used: <root required> fs: squashfs dev: /dev/loop2 label: N/A uuid: N/A 
           ID-11: /var/lib/snapd/snap/core18/1754 raw size: 54.9 MiB size: <root required> 
           used: <root required> fs: squashfs dev: /dev/loop5 label: N/A uuid: N/A 
           ID-12: /var/lib/snapd/snap/gnome-3-28-1804/116 raw size: 160.2 MiB 
           size: <root required> used: <root required> fs: squashfs dev: /dev/loop1 
           label: N/A uuid: N/A 
           ID-13: /var/lib/snapd/snap/gnome-3-28-1804/128 raw size: 161.4 MiB 
           size: <root required> used: <root required> fs: squashfs dev: /dev/loop8 
           label: N/A uuid: N/A 
           ID-14: /var/lib/snapd/snap/gtk-common-themes/1502 raw size: 54.8 MiB 
           size: <root required> used: <root required> fs: squashfs dev: /dev/loop6 
           label: N/A uuid: N/A 
           ID-15: /var/lib/snapd/snap/gtk-common-themes/1506 raw size: 62.1 MiB 
           size: <root required> used: <root required> fs: squashfs dev: /dev/loop0 
           label: N/A uuid: N/A 
           ID-16: /var/lib/snapd/snap/hugo/8428 raw size: 28.8 MiB size: <root required> 
           used: <root required> fs: squashfs dev: /dev/loop9 label: N/A uuid: N/A 
Unmounted: ID-1: /dev/sda3 size: 529.0 MiB fs: ntfs label: Recovery uuid: 503896BD3896A190 
           ID-2: /dev/sda5 size: 16.0 MiB fs: <root required> label: N/A uuid: N/A 
USB:       Hub: 1-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 speed: 480 Mb/s 
           chip ID: 1d6b:0002 
           Hub: 1-1:2 info: Intel ports: 6 rev: 2.0 speed: 480 Mb/s chip ID: 8087:8008 
           Device-1: 1-1.5:3 info: Microdia type: Video driver: uvcvideo interfaces: 2 
           rev: 2.0 speed: 480 Mb/s chip ID: 0c45:649d 
           Hub: 2-0:1 info: Full speed (or root) Hub ports: 15 rev: 2.0 speed: 480 Mb/s 
           chip ID: 1d6b:0002 
           Hub: 3-0:1 info: Full speed (or root) Hub ports: 6 rev: 3.0 speed: 5 Gb/s 
           chip ID: 1d6b:0003 
           Hub: 4-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 speed: 480 Mb/s 
           chip ID: 1d6b:0002 
           Hub: 4-1:2 info: Intel ports: 8 rev: 2.0 speed: 480 Mb/s chip ID: 8087:8000 
           Device-2: 4-1.5:3 info: Intel type: Bluetooth driver: btusb interfaces: 2 rev: 2.0 
           speed: 12 Mb/s chip ID: 8087:07da 
Sensors:   System Temperatures: cpu: 58.0 C mobo: 59.0 C sodimm: 42.0 C 
           Fan Speeds (RPM): cpu: 3617 
Info:      Processes: 227 Uptime: 25m Init: systemd v: 245 Compilers: gcc: 10.1.0 
           clang: 10.0.0 Shell: bash v: 5.0.17 running in: konsole inxi: 3.0.37

Forum kindly sponsored by