mtp unable to open raw device (Sony Walkman sometimes works sometimes not)


I have a nice little MP3 player called Sony NWZ-B173F. It charges and connects to the computer via USB. On Windows, it works consistently but on Linux it has complications. Sometimes it opens as an MP3 player, sometimes as a USB device. When it opens as a USB device, GMTP can access it, when it doesn't, GMTP says "unable to open raw device." when connecting. The device also has a "hold" switch which prevents any buttons from being pressed and locks the device. I switch it off, but it doesn't work anyway.

Regarding mtp, I found some threads about Android devices, but not about Walkman. I detached it using "Safely Remove" on Dolphin but now it doesn't work when I connect it.
At the moment, Dolphin can open the files, remove and add them, but GMTP can do nothing. Sometimes even Dolphin can't do anything. I turn the device on and off to no avail. All I do is remove and plug it in again and hope it works.
What can I do to make it work consistently? Does anyone else have this device?

edit: I also want this device to work with GMTP since it seems to write tags properly. Yesterday I copied files using Dolphin and the songs were all untagged, which is awful.

edit 2: I just restarted my computer to use GMTP and it works. Out of curiosity, I ran mtp-detect, and it still says unable to open raw device 0... even though it works in GMTP! I don't get it.

Here is libmtp output;

libmtp version: 1.1.17

Listing raw device(s)
Device 0 (VID=054c and PID=0689) is a Sony NWZ-B173F.
   Found 1 device(s):
   Sony: NWZ-B173F (054c:0689) @ bus 1, dev 20
Attempting to connect device(s)
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
Unable to open raw device 0

inxi output;

System:    Host: jupiter Kernel: 5.4.38-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.3.0 
           Desktop: KDE Plasma 5.18.5 Distro: Manjaro Linux 
Machine:   Type: Laptop System: HP product: HP Notebook v: Type1ProductConfigId 
           serial: <root required> 
           Mobo: HP model: 81FA v: 67.34 serial: <root required> UEFI: Insyde v: F.17 
           date: 09/01/2016 
Battery:   Device-1: hidpp_battery_2 model: Logitech Wireless Mouse M185 
           charge: 55% (should be ignored) status: Discharging 
CPU:       Topology: Quad Core model: AMD A10-9600P RADEON R5 10 COMPUTE CORES 4C+6G 
           bits: 64 type: MCP arch: Excavator rev: 1 L2 cache: 1024 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
           bogomips: 19175 
           Speed: 1209 MHz min/max: 1200/2400 MHz Core speeds (MHz): 1: 1477 2: 1483 
           3: 1517 4: 1640 
Graphics:  Device-1: AMD Wani [Radeon R5/R6/R7 Graphics] vendor: Hewlett-Packard 
           driver: amdgpu v: kernel bus ID: 00:01.0 
           Display: x11 server: X.Org 1.20.8 driver: amdgpu FAILED: ati 
           unloaded: modesetting resolution: 1366x768~60Hz 
           OpenGL: renderer: AMD CARRIZO (DRM 3.35.0 5.4.38-1-MANJARO LLVM 10.0.0) 
           v: 4.6 Mesa 20.0.6 direct render: Yes 
Audio:     Device-1: AMD Kabini HDMI/DP Audio vendor: Hewlett-Packard 
           driver: snd_hda_intel v: kernel bus ID: 00:01.1 
           Device-2: AMD Family 15h Audio vendor: Hewlett-Packard driver: snd_hda_intel 
           v: kernel bus ID: 00:09.2 
           Sound Server: ALSA v: k5.4.38-1-MANJARO 
Network:   Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: Hewlett-Packard 
           driver: r8169 v: kernel port: 4000 bus ID: 01:00.0 
           IF: enp1s0 state: down mac: c8:d3:ff:93:cd:16 
           Device-2: Realtek RTL8723BE PCIe Wireless Network Adapter 
           vendor: Hewlett-Packard driver: rtl8723be v: kernel port: 3000 bus ID: 02:00.0 
           IF: wlo1 state: up mac: 94:e9:79:c4:c0:55 
Drives:    Local Storage: total: 1.13 TiB used: 651.88 GiB (56.4%) 
           ID-1: /dev/sda vendor: Toshiba model: Q300 size: 223.57 GiB 
           ID-2: /dev/sdb vendor: Western Digital model: WD10JPVX-60JC3T0 size: 931.51 GiB 
Partition: ID-1: / size: 203.56 GiB used: 49.01 GiB (24.1%) fs: ext4 dev: /dev/sdb5 
           ID-2: /home size: 426.66 GiB used: 284.92 GiB (66.8%) fs: ext4 dev: /dev/sdb7 
           ID-3: swap-1 size: 7.50 GiB used: 4.6 MiB (0.1%) fs: swap dev: /dev/sdb6 
Sensors:   System Temperatures: cpu: 49.5 C mobo: N/A 
           Fan Speeds (RPM): N/A 
           GPU: device: amdgpu temp: 20 C device: amdgpu temp: 46 C 
Info:      Processes: 319 Uptime: 1d 2h 11m Memory: 7.32 GiB used: 3.23 GiB (44.1%) 
           Init: systemd Compilers: gcc: 9.3.0 clang: 10.0.0 Shell: bash v: 5.0.16 
           inxi: 3.0.37 

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by