#[SOLVED] Sata hotplug detection
92 messages · Page 1 of 1 (latest)
is it enabled in bios
also run lspci -k | grep -A 3 SATA
should say ahci
can try
sudo nano /etc/udev/rules.d/90-sata-hotplug.rules
paste: ACTION=="change", SUBSYSTEM=="scsi_host", RUN+="/bin/bash -c 'echo - - - > /sys/class/scsi_host/%k/scan'"
then reload rules
sudo udevadm control --reload-rules
tysm
displaynamecodes received a thank you cookie!
#17640 📣 If there is nothing else that we can do for you, please close this thread by adding "[SOLVED]" to the title.
- You can do this on desktop by clicking the three dots on the top right of the page, and pressing "Edit Post".
- You can also do this on Android / iOS by long tapping your post in the text channel list, and tapping "Edit Post".
Your title should be like so: https://media.discordapp.net/attachments/1377138685538992252/1394893287667667035/image.png?ex=6878771b&is=6877259b&hm=e490049052812fd977384de338fa0f0c0634c50ed75a6f5a00bc7c7a847ff278&=&format=webp&quality=lossless&width=628&height=122
Thank you
[SOLVED] Sata hotplug detection
@small storm can i do something like with pendrives? so i can just press a button and it will remove it
and i can the unplug the cable
cables
you mean eject it?
please explain more :)
you want a GUI button right? not a terminal snippet/command
both would be great
zsh
to eject a sata disk
for example
/dev/sda
a command for sata devices
to eject them
ALL of them/
so i can safely remove the cables
?
ok
a command which ejects a sata disk (for example: /dev/sda)
first unmount partition then power off
udisksctl unmount -b /dev/sda1 && udisksctl power-off -b /dev/sda
okay, so ill just alias the power-off command, and what about a GUI option?
add to ~/.zshrc (better than alias):
eject_sata() { udisksctl unmount -b ${1}1 && udisksctl power-off -b ${1}; }
then eject_sata /sda/whatever to run it
oh yeah that would be even better
.
:)
alr
^ this
not hyprland, how do i check
ok
OHHH U WERE ASKING ABOUT THE DESKTOP ENVIORMENT
yeah
OKAY IM A DUMBASS SORRY
np np
ok
where do you want the button/thing to eject drives to be?
you can run kde-partitionmanager
maybe on the taskbar?
me too
but tysm for helping
displaynamecodes received a thank you cookie!
np
okay but when i umount manually, wont it error?
?
like when i decide to umount (for example) /dev/sda3 manually, and then run the command that you provided
wont it throw an error saying that nothing is mounted
oke
i went the lazy way and asked chatgpt to write something
it used python