AFC session terminates after ~2-3 minutes idle on Linux Mint / Ubuntu

Author: oxidworksCreated Apr 26, 2026Updated Sep 30, 2026

Linux Mint 22 (Ubuntu 24.04, kernel 6.17), libimobiledevice 1.3.0-8.1build3, usbmuxd master 3ded00c, iPhone 8 Plus.

After a fresh sudo systemctl restart usbmuxd and a normal AFC mount via ifuse, the session is stable for ~2:27 min (147 s in three consecutive measurements), then closes without anyone touching anything. The iPhone stays visible to the kernel and to gphoto2; only idevice_id -l and the AFC mount are gone. After that, only another usbmuxd restart brings AFC back.

This is consistent enough across runs that it looks like an iOS-side lockdown session timeout rather than random instability.

This stacks on top of usbmuxd issue libimobiledevice/usbmuxd#26 - that one prevents AFC from coming back on replug, this one cuts the AFC session even when nothing is replugged. Together that's why long-running AFC use ("import a few thousand photos") is effectively unusable on Linux without manual restarts every couple of minutes.

Question to maintainers: is this a known iOS-side timeout that libimobiledevice clients should keep alive with periodic heartbeats? If yes, that would be the fix to make. If no, raw logs (idevicesyslog, journalctl -fu usbmuxd, dmesg) available on request.

Source: libimobiledevice/libimobiledevice