error message asks for mounting partition

Anytime I log in I get a small window with an error message asking for root password to mount one of my hard disk partition.

Pressing ESC key close the window but it become boring.

Any hint to avoid this window permanently ?

Yes, you can control desktop mounting behaviour as you prefer…
https://docs.kde.org/trunk5/en/plasma-desktop/kcontrol/solid-device-automounter/index.html

It’s also possible to influence this behaviour if you are not using KDE Plasma. Just add the “noauto” flag to the relevant entry in your /etc/fstab.

There is also extensive documentation for a proper fstab configuration available…

This is my fstab:

 UUID=693a7def-2ad8-43fa-a295-fbf7e98a8842   /           ext4   defaults   0 1 
UUID=9c71ccb0-eae6-4968-99a8-7728ecf4e589   /home       xfs    defaults   0 0 
UUID=1433-F888                              /boot/efi   vfat   utf8       0 2 
LABEL=DATI                                  /mnt        ntfs   defaults   0 0 

It seems I have no entry for sda12 that appears in error message.

The window typically is displayed by polkit-agent-helper:

karl@leap154:~> ps ax|grep polkit 
  797 ?        Ssl    0:00 /usr/lib/**polkit**-1/**polkit**d --no-debug 
 5474 pts/1    S+     0:00 grep --color=auto **polkit**
11519 ?        Sl     0:00 /usr/lib64/libexec/**polkit**-kde-authentication-agent-1 
**13354 ?        S      0:00 /usr/lib/**polkit**-1/**polkit**-agent-helper-1 root 
**karl@leap154:~> 

Startup is caused by an entry of polkit-agent-helper. It is not related to /etc/fstab:

karl@leap154:~> grep -irw sdb1 .config/  
.config/kded_device_automounterrc:[Devices][/org/freedesktop/UDisks2/block_devices/[b]sdb1] 
karl@leap154:~> 

Documentation seems regarding removable devices but partition sda12 is part of my hard disk.
I found a sentence that could be useful:

Only automatically mount removable media that has been  manually mounted before When this is checked, Plasma™ will only automatically mount devices it remembers. A device is “remembered” if it has ever been mounted before; e.g.  plugging in a USB media player to charge is not sufficient to “remember” it. If the files are not accessed, Plasma™ will not automatically mount the player next time it is seen. **Once they have  been accessed, however, Plasma™ will remember to automatically make the contents accessible to your system**. 


but I don’t see how I can change this setting (not sure if it’s the right setting to change).

Not clear to me where to look for, what to search for, how to change behaviour.

The documentation says “automatically mount removable media”. However automounter will mount all devices listed in .config/kded_device_automounterrc. You may either delete this file or use “Forget Device”.

In my config/kded_device_automounterrc I find all my 12 partition (except sda2) but only three of them are mounted at boot.Then deleting the file seems not a good idea to me.

… or use “Forget Device”.

How can I use “Forget Device” ?

I don’t bother. I deleted the file. It is created again upon opening the Device Manager:

karl@leap154:~> cat .config/kded_device_automounterrc 
[Devices][/org/freedesktop/UDisks2/block_devices/sda1] 
EverMounted=true 
Icon=drive-harddisk 
LastNameSeen=EFI System Partition 
LastSeenMounted=true 

[Devices][/org/freedesktop/UDisks2/block_devices/sda11] 
Icon=drive-harddisk 
LastNameSeen=56,3 GiB Internes Laufwerk (sda11) 

[Devices][/org/freedesktop/UDisks2/block_devices/sda12] 
Icon=drive-harddisk 
LastNameSeen=Basic data partition 

[Devices][/org/freedesktop/UDisks2/block_devices/sda13] 
Icon=drive-harddisk 
LastNameSeen=524,0 MiB Internes Laufwerk (sda13) 

[Devices][/org/freedesktop/UDisks2/block_devices/sda2] 
Icon=drive-harddisk 
LastNameSeen=ArchLinux 

[Devices][/org/freedesktop/UDisks2/block_devices/sda3] 
Icon=drive-harddisk 
LastNameSeen=SLED 

[Devices][/org/freedesktop/UDisks2/block_devices/sda4] 
Icon=drive-harddisk 
LastNameSeen=spare 

[Devices][/org/freedesktop/UDisks2/block_devices/sda5] 
Icon=drive-harddisk 
LastNameSeen=backup 

[Devices][/org/freedesktop/UDisks2/block_devices/sda7] 
EverMounted=true 
Icon=drive-harddisk-root 
LastNameSeen=leap154 
LastSeenMounted=true 

[Devices][/org/freedesktop/UDisks2/block_devices/sda8] 
Icon=drive-harddisk 
LastNameSeen=tumbleweed 

[Devices][/org/freedesktop/UDisks2/block_devices/sda9] 
Icon=drive-harddisk 
LastNameSeen=manjaro 

[Devices][/org/freedesktop/UDisks2/block_devices/sdb1] 
Icon=drive-harddisk 
LastNameSeen=HDD 

[Devices][/org/freedesktop/UDisks2/block_devices/sdc1] 
EverMounted=true 
Icon=drive-removable-media-usb 
LastNameSeen=3,8 GiB Wechselmedium 
LastSeenMounted=true 
karl@leap154:~> 

How can I use “Forget Device” ?

In the Device Manager try and select the device and click “Forget Device”. However the button is grayed out. It’s broken in Leap 15.4, but it works in Tumbleweed. Use your text editor and remove the pertaining section manually.

I don’t say you bother, you’re helping me. I simply express my opinion.

It is created again upon opening the Device Manager:

I don’t know it’s created again. Deleted file in my system and now error message disappeared.

In the Device Manager try and select the device and click “Forget Device”. However the button is grayed out. It’s broken in Leap 15.4, but it works in Tumbleweed. Use your text editor and remove the pertaining section manually.

I don’t find Device Manager in my Leap but it isn’t important because error is gone.

Thanks.

I meant I don’t bother about the ramifications of deleting the file.

I don’t know it’s created again. Deleted file in my system and now error message disappeared. I don’t find Device Manager in my Leap but it isn’t important because error is gone. Thanks.

Thanks for the feedback. I am sorry, I meant KDE > Panel > System Tray > Disks & Devices.

Yes, but the KDE Disks and Devices can be configured for various storage devices, not just so-called removable devices.

I found a sentence that could be useful:

Only automatically mount removable media that has been  manually mounted before When this is checked, Plasma™ will only automatically mount devices it remembers. A device is “remembered” if it has ever been mounted before; e.g.  plugging in a USB media player to charge is not sufficient to “remember” it. If the files are not accessed, Plasma™ will not automatically mount the player next time it is seen. **Once they have  been accessed, however, Plasma™ will remember to automatically make the contents accessible to your system**. 

but I don’t see how I can change this setting (not sure if it’s the right setting to change).

Refer KDE System tray > Disks and Devices. Configure as required.

Ok thanks.