Clearly, `nmcli device "$DEVICE" managed no` should mark the device as unmanaged, prevent NM from touching it further and let the user do something with it. That works.
However, it's not well defined in which state the device is left to the user:
- if the device is currently in disconnected state, maybe NM should restore the previous state.
Should it set the device as `ip link set down` (!IFF_UP)? Possibly it should especially if the device was down before NM touched it.
Should it reset accept_ra 1 and ipv6 addr-gen-mode eui64? Possibly it should, but that might be undesirable if the device is not also down (!IFF_UP) because suddenly the device is reachable.
- if the device is currently active with a profile, should NM leave the device in a disconnected state, or should it leave all IP configuration as is? (possibly just stopping the DHCP client). Note, that when the DHCP client stops, the addresses will eventually time out. That seems right, the user is supposed to take over quickly. Note, that usually we re-request a least early enough, so that at any time it would be expected that the address lifetimes are still valid for quite a bit (until the DHCP server just died).
- if the device is externally managed, then NM is currently not touching the device. Likewise, NM should not touching it when giving it up.
The question for the desired behavior here is up to definition. In general, we should leave the device in a state that is most suitable for the user to take over.
In particular I find it problematic that we configure IPv6 addr-gen-mode none on devices while being disconnected. In that case, the device has no IPv6 link-local address (as it is logically disconnected). But when giving this up, we must reset the interface to a workable state. Most users won't be aware that when they take over the device, they need to properly configure it (including setting addr-gen-mode).
Thank you for reporting this. Unfortunately, we don't have the capacity to fix this in the foreseeable future and therefore I will close this. In case this issue is more important than we estimated, please re-open this or file a new bug.