lxqt / pcmanfm-qt

File manager and desktop icon manager (Qt port of PCManFM and libfm)
https://lxqt-project.org
GNU General Public License v2.0
427 stars 112 forks source link

Thumbnail image size limit keeps resetting to 4.0MiB in OpenSUSE #1522

Closed guzz46 closed 2 years ago

guzz46 commented 2 years ago
O
Expected Behavior
Choose image size limit for thumbnailer and have it saved ##### Current Behavior Choose a given size (say 10MiB), click ok, close pcmanfm-qt, re-open pcmanfm-qt and image thumbnail size is still 4.0MiB ##### Possible Solution
Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context
Most jpeg thumbnails aren't shown because they are over 4.0MiB The workaround I've been using is get everything configured how I want it in pcmanfm-qt then set MaxThumbnailFileSize to 1023000 in settings.conf then as root run the command chattr +i ~/.config/pcmanfm-qt/lxqt/settings.conf so pcmanfm-qt can't write to the file.
System Information
tsujan commented 2 years ago

Not reproducible.

Could be reopened if you give us a way of reproducing the problem. Thumbnail image size is NOT reset here.

tsujan commented 2 years ago

then as root run the command chattr +i...

Perhaps, by doing so before, you had made the config file non-writable. Of course, everything will be reset with a non-writable config file.

guzz46 commented 2 years ago

This bug happened after a fresh install of tumbleweed, so the config file was writeable, all other changes were saved just not the thumbnail size, but even after setting the thumbnail limit to near max in the config file and making it non-writeable when you open pcmanfm-qt preferences it still says its at 4.0MiB

Edit: Maybe this has something to do with the tumbleweed build of pcmanfm-qt because it doesn't exhibit the same behaviour on garuda lxqt

stefonarch commented 2 years ago

Not reproducible for me too.

tsujan commented 2 years ago

Edit: Maybe this has something to do with the tumbleweed build of pcmanfm-qt because it doesn't exhibit the same behaviour on garuda lxqt

That's a downstream question but https://download.opensuse.org/repositories/openSUSE:/Factory/standard/src/pcmanfm-qt-1.0.0-1.3.src.rpm seems OK.

guzz46 commented 2 years ago

Edit: Maybe this has something to do with the tumbleweed build of pcmanfm-qt because it doesn't exhibit the same behaviour on garuda lxqt

That's a downstream question but https://download.opensuse.org/repositories/openSUSE:/Factory/standard/src/pcmanfm-qt-1.0.0-1.3.src.rpm seems OK.

That one keeps the setting until I logout and log back in again, but I've submitted a bug report to the openSUSE guys, I'll just remove write permissions with chattr until it gets fixed, thanks.

itaranto commented 2 years ago

I have the same problem on Arch Linux, MaxThumbnailFileSize inside ~/.config/pcmanfm-qt/default/settings.confg keeps getting reset to 4096 every time I run pcmanfm-qt.

I'm not using extended attributes and the file has write permissions (I could write to it successfully).

itaranto commented 2 years ago

OK, I just did it through the GUI and it works.

So, nevermind...

However, it's a bit strange that editing the config file doesn't' work in the same way.

Also, I think the default value should be updated, 4.0 MiB is a little bit low.

tsujan commented 2 years ago

However it's a bit strange that editing the config file doesn't' work in the same way.

Config files of GUI apps are for apps, not for users. Their manual editing requites familiarity with apps' codes. Many GUI apps ignore manual editing and overwrite it on exiting.

itaranto commented 2 years ago

However it's a bit strange that editing the config file doesn't' work in the same way.

Config files of GUI apps are for apps, not for users. Their manual editing requites familiarity with apps' codes. Many GUI apps ignore manual editing and overwrite it on exiting.

I get it, I was just curious about it...

This, for example, prevents me from having the config file in a Git repository since the app is detecting "who" has modified the file.

tsujan commented 2 years ago

This, for example, prevents me from...

It doesn't. With single-process apps like pcmanfm-qt, you need to really exit them before manual editing — closing of windows doesn't mean exiting necessarily.

To exit pcmanfm-qt cleanly, stop it in LXQt Session Settings. Then do your manual editing with care, and start it from Session Settings again.

EDIT: This is the case inside a standard LXQt session. Outside LXQt and without the desktop mode, closing all its windows makes the app exit.

jubalh commented 2 years ago

Hmm our openSUSE spec file looks like this: https://build.opensuse.org/package/view_file/X11:LXQt/pcmanfm-qt/pcmanfm-qt.spec?expand=1 So the only patch we are adding is about changing the wallpaper.

Strange that this bug seems to happen only for us. I'm yet unsure why it could happen. Does anyone have an idea?

I see that we are also pulling in Requires: menu-cache but if I remember correctly on another LXQt component this was removed. Is it still recommended to have this with pcmanfm-qt?

tsujan commented 2 years ago

So the only patch we are adding is about changing the wallpaper.

That's totally harmless: https://build.opensuse.org/package/view_file/openSUSE:Factory/pcmanfm-qt/pcmanfm-qt-default-wallpaper.patch?expand=1

Strange that this bug seems to happen only for us.

You mean you can see it too? If so, perhaps you could help me reproduce it here (not under OpenSUSE).

Is it still recommended to have this with pcmanfm-qt?

menu-cache is needed by side-pane → Applications.

The problem we had with menu-cache was https://github.com/lxqt/lxqt/issues/1311. But, after https://github.com/lxqt/lxqt-session/commit/d198b9164eb1798d889817d5d43babdd3efc59f8, such problems shouldn't exist anymore.

Also → https://github.com/lxqt/libfm-qt/issues/417

stefonarch commented 2 years ago

Just checked my settings and found it was at 4mb too, but changing looks persistent after restarting pcmanfm-qt. I could swear I had it over 4mb and I had also activated thumbnails for non-local files (samba), but found also that setting changed to "only local".

tsujan commented 2 years ago

found it was at 4mb too...

That's the default. It isn't a problem.

I could swear I had it over 4mb...

I wouldn't rely on memory ;) But you usually find hidden bugs. If you find a combination that can't be saved, please tell me as soon as possible.

stefonarch commented 2 years ago

I was quite sure that I had set it to a higher value. Could check my backups when I get back home in a week. For the other setting I'm 100% sure as I used it 10 days ago and saw remote thumbnails.

tsujan commented 2 years ago

I checked those 2 settings now (10 MB + non-local) and didn't find a problem.

tsujan commented 2 years ago

Rechecked the code too. Found nothing suspicious.

Please also note that, in this report, two unusual things were done by users, namely, setting of chattr as root (supposedly afterward), and manual editing of the config file while pcmanfm-qt was running.

jubalh commented 2 years ago

You mean you can see it too? If so, perhaps you could help me reproduce it here (not under OpenSUSE).

We have some new LXQt maintainers on openSUSE. And one of them could reproduce it. At least he sais so at: https://bugzilla.suse.com/show_bug.cgi?id=1195421#c4

You mean you can see it too? If so, perhaps you could help me reproduce it here (not under OpenSUSE).

I'm so tight on time right now that I don't know when I can setup a test vm :((

Thanks for explaining and referencing the menu-cache things for me :)

Please also note that, in this report, two unusual things were done by users, namely, setting of chattr as root (supposedly afterward), and manual editing of the config file while pcmanfm-qt was running.

Hmm that's quite true!

guzz46 commented 2 years ago

I don't know if this is any help but I can reproduce this using the Tumbleweed XFCE live ISO, boot the ISO, connect to the net, do a zypper ref, then zypper in pcmanfm-qt, open it, change the thumbnail file size, close it, open it again and it's still at 4.0MiB, even after logging out and in again.

tsujan commented 2 years ago

I don't know if this is any help

Thanks! It might be of help to OpenSUSE. But here, it doesn't happen. Some piece of info is definitely missing.

stefonarch commented 2 years ago

Some piece of info is definitely missing.

I thought in XFCE pcmanfm-qt -- desktop isn't running, so I disabled the desktop and found the settings reset to 4mb and only local files. But I cannot repeat it... maybe they were reset also before, but I'm sure now that there was 9mb before today.

tsujan commented 2 years ago

I thought in XFCE pcmanfm-qt -- desktop isn't running

It shouldn't, under the normal circumstances of XFCE.

I'm not sure what XFCE does on logging out. If it doesn't end all processes, the settings won't be saved on logging out.

However, @guzz46's last comment was about closing the window, in which case, the settings should be remembered on opening another window, as it does here (without the desktop module). Hence mentioning a missing piece of info.

stefonarch commented 2 years ago

It's just a fact that something has triggered this reset on my laptop yesterday too. @guzz46 : can you uncheck "thumbnails only for local files" and verify if that will be reset too in your case?

guzz46 commented 2 years ago

It's just a fact that something has triggered this reset on my laptop yesterday too. @guzz46 : can you uncheck "thumbnails only for local files" and verify if that will be reset too in your case?

Yes, that resets too, I unchecked "only show thumbnails for local files", clicked ok, closed the settings window, opened the settings window again and "only show thumbnails for local files" was still checked, the results were still the same after closing pcmanfm-qt, and after logging out and back in again.

tsujan commented 2 years ago

@guzz46 Are other settings saved at all?

stefonarch commented 2 years ago

As there are 2 distinct setting locations:~/.config/pcmanfm-qt/default/ and ~/.config/pcmanfm-qt/lxqt/: could it be that it writes or reads the wrong location? Just a wild guess.

tsujan commented 2 years ago

could it be that it writes or reads the wrong location?

No. The code has no problem in this regard.

The settings won't be saved only if either there's no write permission or the app is killed/crashed (in contrast to a graceful termination, whether with SIGTERM or from within the app). That's true for all apps that save their settings on exiting. It's also true for all settings, not just this or that one.

guzz46 commented 2 years ago

@guzz46 Are other settings saved at all?

Yes, other settings I've tried get saved, including "show thumbnails of files", just not the thumbnail size, and the thumbnail setting for local files, of note I don't have a ~/.config/pcmanfm-qt/default/ I only have a ~/.config/pcmanfm-qt/lxqt/

tsujan commented 2 years ago

I don't have a ~/.config/pcmanfm-qt/default/ I only have a ~/.config/pcmanfm-qt/lxqt/

If you use pcmanfm-qt under XFCE and not LXQt, that may show the cause of the problem. Please check whether you have write permissions inside ~/.config/pcmanfm-qt/default/.

guzz46 commented 2 years ago

I don't have a ~/.config/pcmanfm-qt/default/ I only have a ~/.config/pcmanfm-qt/lxqt/

If you use pcmanfm-qt under XFCE and not LXQt, that may show the cause of the problem. Please check whether you have write permissions inside ~/.config/pcmanfm-qt/default/.

I'm using it under LXQt, so I only have ~/.config/pcmanfm-qt/lxqt/

tsujan commented 2 years ago

I'm using it under LXQt, so I only have ~/.config/pcmanfm-qt/lxqt/

Then that's normal, and the lack of ~/.config/pcmanfm-qt/default/ isn't the sign of a problem.

guzz46 commented 2 years ago

I'm using it under LXQt, so I only have ~/.config/pcmanfm-qt/lxqt/

Then that's normal, and the lack of ~/.config/pcmanfm-qt/default/ isn't the sign of a problem.

Good to know, thanks

guzz46 commented 2 years ago

This is kind of weird but I just noticed that changing the thumbnail size limit in lximage-qt doesn't get saved either.

tsujan commented 2 years ago

Are you sure that your installed libfm-qt has the same version of pcmanfm-qt?

guzz46 commented 2 years ago

Are you sure that your installed libfm-qt has the same version of pcmanfm-qt?

I have pcmanfm-qt version 1.1.0-1.3 and libfm-qt11 and libfm-qt-data version 1.1.0-1.4

tsujan commented 2 years ago

I don't have OpenSUSE, but https://build.opensuse.org/package/show/openSUSE%3AFactory/libfm-qt and https://build.opensuse.org/package/show/openSUSE%3AFactory/pcmanfm-qt show "revision 14" for libfm-qt and "revision 19" for pcmanfm-qt. Yours don't seem to match them.

tsujan commented 2 years ago

Or perhaps https://build.opensuse.org/package/show/X11%3ALXQt/pcmanfm-qt. Don't rely on my links — I know nothing about OpenSUSE — ask OpenSUSE instead.

guzz46 commented 2 years ago

I don't have OpenSUSE, but https://build.opensuse.org/package/show/openSUSE%3AFactory/libfm-qt and https://build.opensuse.org/package/show/openSUSE%3AFactory/pcmanfm-qt show "revision 14" for libfm-qt and "revision 19" for pcmanfm-qt. Yours don't seem to match them.

I think that's for factory, not tumbleweed, but I think they're basically the same anyway, I don't know what the revision number means but the version numbers are still 1.1.0, I might try pcmanfm-qt from the x11:lxqt and see if anything changes

jubalh commented 2 years ago

1.1.0-1.3 1.1.0 is the version. the rest regards the build (rebuilds etc).

revision 14 that only speaks about the change in our build files (revision 14 is like a git hash for a commit)

@guzz46 yes it looks like you are running the latest versions. And you installed them using zypper in.. / yast? So you use the official repositories and not the X11:LXQt devel repository or X11:LXQt:git for git packages, right?

tsujan commented 2 years ago

I don't know what the revision number means

What comes after 1.1.0.

but the version numbers are still 1.1.0

In general, you can't count on that.

tsujan commented 2 years ago

OK, @jubalh knows these things. I won't comment on OpenSUSE packages.

guzz46 commented 2 years ago

1.1.0-1.3 1.1.0 is the version. the rest regards the build (rebuilds etc).

revision 14 that only speaks about the change in our build files (revision 14 is like a git hash for a commit)

@guzz46 yes it looks like you are running the latest versions. And you installed them using zypper in.. / yast? So you use the official repositories and not the X11:LXQt devel repository or X11:LXQt:git for git packages, right?

Yes I installed them with zypper in, from the official tumbleweed repos, I don't have yast installed, I just tried pcmanfm-qt from the X11:LXQt project but nothing changed, I thought maybe its some kind of bug in the thumbnailer, I don't know what it uses to get image thumbnails.

tsujan commented 2 years ago

I just tried pcmanfm-qt from the X11:LXQt project but nothing changed,

Did you restart pcmanfm-qt from Session Settings?

its some kind of bug in the thumbnailer...

Very unlikely; otherwise we would see it too.

guzz46 commented 2 years ago

I just tried pcmanfm-qt from the X11:LXQt project but nothing changed,

Did you restart pcmanfm-qt from Session Settings?

its some kind of bug in the thumbnailer...

Very unlikely; otherwise we would see it too.

I logged out and back in again, what if the thumbnail bug only affects openSUSE? I just thought it was weird that lximage-qt suffers from it too, I'm assuming the packages are not related, unless the way they grab image thumbnails are related?

tsujan commented 2 years ago

I just thought it was weird that lximage-qt suffers from it too

It's libfm-qt that makes thumbnails; not pcmanfm-qt.

guzz46 commented 2 years ago

I just thought it was weird that lximage-qt suffers from it too

It's libfm-qt that makes thumbnails; not pcmanfm-qt.

OK, I wonder if the openSUSE libfm-qt has the bug then.

tsujan commented 2 years ago

Also, it can be worth checking parallel installations in /usr/local/. They shouldn't exist.

tsujan commented 2 years ago

I logged out and back in again

Why? I ask just because something might come out of it; most probably nothing ;)

guzz46 commented 2 years ago

I logged out and back in again

Why? I ask just because something might come out of it; most probably nothing ;)

I figured that was the easiest way to restart pcmanfm-qt