The small linux problem thread

Yeah, that would work. Though, part of me wonder what would happen if we just do this.

No idea if it is possible, could be, might not be.

find . -type f -iname '*.mp4' | fzf -m | rclone

not familliar with rclone so i have no idea if it reads the file list from stdin, but if it doesn’t, you can use xargs, xargs will take the stdout of the preceeding command and shove it on the commandline:

find . -type f -iname '*.mp4' | fzf -m |xargs rclone {...}

not sure though, more research required

I got this working using

 find /media/sda1/backup/ -iname "*roughly search here*" -print | fzf -m

I copy pasted the output but I’ll pipe it into my from-files.txt in future

rclone copy --files-from-raw /media/sda1/backup/files-from.txt / "destination:restore/" --progress --copy-links

–files-from-raw was important to get it to work for whatever reason.

that would be nice. But I do like the idea of preparing my list in a text file and then running rclone on it just so that if it fails I don’t need to reselect my list and to just generally to a sanity check that I’m not copying everything.

I can’t use my usual ls “-lath --fu” which I use to figure out how big the files are and their date etc means the output isn’t formatted correctly as find is with just the pure absolute path.

What I have now is functional but I would like to be fzf’ing through a nicely formatted list of files with sizes and dates rather than on the absolute paths.

I’m not sure what way to tackle this issue but for the moment I’m in a better place anyway.

to explain that better. find is returning a nice list of absolute paths which i’m then making in fzf. But I’d like to mark files from a dated with human readable size list but have the absolute paths returned. This is something I hope there is an existing solution for

that is going to be very useful for me but maybe not in this instance. Thank you though

1 Like

slayed it bro! :clap:

1 Like

find supports an -exec parameter that will run the specified command for every file it finds. you can get what you’re after by trying something like:

find . -name *.mp4 -exec ls -lsh {} \;

beware of the rather esoteric syntax. you must escape the semicolon, and leave a space between the {} special token, which is a placeholder for the current file that find has found.

thanks that will get my nice ls output from find. I will need to eventually return just the absolute path so it can be passed to rclone. The first thing that is coming to my mind would be to add the absolute path to that exec ls command with -d and then use AWK on the result of my fzf -m to get back to just having the absolute path before writing it to my text file.

I think that’s what I’ll do next time I’m stuck looking at two same-named files in different directories wondering which is the one I need.

My backup folders are generally broken up by date (but sometimes stuff goes in the wrong folder) so for now the absolute paths are actually 90% ok for me to figure out which file I need so I don’t want to spend too much time handling edge cases when it already is functional

I think I’m at the sweet spot for now until those edge cases start taking up more time. Thanks for your help and everyone who replied

1 Like

this is the way. steer clear of cut -d' ' cos it’ll munt up files with spaces in them. awk is the way to go.

more than welcome mate, was a pleasure :+1:

I’m having issues trying to watch video files over the network from a SMB share, I can do it no problem from my windows laptop, but I need to drag the file into my desktop(running manjaro) to play it.

the applications(MPV and VLC) just immediately close after opening the file, not sure if it matters, but I’ve tested it with .MKV and .mp4 files same results.

Strangely enough, VLC doesn’t work at all now either. Closes immediately after opening a file.

Have you tried starting vlc from a command prompt to see what messages it outputs before it closes?

2 Likes
-- logger module started --
main warning: cannot load module `/usr/lib/vlc/plugins/visualization/libgoom_plugin.so' (libgoom2.so.0: cannot open shared object file: No such file or directory)
main warning: cannot load module `/usr/lib/vlc/plugins/visualization/libprojectm_plugin.so' (libprojectM.so.3: cannot open shared object file: No such file or directory)
main warning: cannot load module `/usr/lib/vlc/plugins/control/liblirc_plugin.so' (liblirc_client.so.0: cannot open shared object file: No such file or directory)
main warning: cannot load module `/usr/lib/vlc/plugins/demux/libts_plugin.so' (libaribb24.so.0: cannot open shared object file: No such file or directory)
main warning: cannot load module `/usr/lib/vlc/plugins/codec/libkate_plugin.so' (libtiger.so.5: cannot open shared object file: No such file or directory)
main warning: cannot load module `/usr/lib/vlc/plugins/codec/libaribsub_plugin.so' (libaribb24.so.0: cannot open shared object file: No such file or directory)
main warning: cannot load module `/usr/lib/vlc/plugins/access/liblive555_plugin.so' (libliveMedia.so.107: cannot open shared object file: No such file or directory)
main warning: cannot load module `/usr/lib/vlc/plugins/access/libnfs_plugin.so' (libnfs.so.14: cannot open shared object file: No such file or directory)
main warning: cannot load module `/usr/lib/vlc/plugins/stream_filter/libaribcam_plugin.so' (libaribb25.so.0: cannot open shared object file: No such file or directory)
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
faad warning: decoded zero sample
gl: Initialized libplacebo v5.229.0 (API v229)
glconv_vaapi_x11 error: vaInitialize: unknown libva error

this is what I ended up getting from the VLC’s logger

1 Like

Looks like your VLC install is a little borked… You’re missing plugin files that seem to be provided by VLC itself. My VLC installation on arch w/ no plugins has all those files.

Did you mess with VLC plugins at some point? You may want to try reinstalling VLC on that machine.

1 Like

this is most likely the culprit of your media player closing problems. it can’t use VAAPI.

you should try to install vaapi again for your gpu: Hardware video acceleration - ArchWiki

the rest of the modules just look like incidental to me, the va one is serious

1 Like

Hi Linux gurus,
I installed Manjaro on my new 13700k/z690.
Worked fine for few days then I get this during boot. Not sure where to start. I think the only change I made was a switch to the proprietary NVIDIA drivers. Any tips? Seems related to Intel integrated graphics?

Did you successfully install the nVidia drivers?
You can try to disable the Intel iGPU in uEFI to see if the nVidia card finally takes over. Otherwise you will need to look at mode setting and blacklisting drivers.

https://wiki.archlinux.org/title/NVIDIA

Does anyone know how to fix this issue I ran into with the Intel Ethernet Controller is not properly configured? Here is the hardware probe for my computer. I am using a Caldigit TS4, but the ethernet was working properly prior to this previous weekend.

I’m running NixOS, kernel version 6.1.11, with a 7950X on a ProArt X670E, which is nice, but I’m getting some annoying issues with suspending the machine. On issuing a systemctl suspend, the machine will dutifully go to sleep, and then immediately wake again. Issuing another systemctl suspend will put it to sleep for real.

I fixed this a few months ago, or so I thought, when I added a script to systemd’s pre-sleep.service target:

echo XHC0 > /proc/acpi/wakeup
echo XHC1 > /proc/acpi/wakeup
echo XHC2 > /proc/acpi/wakeup

Unfortunately, the solution was short lived and the issue returned. Any ideas for things I could try?

Is there anything else that’s enabled in /proc/acpi/wakeup? Might as well try disabling them all (except PWRB) and see if you fare better.

There’s also the option of rmmod -ing any non-crucial kernel modules (like sound drivers) before suspending.

Troubleshooting acpi suspend issues is a whole topic in itself:

try going into bios and disabling wake up on lan (magic packet).
it might be your network connection waking the pc if its set up to wake on lan.

/etc/pm/sleep.d

/usr/lib/pm-utils/sleep.d

check both locations and see if theres any scripts you want to adjust parameters in.

cat /sys/power/state
cat /sys/power/mem_sleep

check to see if your system is using and alt instruction to hibernate and wake.
apparently there are a couple.

look here for more info…

Is there anything else that’s enabled in /proc/acpi/wakeup ? Might as well try disabling them all (except PWRB) and see if you fare better.

$ cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
GPP3      S4    *disabled
GPP4      S4    *disabled
GPP5      S4    *disabled
GPP6      S4    *disabled
GP17      S4    *enabled   pci:0000:00:08.1
XHC0      S4    *disabled  pci:0000:6e:00.3
XHC1      S4    *disabled  pci:0000:6e:00.4
XHC2      S4    *disabled  pci:0000:6f:00.0
GPP0      S4    *enabled   pci:0000:00:01.1
SWUS      S4    *enabled   pci:0000:01:00.0
SWDS      S4    *enabled   pci:0000:02:00.0
GPP1      S4    *enabled   pci:0000:00:01.2
GPP2      S4    *disabled
GPP7      S4    *disabled  pci:0000:00:02.1
UP00      S4    *enabled   pci:0000:05:00.0
DP40      S4    *enabled   pci:0000:06:08.0
UP00      S4    *enabled   pci:0000:08:00.0
DP00      S4    *enabled   pci:0000:09:00.0
WIFI      S4    *disabled  pci:0000:0a:00.0
DP08      S4    *enabled   pci:0000:09:01.0
I225      S4    *enabled   pci:0000:0b:00.0
DP10      S4    *enabled   pci:0000:09:02.0
AQCL      S4    *disabled  pci:0000:0c:00.0
DP20      S4    *enabled   pci:0000:09:04.0
TBTC      S4    *enabled   pci:0000:0e:00.0
DP50      S4    *disabled
PX16      S4    *disabled
DP60      S4    *enabled   pci:0000:09:0c.0
XH00      S4    *enabled   pci:0000:69:00.0
DP60      S4    *enabled   pci:0000:06:0c.0
XH00      S4    *enabled   pci:0000:6b:00.0

I started with XHC because I assumed those were USB3, and I’ve had similar suspend issues caused by USB3 on Windows in the past, but it was pure guesswork and honestly I’m not even sure it was actually the thing that helped. Checking the PCI addresses against lspci confirms that these are the USB3 controllers. Suspend remained finicky for a week, then started working fine, and now isn’t working again. All sorts of system updates going on too, I didn’t keep track of versions. Most of the other addresses are host bridge and PCI bridges, no PWRB (power button?) though. Honestly as long as I can wake the machine with poweronlan, the keyboard, or wiggling the mouse, I’m fine. It’s in a rack, I never push the power button anyways.

Curiously, it seems I can’t actually disable everything. Some of the entries are duplicates, and I can only toggle the first occurence of each one.

Device  S-state   Status   Sysfs node
GPP3      S4    *disabled
GPP4      S4    *disabled
GPP5      S4    *disabled
GPP6      S4    *disabled
GP17      S4    *disabled  pci:0000:00:08.1
XHC0      S4    *disabled  pci:0000:6e:00.3
XHC1      S4    *disabled  pci:0000:6e:00.4
XHC2      S4    *disabled  pci:0000:6f:00.0
GPP0      S4    *disabled  pci:0000:00:01.1
SWUS      S4    *disabled  pci:0000:01:00.0
SWDS      S4    *disabled  pci:0000:02:00.0
GPP1      S4    *disabled  pci:0000:00:01.2
GPP2      S4    *disabled
GPP7      S4    *disabled  pci:0000:00:02.1
UP00      S4    *disabled  pci:0000:05:00.0
DP40      S4    *disabled  pci:0000:06:08.0
UP00      S4    *enabled   pci:0000:08:00.0
DP00      S4    *disabled  pci:0000:09:00.0
WIFI      S4    *disabled  pci:0000:0a:00.0
DP08      S4    *disabled  pci:0000:09:01.0
I225      S4    *disabled  pci:0000:0b:00.0
DP10      S4    *disabled  pci:0000:09:02.0
AQCL      S4    *disabled  pci:0000:0c:00.0
DP20      S4    *disabled  pci:0000:09:04.0
TBTC      S4    *disabled  pci:0000:0e:00.0
DP50      S4    *disabled
PX16      S4    *disabled
DP60      S4    *disabled  pci:0000:09:0c.0
XH00      S4    *disabled  pci:0000:69:00.0
DP60      S4    *enabled   pci:0000:06:0c.0
XH00      S4    *enabled   pci:0000:6b:00.0

lspci identifies these as:

08:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43f4 (rev 01)
06:0c.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43f5 (rev 01)
6b:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43f7 (rev 01)

If any of these were the problem, I’d suspect the 6b USB controller. I have tried unplugging all USB peripherals, though, and it doesn’t help.
Disabling everything hasn’t helped, though, and in fact suspend is now completely broken no matter what I do. Rebooting brought it back to how it was before, but disabling everything again re-broke it.

That link is really in depth, thanks. I’ll sit down this weekend and try to get through it.

try going into bios and disabling wake up on lan (magic packet).

Nah, I need WoL. Having it off doesn’t solve the issue, though, disabling it was one of the first things I tried.

$ find / -name sleep.d
/nix/store/l2wm0n1lqczrk85943jjk6w10f1bhfb6-pm-utils-1.4.1/lib/pm-utils/sleep.d
/nix/store/mfg3rds43265g4hhxj8jmnqjzaky6h9d-pm-utils-1.4.1/lib/pm-utils/sleep.d

They contain some scripts. No idea what they do, but nothing looks strange to me.

$ cat /nix/store/l2wm0n1lqczrk85943jjk6w10f1bhfb6-pm-utils-1.4.1/lib/pm-utils/sleep.d/00powersave
#!/nix/store/qqa28hmysc23yy081d178jfd9a1yk8aw-bash-5.2-p15/bin/sh

. "${PM_FUNCTIONS}"

command_exists pm-powersave || exit $NA

case $1 in
    suspend|hibernate) pm-powersave false ;;
    resume|thaw)       pm-powersave ;;
    *) exit $NA ;;
esac
exit 0
    %
$ cat /sys/power/state
freeze mem
$ cat /sys/power/mem_sleep
s2idle [deep]

The issue isn’t the command I’m using. systemctl suspend works, I just have to issue it twice for some reason. The first time the machine wakes instantly, but if I issue the same command again within a minute or so, it works properly.

I get the impression that suspending/hibernating Linux machines is another one of those core functionalities that are just fundamentally broken because servers don’t use them, like sound, or Wayland, or Nvidia drivers. I guess I should consider myself lucky that this is pretty inconsequential as far as problems go. I don’t have to suspend this machine, it’s in a closet so I can just leave it idling if I have to.

1 Like

S3 suspend is complex, many OEMs screw up their part of it and workarounds for buggy hardware need to be implemented in software. If you stick to more common systems, it is well supported in Linux.

1 Like