OS4.1 FE (SAM440) USB stick icon appears twice

This forum is for all AmigaOne 500, Sam440 and Sam460 specific issues.
zabox
Posts: 7
Joined: Sun Jul 26, 2015 7:07 am

OS4.1 FE (SAM440) USB stick icon appears twice

Post by zabox »

Hi,

I experience a strange behavior with my USB stick connected to a monitor switch (KVM). Initially it is detected. And normally it is re-detected after switching to PC and then switching back to Amiga. But, when I have some window of that stick open or the stick ist the current dir in the shell, and then switch to PC and back to Amiga, the stick icon appears twice on the Workbench. And when then clicking an icon in the stick window the system says "please insert volume CORSAIR:", where CORSAIR is the partition name of the stick. This did not happen under OS 4.1 previous version. There it worked as it should. Under OS 4.1 FE I need to close the open stick window and switch to PC and back to Amiga, then reopen the window to make the icons in it work again.

greets,
zabox
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: OS4.1 FE (SAM440) USB stick icon appears twice

Post by xenic »

@zabox
That problem occurs without a KVM. If you remove a USB drive with it's window open or when one of the drive's directories are the current one in a shell and then close the window or change a shell current directory to another drive or partition, the flash drive icon is stuck on your Workbench until you reboot. You can reproduce it like this:

1.Plug in a USB stick and open it's window.
2.Remove the USB stick and then close it's window.
3. Congratulations; you now have an icon stuck on your Workbench until you reboot.
AmigaOne X1000 with 2GB memory - OS4.1 FE
zabox
Posts: 7
Joined: Sun Jul 26, 2015 7:07 am

Re: OS4.1 FE (SAM440) USB stick icon appears twice

Post by zabox »

Good to know that the problem is not my KVM.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: OS4.1 FE (SAM440) USB stick icon appears twice

Post by broadblues »

@xenic

The icon is only stuck on the workbench if a lock remains on it.

I just went through your sequence of events and the USB stick icon disppeared shorty after I closed the workbench window. I don't think that's a result of any beta fix.

However some programs ocasionally do not clean up their locks, and this can result in the icon stuck till reboot, the bug is in the prgram that does this, tracking each one down is tricky though!


However this does not appear to be the issue zabox is describing.

He's getting two icons, not one stuck one.

The usbmasstorage device / mounter combination detects the ID of the stick inserted so that on a reinsert it gets the same USB device name. Sounds like the KVM may be confusing this, making it seem like a different stick has been inserted.

@zabox what does the USB Masstorage GUI (press CTRL-ALT-M) show when you go throug various stages of switching to PC and back?
zabox
Posts: 7
Joined: Sun Jul 26, 2015 7:07 am

Re: OS4.1 FE (SAM440) USB stick icon appears twice

Post by zabox »

@broadblues

At any stage the USB Masstorage GUI shows only one device.

I tried different things such as dismounting the usb device while the shell with its dir is open. Then after another switching of the kvm the amiga side system froze when clicking on the usb-info-popup that did not disappear by itself. This was reproduceable, however in another try the system crashed with a grim reaper when trying to close the shell by clicking on its windowclose gadget.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: OS4.1 FE (SAM440) USB stick icon appears twice

Post by broadblues »

Does it show the same device? That is is the DOS name (USB0: or similar) the same before and after switching back and forth to the PC?
I tried different things such as dismounting the usb device while the shell with its dir is open.
That's only going cause Bad Things TM to happen.
Then after another switching of the kvm the amiga side system froze when clicking on the usb-info-popup that did not disappear by itself. This was reproduceable, however in another try the system crashed with a grim reaper when trying to close the shell by clicking on its windowclose gadget.
Like I said Bad Things
zabox
Posts: 7
Joined: Sun Jul 26, 2015 7:07 am

Re: OS4.1 FE (SAM440) USB stick icon appears twice

Post by zabox »

It is showing always the same device (usb0). And the device does not disappear from the gui window when unplugging it.

ps: unplugging the device while the gui is open led to system freeze shortly after clicking on "details".
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: OS4.1 FE (SAM440) USB stick icon appears twice

Post by broadblues »

It is showing always the same device (usb0). And the device does not disappear from the gui window when unplugging it.
Yep that#'s the idea, the stick gets associated with that device USB0: for the rest of the session. If you inserted second stick it would get a new device name, put the old one back in and it gets reassigned to the a same device.

Seem to be workng right from that point of view.
ps: unplugging the device while the gui is open led to system freeze shortly after clicking on "details".
Hmm, can't reprocuce that here, on my x1k but did get a partial system lock up when trying do an info on a left behind icon and reinserting the disk.
User avatar
ZeroG
Posts: 124
Joined: Sat Jun 18, 2011 11:31 am
Location: Germany

Re: OS4.1 FE (SAM440) USB stick icon appears twice

Post by ZeroG »

broadblues wrote:
It is showing always the same device (usb0). And the device does not disappear from the gui window when unplugging it.
Yep that#'s the idea, the stick gets associated with that device USB0: for the rest of the session. If you inserted second stick it would get a new device name, put the old one back in and it gets reassigned to the a same device.

Seem to be workng right from that point of view.
I think it should work like floppy disks and df0: the USB port gets USB0: for the rest of the session and not the USB stick.
zabox
Posts: 7
Joined: Sun Jul 26, 2015 7:07 am

Re: OS4.1 FE (SAM440) USB stick icon appears twice

Post by zabox »

I just tried it and the behavior is like broadblues wrote. the entry is based on the device, not the port.
Post Reply