Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux+X11] GUI scaling is reset when switching view modes #1145

Open
toto789 opened this issue May 2, 2024 · 57 comments
Open

[Linux+X11] GUI scaling is reset when switching view modes #1145

toto789 opened this issue May 2, 2024 · 57 comments
Labels

Comments

@toto789
Copy link
Contributor

toto789 commented May 2, 2024

Tauon v7.7.2 on ubuntu 24.04
Steps to reproduce :

  • Set GUI scale to 1.75x
  • display Tauon in mini-mode
  • quit mini-mode
    Gui scale is reset to 1.00x.
    image

The same thing happens when leaving other views.
It is tedious to redo the display scale adjustment, so I have to give up using the different displays that you have carefully created: very unfortunate, isn't it? So please consider this issue very seriously!

@toto789 toto789 changed the title GUI scale is reset when leaving mini-mode GUI scale is reset when exiting different modes Jun 9, 2024
@toto789 toto789 changed the title GUI scale is reset when exiting different modes The GUI scale is reset when exiting the different modes Jun 9, 2024
@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 29, 2024

When you say mini-mode do you mean F8?

Do you still have the issue on the latest development build?

@C0rn3j C0rn3j added the unconfirmed bug Are you getting this bug too? label Dec 29, 2024
@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

Yes, F8 or right-clic in the bottom panel > Mini.
How to test the development version? I didn't find an INSTALL file there.

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 30, 2024

The download is an archive with an executable inside, just run the executable

@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

Please explain to me step by step what I need to download (url etc.) and the name of the executable.
https://github-com.translate.goog/Taiko2k/Tauon?_x_tr_sl=auto&_x_tr_tl=fr&_x_tr_hl=fr and the run.sh file contained does not launch Tauon (typing ./run.sh
in a terminal I get:

1) Clean venv run
2) Dirty venv run
3) Windows build
4) Compile phazor
5) Compile phazor with PipeWire support
Select a script to run: 
```).

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 30, 2024

It looks like you're following the building on Windows page instead of the development prebuilts page I linked.

Follow this - https://github.com/Taiko2k/Tauon/wiki/Development-builds

Not this - https://github.com/Taiko2k/Tauon/wiki/Building-for-Windows

I've edited the page a little to hopefully make things a bit more clear.

the name of the executable

image

@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

You should just specify that you have to search among the "Update... [something]".

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 30, 2024

I've reworded it further, hopefully that makes it clearer, I plan to create proper pre-releases on the Releases page from it, but this will have to do for now.

@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

It's much worse: any right-click choice on the menu icon at the bottom (Mini etc.) instantly closes Tauon almost every time, otherwise the resizing problem persists.

Here are the terminal messages on a crash:

$ ./Tauon
UserWarning: Using SDL2 binaries from pysdl2-dll 2.30.10
2024-12-30 20:22:53 [ INFO  ] [ __main__ ] Tauon v7.9.0
2024-12-30 20:22:53 [ INFO  ] [ __main__ ] Copyright 2015-2024 Taiko2k [email protected]

2024-12-30 20:22:54 [ INFO  ] [  t_draw  ] Found jxlpy for JPEG XL support
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Window size: [1920, 1032]
Gtk-Message: 20:22:54.483: Failed to load module "canberra-gtk-module"
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Running in portable mode
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Found XDG-Downloads: /home/[XXX]/Téléchargements in /home/[XXX]/.config/user-dirs.dirs
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Found XDG-Music:     /home/[XXX]/Musique     in /home/[XXX]/.config/user-dirs.dirs
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Install directory:         /home/[XXX]/Bureau/TauonMusicBox/_internal
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Config directory:          /home/[XXX]/Bureau/TauonMusicBox/_internal/user-data
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Cache directory:           /home/[XXX]/Bureau/TauonMusicBox/_internal/cache
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Home directory:            /home/[XXX]
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Music directory:           /home/[XXX]/Musique
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Download directory:        /home/[XXX]/Téléchargements
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Asset directory:           /home/[XXX]/Bureau/TauonMusicBox/_internal/assets
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Locale directory:          /home/[XXX]/Bureau/TauonMusicBox/_internal/locale
2024-12-30 20:22:54 [WARNING] [  t_main  ] Star database file is missing, first run? Will create one anew! (t_main.py:3028)
2024-12-30 20:22:54 [WARNING] [  t_main  ] Album star database file is missing, first run? Will create one anew! (t_main.py:3045)
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Database loaded in 0.0 seconds.
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Translation file for 'None' loaded
2024-12-30 20:22:54 [ INFO  ] [ t_chrome ] Scanning for chromecasts...
2024-12-30 20:22:54 [ INFO  ] [discovery ] discover_chromecasts is deprecated and will be removed in June 2024, update to use CastBrowser instead.
2024-12-30 20:22:54 [ INFO  ] [t_webserve] Start controller server
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] OPEN URI
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Using SDL version: 2.30.10
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Applying theme: Turbo
2024-12-30 20:22:54 [ INFO  ] [  t_main  ] Refill shuffle pool
2024-12-30 20:22:57 [ INFO  ] [  t_main  ] Writing database to disk... 
2024-12-30 20:22:57 [ INFO  ] [  t_main  ] Done writing database
Exit PHAzOR
2024-12-30 20:23:12 [ ERROR ] [  t_main  ] Window width is less than 500, grrr why does this happen, stupid bug (t_main.py:43687)
2024-12-30 20:23:12 [ ERROR ] [  t_main  ] Window width is less than 500, grrr why does this happen, stupid bug (t_main.py:43687)
Traceback (most recent call last):
  File "tauon/__main__.py", line 443, in <module>
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "tauon/t_modules/t_main.py", line 47522, in <module>
  File "tauon/t_modules/t_main.py", line 33473, in render
UnboundLocalError: cannot access local variable 'seek_r' where it is not associated with a value
[PYI-10185:ERROR] Failed to execute script '__main__' due to unhandled exception!
2024-12-30 20:23:12 [WARNING] [ warnings ] asyncio/base_events.py:759: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>
 (warnings.py:110)

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 30, 2024

This is Ubuntu 24.04 and GNOME?

I am betting on the failed-to-load canberra-gtk-module breaking the image completely there, I tested that image only on Plasma.

EDIT: Can you try this build? If nothing else, it should at least get rid of the canberra load fail.

https://github.com/C0rn3j/Tauon/actions/runs/12551143004

@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

I am now on ubuntu 24.10, "ubuntu on Xorg" session, GNOME-Shell.

Immediate crash with the indicated package when selecting "Mini". Terminal output:

./'Tauon Music Box'
UserWarning: Using SDL2 binaries from pysdl2-dll 2.30.10
2024-12-30 21:50:23 [ INFO  ] [ __main__ ] Tauon v7.9.0
2024-12-30 21:50:23 [ INFO  ] [ __main__ ] Copyright 2015-2025 Taiko2k [email protected]

2024-12-30 21:50:23 [ INFO  ] [ __main__ ] No window state file
2024-12-30 21:50:23 [ INFO  ] [  t_draw  ] Found jxlpy for JPEG XL support
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Window size: [1120, 600]
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Running in portable mode
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Install directory:         /home/[XXX]/Bureau/TauonMusicBox/_internal
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Asset directory:           /home/[XXX]/Bureau/TauonMusicBox/_internal/assets
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Locale directory:          /home/[XXX]/Bureau/TauonMusicBox/_internal/locale
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Userdata directory:        /home/[XXX]/Bureau/TauonMusicBox/_internal/user-data
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Config directory:          /home/[XXX]/Bureau/TauonMusicBox/_internal/user-data
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Cache directory:           /home/[XXX]/Bureau/TauonMusicBox/_internal/cache
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Home directory:            /home/[XXX]
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Music directory:           /home/[XXX]/Musique
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Downloads directory:       /home/[XXX]/Téléchargements
2024-12-30 21:50:23 [WARNING] [  t_main  ] Input config file is missing, first run? Copying input.txt template from templates directory (t_main.py:940)
2024-12-30 21:50:23 [WARNING] [  t_main  ] Star database file is missing, first run? Will create one anew! (t_main.py:2653)
2024-12-30 21:50:23 [WARNING] [  t_main  ] Album star database file is missing, first run? Will create one anew! (t_main.py:2670)
2024-12-30 21:50:23 [WARNING] [  t_main  ] State database file is missing, first run? Will create one anew! (t_main.py:2752)
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Database loaded in 0.0 seconds.
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Translation file for 'None' loaded
2024-12-30 21:50:23 [WARNING] [  t_main  ] break-enable not found in view_prefs[] when trying to load settings! First run? (t_main.py:4018)
2024-12-30 21:50:23 [WARNING] [  t_main  ] append-date not found in view_prefs[] when trying to load settings! First run? (t_main.py:4025)
2024-12-30 21:50:23 [ INFO  ] [ t_chrome ] Scanning for chromecasts...
2024-12-30 21:50:23 [ INFO  ] [discovery ] discover_chromecasts is deprecated and will be removed in June 2024, update to use CastBrowser instead.
2024-12-30 21:50:23 [ INFO  ] [t_webserve] Start controller server
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] OPEN URI
2024-12-30 21:50:23 [ INFO  ] [  t_main  ] Using SDL version: 2.30.10
2024-12-30 21:50:24 [ INFO  ] [  t_main  ] Applying theme: Turbo
2024-12-30 21:50:24 [ INFO  ] [  t_main  ] Refill shuffle pool
2024-12-30 21:50:26 [ INFO  ] [  t_main  ] Writing database to disk... 
2024-12-30 21:50:26 [ INFO  ] [  t_main  ] Done writing database
Exit PHAzOR
Traceback (most recent call last):
  File "tauon/__main__.py", line 442, in <module>
  File "tauon/__main__.py", line 439, in main
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "tauon/t_modules/t_main.py", line 47131, in <module>
  File "tauon/t_modules/t_main.py", line 33085, in render
UnboundLocalError: cannot access local variable 'seek_r' where it is not associated with a value
[PYI-18365:ERROR] Failed to execute script '__main__' due to unhandled exception!
2024-12-30 21:50:35 [WARNING] [ warnings ] asyncio/base_events.py:759: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>
 (warnings.py:110)

@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

There is still a small improvement: when we do not crash (the "Tab" layout seems less "fragile", all the others crash), the resizing is preserved.

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 30, 2024

So basically your initial problem is solved, but these prebuilts crash for you?

Can you test if you also get the same crash on a Wayland session, or if it's only limited to X?

Looks like the canberra module fix at least took.

@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

On Wayland the terminal responds:

$./'Tauon Music Box'
UserWarning: Using SDL2 binaries from pysdl2-dll 2.30.10
2024-12-30 22:07:37 [ INFO ] [ __main__ ] Tauon v7.9.0
2024-12-30 22:07:37 [ INFO ] [ __main__ ] Copyright 2015-2025 Taiko2k [email protected]

./Tauon Music Box: symbol lookup error: /lib/x86_64-linux-gnu/libEGL_mesa.so.0: undefined symbol: wl_display_create_queue_with_name

@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

Alas! No, the problem is not solved: back on Xorg, I switch to Mini mode without crash, and when returning to normal mode I lose resizing again. Same thing with the "Tab" mode.
Several tests (closing and reopening Tauon) confirm this.

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 30, 2024

I managed to reproduce the seek_r crash on my setup, seems exclusive to the prebuilt images, for some reason.

If you can run Tauon yourself from my branch you will probably no longer suffer the crashes, but I imagine your original issue (which I am having trouble reproducing) will still be there at least on X.

Let's deal with the crashes first.

./Tauon Music Box: symbol lookup error: /lib/x86_64-linux-gnu/libEGL_mesa.so.0: undefined symbol: wl_display_create_queue_with_name

The question is if it's a failure of the pyinstaller packaging, or something wrong with your system. I imagine 24.04 dependencies/libraries may not like the 24.10 system.

Can you grab my fork with the device branch and run ./run.sh 1 off it (runs the first option - Clean venv) and see if you can reproduce the crashing issues there?

Both the X seek_r one and the Wayland mesa one.

Something like this should do:

sudo apt install -y libayatana-appindicator3-dev gir1.2-rsvg-2.0 libpipewire-0.3-dev libdbus-1-dev libsdl2-2.0-0 libsdl2-image-2.0-0 fonts-noto gir1.2-notify-0.7 libcairo2-dev python3-gi-cairo libwavpack-dev libsamplerate0-dev libopenmpt-dev libvorbis-dev libopusfile-dev libflac-dev libgme-dev libmpg123-dev

git clone https://github.com/C0rn3j/Tauon.git
cd Tauon
git checkout device
./run.sh 1
# ./run.sh 2 - on subsequent runs after you get it working once, to avoid constantly rebuilding everything

The dependency list is made on 24.04, but it will hopefully be the same for 24.10.

If you get it to stop crashing on Wayland, can you test if your scaling issue happens there then?
I strongly suspect it's going to be exclusive to X as I cannot trigger it even once on my system.

@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

Your device branch with ./run.sh 1 (on Xorg):

[...]
src/phazor/phazor.c:25:17: note: ‘#pragma message: Note: C23 not supported! Current __STDC_VERSION__ value: 201710L’
   25 |         #pragma message("Note: C23 not supported! Current __STDC_VERSION__ value: " TOSTRING(__STDC_VERSION__))
      |                 ^~~~~~~
src/phazor/phazor.c:86:10: fatal error: samplerate.h: Aucun fichier ou dossier de ce nom
   86 | #include <samplerate.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

ERROR Backend subprocess exited when trying to invoke build_wheel

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 30, 2024

That would suggest you did not run the first command and do not have libsamplerate0-dev installed, have you?

@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

About X seek_r and Wayland mesa:

$ git clone [email protected]:C0rn3j/Tauon.git
Clonage dans 'Tauon'...
The authenticity of host 'github.com (140.82.121.4)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type 'yes', 'no' or the fingerprint: yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Impossible de lire le dépôt distant.

Veuillez vérifier que vous avez les droits d'accès
et que le dépôt existe.

(means: Unable to read the remote repository. Please check that you have access rights and that the repository exists.)

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 30, 2024

Whoops, gave you the git link instead of http, fixed the command (git clone https://github.com/C0rn3j/Tauon.git)

@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

Same problems (still on Xorg): crashes and lost resizing.

[...]

2024-12-30 23:17:46 [ ERROR ] [  t_main  ] Window width is less than 500, grrr why does this happen, stupid bug (t_main.py:43296)
2024-12-30 23:17:46 [ ERROR ] [  t_main  ] Window width is less than 500, grrr why does this happen, stupid bug (t_main.py:43296)
2024-12-30 23:17:46 [WARNING] [ warnings ] /usr/lib/python3.12/asyncio/base_events.py:726: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>
  _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)
 (warnings.py:112)
Traceback (most recent call last):
  File "/home/[XXX]/Bureau/Tauon-device/Tauon-device/Tauon/.venv/bin/tauonmb", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/[XXX]/Bureau/Tauon-device/Tauon-device/Tauon/.venv/lib/python3.12/site-packages/tauon/__main__.py", line 439, in main
    from tauon.t_modules import t_main
  File "/home/[XXX]/Bureau/Tauon-device/Tauon-device/Tauon/.venv/lib/python3.12/site-packages/tauon/t_modules/t_main.py", line 47131, in <module>
    mini_mode.render()
  File "/home/[XXX]/Bureau/Tauon-device/Tauon-device/Tauon/.venv/lib/python3.12/site-packages/tauon/t_modules/t_main.py", line 33085, in render
    left_area = (1, y1, seek_r[0] - 1, 45 * gui.scale)
                        ^^^^^^
UnboundLocalError: cannot access local variable 'seek_r' where it is not associated with a value

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 30, 2024

seek_r - Looking at the code - do you have no track playing when you do this, and does it work fine if you do have something playing?

@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

Resize lost during playback.
It's 0:19 at my place. See you later!

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 30, 2024

I meant if you are able to reproduce the crashing with seek_r during playback, since to me it seems like this is a bug that assumes that something will always play, and if it doesn't - crash in minimode.

@toto789
Copy link
Contributor Author

toto789 commented Dec 30, 2024

Indeed, with your version, the command ./run.sh 1 and on Xorg, if a song is playing, changes in display modes do not crash Tauon (but the resizing is lost).
I also notice that after stopping the song, changing the display mode no longer crashes Tauon (in other words, it seems that the crashes only occur when launching Tauon, before any song is played).
See you tomorrow for the rest, if you want!

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

https://github.com/Taiko2k/Tauon/actions/runs/12557615679?pr=1361

This should fix the seek_r crash (minimode looks fairly blank when you run into this situation, but it beats a crash).

Can you check if ./run.sh 1 works on Wayland and if it has your scaling reset issue?

You probably want to do a git pull in the cloned directory, to pull the seek_r fix in there.

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

First, is this the right command (I'm not familiar with git)?

~/Bureau/Tauon-device/Tauon-device/Tauon$ git pull https://github.com/C0rn3j/Tauon.git
Depuis https://github.com/C0rn3j/Tauon
 * branch              HEAD       -> FETCH_HEAD
Déjà à jour.

(Déjà à jour = Already up to date)

If yes: both on Xorg and on Wayland, Tauon crashes before any song is played by changing mode - tested with "Mini", "Square" and "Large square", but not "Tab" (and with "Tab" the resizing is preserved).

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

Post the crash log please

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

It shouldn't crash on seek_r anywhere anymore, can you check that this commit is present in this file:

.venv/lib/python3.12/site-packages/tauon/t_modules/t_main.py

and that it still truly gives you that crash there? Because it did fix it on my side.

@C0rn3j C0rn3j changed the title The GUI scale is reset when exiting the different modes [Linux+X11] GUI scaling is reset when switching view modes Dec 31, 2024
@C0rn3j C0rn3j added bug and removed unconfirmed bug Are you getting this bug too? labels Dec 31, 2024
@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

Attention:

$ git pull && run.sh 1
Déjà à jour.
run.sh : commande introuvable

(commande introuvable = command not found). It works better with git pull && ./run.sh 1 ;-)

Yes, my .venv/lib/python3.12/site-packages/tauon/t_modules/t_main.py file is compliant.

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

Can you give the exact reproduction steps to get it to crash now?

Because if I launch Taoun here and mash F8 it no longer crashes.

I don't see how that state should be possible on the up to date version ._.

Screencast_20241231_122344.webm

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

Regarding you being unable to run the prebuilt images on Wayland, do they start working if you remove these four libwayland* files from the _internal directory?

image

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

Steps to reproduce:

cd Bureau
cd Tauon
git pull && ./run.sh 1

-> Playlist empty
Change mode, possibly several times for a few minutes.
I thought the crash problem was fixed, and, while writing to you, I went back to Tauon to test the resizing; for that I had to go back to normal mode: crash of which here is the log...

[...]
2024-12-31 12:44:44 [ ERROR ] [  t_main  ] Window width is less than 500, grrr why does this happen, stupid bug (t_main.py:43310)
2024-12-31 12:44:44 [WARNING] [ warnings ] /usr/lib/python3.12/asyncio/base_events.py:726: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>
  _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)
 (warnings.py:112)
Traceback (most recent call last):
  File "/home/[XXX]/Bureau/Tauon/.venv/bin/tauonmb", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/[XXX]/Bureau/Tauon/.venv/lib/python3.12/site-packages/tauon/__main__.py", line 439, in main
    from tauon.t_modules import t_main
  File "/home/[XXX]/Bureau/Tauon/.venv/lib/python3.12/site-packages/tauon/t_modules/t_main.py", line 47141, in <module>
    mini_mode3.render()
  File "/home/[XXX]/Bureau/Tauon/.venv/lib/python3.12/site-packages/tauon/t_modules/t_main.py", line 33522, in render
    left_area = (1, y1, volume_r[0] - 1, 45 * gui.scale)
                        ^^^^^^^^
UnboundLocalError: cannot access local variable 'volume_r' where it is not associated with a value

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

P.S.: I agree to stay on Wayland... if you help me get Birdtray working properly there, which is the only reason I'm staying on Xorg. :-)

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

I note that I now have to double-click to change mode via the context menu in the bottom bar, as well as on the ˅ icon to exit a mode other than normal mode.

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

volume_r crash

If you redo those steps, it should be gone now, and hopefully not crash on a third thing.

I agree to stay on Wayland... if you help me get Birdtray working properly there, which is the only reason I'm staying on Xorg

Me getting you to try Wayland was to nail the issue down, not to try to get you to switch, and now it's to diagnose the Wayland crashing issue, which is not reproducible on my HW+SW combo.

The latest prebuilt with the fixes included is here - https://github.com/Taiko2k/Tauon/actions/runs/12559236662 (still needs deleting the 4 _internal files and getting back as to if that helped)

That said, in the Wayland implementation thread on Birdtray's side, there are people suggesting alternative solutions that worked for them.

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

Regarding you being unable to run the prebuilt images on Wayland, do they start working if you remove these four libwayland* files from the _internal directory?

I don't have any libwayland* files in my Tauon folder.

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

They are exclusive to the prebuilt image, which is the thing that crashes on your system.

I.e. not the git cloned directory, but the zipped up download I linked to.

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

It doesn't seem to crash anymore, actually. I don't have to click two times on the ˅ icon anymore, but still in the modes context menu.

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

Can you clarify just to make sure we're talking about the same thing, since we're sorting out three issues at the same time in this thread(X11 scaling reset, Wayland prebuilt crash, mode switch crash)?

It doesn't seem to crash anymore, actually.

A) The Wayland prebuilt on launching after deleting the 4 files in the prebuilt image
B) Prebuilt/direct launch when switching view modes
C) Both crashes are now gone

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

A coffee and I'll be back, I hope with good news (to end the year)! :-)

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

I downloaded the archive at https://github.com/Taiko2k/Tauon/actions/runs/12559236662, deleted the 4 libwayland* files, then ran the "Tauon Music Box" file: no crashes when testing all modes. There remains the annoying obligation to click twice in the mode menu and, apparently only in Mini mode, twice on the ˅ icon to exit it.

I don't understand what difference you make between this:

B) Prebuilt/direct launch when switching view modes
and A).
I don't understand:
C) Both crashes are now gone
I only see one crash: when changing display mode.

It's time for me to go buy my New Year's Eve dinner, so don't expect me for about an hour. Think about that too, huh? :-)

P.S. 2: I haven't actually used Tauon for over three months, in favor of gmusicbrowser for which I just spent over two months giving it its very first graphic theme (https://www.pling.com/p/2230712/).

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

I don't understand what difference you make between this:

#1145 (comment)

The prebuilt image has this extra crash on launch at the moment, thanks for getting back, I'll yeet libwayland from the images then + made a report upstream as that seems like an odd default to me pyinstaller/pyinstaller#8963

There remains the annoying obligation to click twice in the mode menu and, apparently only in Mini mode, twice on the ˅ icon to exit it.

I've noticed that in the input forms in the Accounts menu too, presumably a Wayland exclusive issue then.

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

Back on Xorg, I confirm that the 2-clicks problem is not there. However, under the previous conditions (archive from https://github.com/Taiko2k/Tauon/actions/runs/12559236662, the 4 libwayland* files deleted and Tauon launched from the "Tauon Music Box" file, but this time on Xorg), resizing crashes Tauon (as soon as the cursor is released). This bug is completely new! :-(

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

Got the log?

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

[...]
2024-12-31 16:28:58 [ INFO  ] [  t_main  ] Window overscale!
2024-12-31 16:28:58 [ INFO  ] [  t_main  ] Message: Échelle d'IU anormale détectée.L'option a été réinitialisée à 1x
2024-12-31 16:28:58 [ INFO  ] [  t_main  ] Done rendering icons
Traceback (most recent call last):
  File "tauon/__main__.py", line 442, in <module>
  File "tauon/__main__.py", line 439, in main
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "tauon/t_modules/t_main.py", line 44223, in <module>
  File "tauon/t_modules/t_main.py", line 41827, in update_layout_do
  File "tauon/t_modules/t_main.py", line 41813, in reload_scale
  File "tauon/t_modules/t_main.py", line 896, in reload
TypeError: WhiteModImageAsset.__init__() takes 1 positional argument but 2 positional arguments (and 2 keyword-only arguments) were given
[PYI-40982:ERROR] Failed to execute script '__main__' due to unhandled exception!
2024-12-31 16:28:58 [WARNING] [ warnings ] asyncio/base_events.py:759: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>
 (warnings.py:110)

(Message: Échelle d'IU anormale détectée.L'option a été réinitialisée à 1x = Message: Abnormal UI scale detected. Option has been reset to 1x)

2nd try, this time after maximizing the Tauon window:

[...]
2024-12-31 16:30:17 [ INFO  ] [  t_main  ] Rendering icons...
2024-12-31 16:30:17 [ INFO  ] [  t_main  ] Done rendering icons
Traceback (most recent call last):
  File "tauon/__main__.py", line 442, in <module>
  File "tauon/__main__.py", line 439, in main
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "tauon/t_modules/t_main.py", line 44223, in <module>
  File "tauon/t_modules/t_main.py", line 41827, in update_layout_do
  File "tauon/t_modules/t_main.py", line 41813, in reload_scale
  File "tauon/t_modules/t_main.py", line 896, in reload
TypeError: WhiteModImageAsset.__init__() takes 1 positional argument but 2 positional arguments (and 2 keyword-only arguments) were given
[PYI-41198:ERROR] Failed to execute script '__main__' due to unhandled exception!
2024-12-31 16:30:17 [WARNING] [ warnings ] asyncio/base_events.py:759: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>
 (warnings.py:110)

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

That would be something I recently broke in that PR, thanks for catching that.

https://github.com/Taiko2k/Tauon/actions/runs/12561355455?pr=1361

This build should work fine, not requiring any deletion, hopefully with zero crashes.

The X scaling bug this issue is originally about is still present, as I have no clue how to fix that one…

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

The "Copy title to clipboard" option at the bottom of the display modes menu (with an empty playlist) crashes Tauon with:

[...]
Traceback (most recent call last):
  File "tauon/__main__.py", line 442, in <module>
  File "tauon/__main__.py", line 439, in main
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module
  File "tauon/t_modules/t_main.py", line 47252, in <module>
  File "tauon/t_modules/t_main.py", line 8343, in render
  File "tauon/t_modules/t_main.py", line 22964, in copy_bb_metadata
AttributeError: 'NoneType' object has no attribute 'title'
[PYI-44076:ERROR] Failed to execute script '__main__' due to unhandled exception!
2024-12-31 16:55:15 [WARNING] [ warnings ] asyncio/base_events.py:759: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>
 (warnings.py:110)

One more effort, and you will have earned a good New Year's Eve! :-)

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

The great news is that, even if you don't know why, the resizing problem has disappeared! Chill the champagne!

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

The great news is that, even if you don't know why, the resizing problem has disappeared!

That'd be because I fixed the issue in the log you sent :)

The "Copy title to clipboard" option at the bottom of the display modes menu (with an empty playlist)

I fixed it but I had no clue how you're summoning it until I realized it's another bug I am not dealing with right now :/ #1368

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

I fixed it

Are you saying there is a new fixed version available for download somewhere, so I can test it?

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

It's still the device branch in my fork, also viewable in this PR - #1361

Would be this build - https://github.com/Taiko2k/Tauon/actions/runs/12561839441

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

Sorry... but with the version downloaded just now at https://github.com/Taiko2k/Tauon/actions/runs/12561839441 the resizing is lost (but no problem with the "Copy title to clipboard" option) :

[...]
2024-12-31 18:16:18 [ INFO  ] [  t_main  ] Rendering icons...
2024-12-31 18:16:18 [ INFO  ] [  t_main  ] Done rendering icons
2024-12-31 18:16:28 [ INFO  ] [  t_main  ] Window overscale!
2024-12-31 18:16:28 [ INFO  ] [  t_main  ] Message: Échelle d'IU anormale détectée.L'option a été réinitialisée à 1x
2024-12-31 18:16:28 [ INFO  ] [  t_main  ] Done rendering icons
2024-12-31 18:16:30 [ INFO  ] [  t_main  ] RESTORE FULL

@C0rn3j
Copy link
Collaborator

C0rn3j commented Dec 31, 2024

Ahh, I thought you mean crash during resizing, not the scaling setting persisting.

That's not fixed, but am glad that the crashing is at bay for now.

@toto789
Copy link
Contributor Author

toto789 commented Dec 31, 2024

Sorry... but you still don't deserve a single aperitif!
As a reminder, the title of this report is:
"GUI scaling is reset when switching view modes". You haven't moved forward an inch!
What time is it where you are? Do you still have time to do it?

I tested Tauon very well, so I'm on my 2nd aperitif! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants