Udisks prompts for password on resume.

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Couch_Potato
Level 2
Level 2
Posts: 86
Joined: Mon May 13, 2013 11:21 pm
Location: Pittsburgh, Pennsylvania U.S.A.

Udisks prompts for password on resume.

Post by Couch_Potato »

Howdy Plimgrims,
I have an annoying issue. I recently repaired resume on my system:

viewtopic.php?p=2026089#p2026089

But now upon waking from suspend, I am presented with a popup authentication asking for my password to update smart data. I can click cancel/enter my password and afaict none the wiser as to why I am seeing this.

udisks, polkit
udisks, polkit
ResumePopup_Scrnsht_2021-06-18 15-22-11.png (45.24 KiB) Viewed 1591 times

This disk is for data only. My system is installed on an nvme.

Code: Select all

 sudo smartctl -a /dev/sda
[sudo] password for user:           
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.10.0-1029-oem] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Blue
Device Model:     WDC WD10EZEX-00BN5A0
Serial Number:    WD-WCC3F3EDESYU
LU WWN Device Id: 5 0014ee 20be3e0a1
Firmware Version: 01.01A01
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Jun 18 15:29:18 2021 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82)	Offline data collection activity
					was completed without error.
					Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		(11040) seconds.
Offline data collection
capabilities: 			 (0x7b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 ( 114) minutes.
Conveyance self-test routine
recommended polling time: 	 (   5) minutes.
SCT capabilities: 	       (0x3035)	SCT Status supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   174   172   021    Pre-fail  Always       -       2258
  4 Start_Stop_Count        0x0032   097   097   000    Old_age   Always       -       3935
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   087   087   000    Old_age   Always       -       10185
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   097   097   000    Old_age   Always       -       3801
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       31
193 Load_Cycle_Count        0x0032   199   199   000    Old_age   Always       -       3903
194 Temperature_Celsius     0x0022   112   095   000    Old_age   Always       -       31
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%      7103         -
# 2  Short offline       Completed without error       00%       803         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
firmware update has no updates available.

Code: Select all

~ $ sudo fwupdmgr get-updates
Firmware metadata has not been updated for 30 days and may not be up to date.

Update now? (Requires internet connection) [y|N]: y
Fetching metadata https://cdn.fwupd.org/downloads/firmware.xml.gz
Downloading…             [***************************************]
Fetching signature https://cdn.fwupd.org/downloads/firmware.xml.gz.asc

Successfully downloaded new metadata: 0 local devices supported
• SHGP31-1000GM-2 has no available firmware updates
• System Firmware has no available firmware updates
• WDC WD10EZEX-00BN5A0 has no available firmware updates
No updatable devices
Where do I look to find out why this prompt is appearing?
Tia
Couch_Potato
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Desktop:
Linux Mint Mate Desktop Vera 21.1
Laptop Lenovo W540 Linux Mint Desktop Vera 21.1
Dell T7910 Proxmox 7.X
User avatar
AndyMH
Level 21
Level 21
Posts: 13757
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Udisks prompts for password on resume.

Post by AndyMH »

I can give you a fix, but it is papering over the root cause of the problem (other than it is related to what you did with the nvidia systemd service, don't know what it is).

I had a look in /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy and the defaults for

Code: Select all

<action id="org.freedesktop.udisks2.ata-smart-update">
are

Code: Select all

    <defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
try changing <allow_any>auth_admin</allow_any> to <allow_any>yes</allow_any>. auth_admin means it will ask for a password, yes means it won't.

Want to understand what you are doing:
https://wiki.archlinux.org/title/Polkit
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
User avatar
Couch_Potato
Level 2
Level 2
Posts: 86
Joined: Mon May 13, 2013 11:21 pm
Location: Pittsburgh, Pennsylvania U.S.A.

Re: Udisks prompts for password on resume.

Post by Couch_Potato »

Hi @AndyMH,

I'll give it a shot this weekend. See if that 'papers over' the issue.

Regards,
CP
Desktop:
Linux Mint Mate Desktop Vera 21.1
Laptop Lenovo W540 Linux Mint Desktop Vera 21.1
Dell T7910 Proxmox 7.X
User avatar
AndyMH
Level 21
Level 21
Posts: 13757
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Udisks prompts for password on resume.

Post by AndyMH »

You need to edit usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy as root. If it doesn't work first time, try setting <allow_inactive>auth_admin</allow_inactive> to yes as well.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
User avatar
Couch_Potato
Level 2
Level 2
Posts: 86
Joined: Mon May 13, 2013 11:21 pm
Location: Pittsburgh, Pennsylvania U.S.A.

Re: Udisks prompts for password on resume. Check that.

Post by Couch_Potato »

Well the 'fix' worked. This is not the ideal solution however. But now I am not pestered by UDisks.

Tx

I made those changes and it appeared to work. once or twice. Then back to resume udisks prompt. I am going to revert those changes and continue with my troubleshooting as time permits.
Desktop:
Linux Mint Mate Desktop Vera 21.1
Laptop Lenovo W540 Linux Mint Desktop Vera 21.1
Dell T7910 Proxmox 7.X
Locked

Return to “Storage”