My phone is a Samsung Galaxy S21 ultra 5G
My PC is a Dell Mobile Precision Workstation 7770 (mobile means it's a laptop) running openSUSE leap 15.5.
Previously if I plugged in a USB cable to connect them I would see a popup on the PC showing me connected USB devices and offering me the option to Mount and open SAMSUNG_ANDROID. If I clicked on that option it would try to open the phone's storage in a file manager window, but the phone popped up a dialog asking me if I would allow it, and by the time I did so the MTP would time out. However trying again would work because the permission on the phone lasts for a while.
Since I installed the latest OS upgrade from Samsung on my phone, it doesn't work any more. Connecting the phone shows me the option to Mount and open SAMSUNG_ANDROID as before, but if I click on it, there is no permission popup on the phone, and the PC opens a file manager window on my home directory instead. Navigating to /run/media/myuserid
shows an empty directory (unless I have other USB media mounted).
I have checked in Settings->Developer options->Default USB configuration (I know from experience that SAMSUNG upgrades tend to mess with permissions) and it is set to Transferring file / Android Auto. USB debugging is also enabled: I tried disabling it, which didn't help.
I tried from an older laptop using a different USB cable. I get a different error message (Could not access device. Make sure it is unlocked, and tap "Allow" on the popup on its screen. If that does not work, make sure MTP is enabled in its USB connection settings.), but there is still no popup on the phone's screen and I can't connect to it.
Android Studio's Device File Explorer on the older laptop seems still to work, perhaps because it uses the USB debugging protocol instead of MTP, but both the older laptop and Android Studio take a long time to start up, and I don't have Android Studio installed on the newer laptop yet.
How do I get MTP to work again?