Subject: Re: bug#35584: CDs and DVDs aren't auto-mounted
From: Maxim Cournoyer <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Wed, 14 May 2025 22:31:30 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Maxim Cournoyer <[email-masked]> writes:

> While this is currently working, a discussion with systemd [0] revealed
> that this the existing rule should work as-is, regardless of whether the
> cdrom block driver is builtin the kernel or as a module.  This means the
> fix is really a workaround rather than something fixing the root issue;
> I'm thus reopening the issue and will try to find a better solution for
> it.
>
> One extra check I've now made is locally revert the earlier fix (commit
> 670724), then build the cdrom block driver as a module like it is on
> Void Linux (which to recall uses the same eudev version without this
> problem) and tested: the problem persists.
>
> In the systemd discussion, they pointed that potentially the problem has
> to do with the 'udevadm trigger' that is run; perhaps it is done too
> early still, despite waiting on the udevd unix socket (wait-for-udevd)
> in the udev-shepherd-service.  I'll investigate in this direction.
>
> [0]  https://github.com/systemd/systemd/pull/37336

In the end, the issue was that our udev-service-type was not running
"udevadm" "trigger" "--action=add" "--type=subsystems", which is needed
to create the subsystem nodes.  Because they were missing, the udev
block rules was not running and there was no default polling value set
on block devices such as cdrom.

See commit 4acbceed261.

Closing for good!

-- 
Thanks,
Maxim