USB Device Remap from Nowhere

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
sfein1000
Posts: 96
Joined: Fri Mar 25, 2022 1:38 am
Been thanked: 4 times

USB Device Remap from Nowhere

Post by sfein1000 »

Not sure if this belongs in beginners, but good as place as any to start :)
I am running fossa64 from ISO. No save file or folder. The ISO boots from an external USB - using Ventoy. That USB gets setup as device sda. I installed bspwm (and associated sxhkd and tint2) as my window manager (as I do everyday). I mounted sda4 which is a ntfs partition and contains my firefox appimage.

Today, I was running Firefox ESR from an appimage as spot (I do this every day and have never seen this happen). While running, the app froze. I could do nothing on the desktop. I switched to another desktop and opened a terminal and killed firefox. It was at that point that I noticed that all my sda mount locations on the desktop switched to sdb and none were mounted (which is probably why firefox froze since sda4 no longer existed).

Has anyone seen something like this happen. I'm not rebooting at this point in case someone wants me to look at a file somewhere. Everything seems to working ok. Just weird that the device and mount points changed on the fly.

User avatar
bigpup
Moderator
Posts: 6836
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 874 times
Been thanked: 1472 times

Re: USB Device Remap from Nowhere

Post by bigpup »

I would just do a complete power off shutdown, wait 1 minute, do a power on boot up of the computer, and see if it is back to showing sda.

If it still has a problem.
Start trying to figure out what is wrong.

Not having a save to store common core setup information, that is always there to be used by the system operations.
Is not helping.
All you have to get is a hick up error in memory and now the system has to guess what to correct with.
sda is already being used, so it corrects to sdb.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

sfein1000
Posts: 96
Joined: Fri Mar 25, 2022 1:38 am
Been thanked: 4 times

Re: USB Device Remap from Nowhere

Post by sfein1000 »

Makes sense. Probably buggy javascript runtime in firefox corrupted memory.

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: USB Device Remap from Nowhere

Post by Phoenix »

sfein1000 wrote: Thu Jul 07, 2022 3:15 pm

Not sure if this belongs in beginners, but good as place as any to start :)
I am running fossa64 from ISO. No save file or folder. The ISO boots from an external USB - using Ventoy. That USB gets setup as device sda. I installed bspwm (and associated sxhkd and tint2) as my window manager (as I do everyday). I mounted sda4 which is a ntfs partition and contains my firefox appimage.

Today, I was running Firefox ESR from an appimage as spot (I do this every day and have never seen this happen). While running, the app froze. I could do nothing on the desktop. I switched to another desktop and opened a terminal and killed firefox. It was at that point that I noticed that all my sda mount locations on the desktop switched to sdb and none were mounted (which is probably why firefox froze since sda4 no longer existed).

Has anyone seen something like this happen. I'm not rebooting at this point in case someone wants me to look at a file somewhere. Everything seems to working ok. Just weird that the device and mount points changed on the fly.

Entirely plausible the USB port/device timed out and Linux tried power cycling and eventually gave up. This would eventually case it to see it as a new device.
Inspect dmesg
(I know this given that my own USB has done this before and results in it breaking my entire system)

IRC: firepup | Time to hack Puppy!

User avatar
mikeslr
Posts: 2915
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 175 times
Been thanked: 893 times

Re: USB Device Remap from Nowhere

Post by mikeslr »

I don't know how much RAM you have. But if have enough and you want to run without a SaveFile/Folder consider working with amethyst's nicOS-Utility-Suite, viewtopic.php?p=12983#p12983's Save2SFS module. It will 'capture' settings, customizations and applications which otherwise would be stored in a SaveFile/Folder in either an adrv or a ydrv.
Tip when running Fossapup64. an adrv has higher priority than a ydrv. So rename Fossapup64's adrv to ydrv in order for your 'captured' setting to have higher priority than the 'OOTB' now-renamed-ydrv's default.
If you have sufficient RAM, you can locate web-browsers in either a ydrv or an adrv. Not sure about AppImages. But you can use portables and, IIRC, an extracted AppImage is essentially one. May require editing AppRun to limit the library path to the folder. See how portable firefox is set up. Or simpler, just use firefox-esr-portable running from /opt and 'captured' in the adrv.

As you'll be running entirely in RAM, your Puppy will never have to find your hard-drive partitions unless and until you mount one to save data to it.

User avatar
mikewalsh
Moderator
Posts: 6034
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 738 times
Been thanked: 1899 times

Re: USB Device Remap from Nowhere

Post by mikewalsh »

bigpup wrote: Thu Jul 07, 2022 4:02 pm

I would just do a complete power off shutdown, wait 1 minute, do a power on boot up of the computer, and see if it is back to showing sda.

I would just add to this that after you've done the full power-off shutdown, disconnect the power lead & hold the power button down for 30 seconds. Then re-connect and proceed as normal.

Even after several years with Puppy I still get occasional freeze-ups and all sorts of odd behaviour at times, largely due to the sheer amount of experimenting I do! By following the above procedure, it ensures that the power caps are completely drained, so no chance of any extraneous crap still being held in RAM.

Phoenix's explanation sounds pretty plausible. Modern computer systems are an absolute mass of intensively interconnected files, and it only takes one critical component being 'out', or misbehaving itself, and the whole ball of string very quickly unravels.....

Mike. ;)

sfein1000
Posts: 96
Joined: Fri Mar 25, 2022 1:38 am
Been thanked: 4 times

Re: USB Device Remap from Nowhere

Post by sfein1000 »

Thanks all. I am leaning towards Phoenix's explanation. It happened again (I power off daily, so a refreshed system) and this time Firefox was not involved.

I had been copying files between drives. This would take about 20 minutes. I left the computer for about 2 hours. Came back. Files copied fine, but the first usb was unmounted and not drives showed on the desktop. Aftera second, the usb drive light came on and the drive appeared on the desktop.

Must have been sleeping. This is an ssd, so sleeping probably wouldn't save the drive. Now looking into how to disable that.

williams2
Posts: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 times

Re: USB Device Remap from Nowhere

Post by williams2 »

Has anyone seen something like this happen

Yes. This laptop has 3 usb ports.
I think that one of the ports has a loose connection to the motherboard.
What seems to happen is it disconnects, then reconnects.
If it reconnects before the driver notices that it is no longer connected,
it sees the usb device as a new device, and assigns it a new device name, usually /dev/sdc

That port is too unreliable to copy files, for example.
I use that port mostly for booting Puppy from a usb flash drive.
Sometimes it is seen as a usb1 drive, usually as a usb2 drive.

I have a Seagate 4TB usb drive, which I plug in to one of the good ports.
Usually the driver sees it as a usb1 drive.
So I plug it in, wait for it to spin up, then unplug it and plug it in again.
Which usually allows it to be seen as a usb2 drive (I don't have a usb3 port)

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: USB Device Remap from Nowhere

Post by Phoenix »

sfein1000 wrote: Sat Jul 09, 2022 1:02 pm

Thanks all. I am leaning towards Phoenix's explanation. It happened again (I power off daily, so a refreshed system) and this time Firefox was not involved.

I had been copying files between drives. This would take about 20 minutes. I left the computer for about 2 hours. Came back. Files copied fine, but the first usb was unmounted and not drives showed on the desktop. Aftera second, the usb drive light came on and the drive appeared on the desktop.

Must have been sleeping. This is an ssd, so sleeping probably wouldn't save the drive. Now looking into how to disable that.

Linux does have auto suspending but you find it too problematic, disable it by editing the boot configuration (grub.cfg) and adding usbcore.autosuspend=-1 which will disable autosuspending for all USB devices, which mean more power would be used. You may find that you only need to disable autosuspending for specific USB devices.

And my explanation is sort of off-target seeing from what was posted. It's more likely it is incorrectly being suspended.

IRC: firepup | Time to hack Puppy!

sfein1000
Posts: 96
Joined: Fri Mar 25, 2022 1:38 am
Been thanked: 4 times

Re: USB Device Remap from Nowhere

Post by sfein1000 »

Thanks Phoenix. I'll look at the setting. Of course I left the computer on with no activity for hours and it didn't suspend that same drive on the same port.

The fun of intermittent problems 🤔

Post Reply

Return to “Beginners Help”