Closed nPHYN1T3 closed 11 months ago
Hi, thanks for the issue.
I've noticed the problem with the Processes view as well, it happens when the list is refeshed. I still haven't figured out why.
In regards to your other issues, can you please give more information about your setup and software? Which OS are you using? Did you install Palemoon, Waterfox, Brave and Tor through Flatpak or traditional package managers? What tray applets are you talking about exactly? What text editors and other programs are you talking about and how did you install them? Which GPUs are you using? Can you maybe send screenshots of the GPU and Applications tabs?
Arch/Garuda for OS
Everything is either AUR/Pacman or grab the archive and unzip to destination. If the question is based around something being sandboxed and hidden from being listed there should be nothing like that.
I mention the tray applets just because most times those are ignored from an "Application" list and only things with actual displayed Windows are listed. So it was odd the list has things like XPad, picom or Tint2 but ignores web browsers.
As for the missing editors, Lite-XL, NotepadQQ. All my open terms aren't listed (Sakura but with a unique WMClass) but it shows me a normal Sakura unarchiving something and a URXVT which has the wrong icon and should be displayed as Ranger.
https://github.com/nokyan/resources/assets/38122105/d9cfeaa3-a116-42e0-9bb4-83414181d565
Resources doesn't look at open windows since that wouldn't accommodate for background apps and probably wouldn't quite work for Wayland nor Flatpak, Resources instead looks at .desktop files in usual locations ($XDG_DATA_DIRS and .local/share) and checks, whether running processes can be matched by their executable name or cgroup (or Flatpak info if available) to an app with a .desktop file. This works actually way better for sandboxed processes since they usually contain more reliable information about the app. I'll install Arch in a VM later, install the missing apps you've mentioned and see what the problem could be. For the programs you've installed by unzipping, where did their .desktop file get installed to?
In regards to your extra GPU, I'll probably just blacklist "GPUs" with the simple-framebuffer driver, that should fix it. GPUs starting with 0 should be fixed with the next Resources update.
The polling for .desktop files gives me a clue about where this goes wrong. GTK broke MultiGPU "everything" years ago so I don't use .desktop files, I have to write wrapper scripts to work around GTK's lack of XScreen enumeration. That said some things show, some don't so there is still a mystery heh. I'd say don't waste your time figuring it out though. Sounds like you're designing for more of the "Canned" DE setups like KDE/Gnome/Enlightenment/XFCE/Cinnamon/Mate which are all incompatible with multiGPU systems now.
I can confirm that some running applications are not shown in the Applications view tab. I use Fedora 38 GNOME and Resources 1.3.0. For example, resources does not show Google Chrome installed from Google's repository and default Gnome Terminal from official repositories.
I have noticed that the process names and the executable path in the *.desktop files for those apps are different. Google Chrome has the following line in the /usr/share/applications/google-chrome.desktop
file:
Exec=/usr/bin/google-chrome-stable
However, the process is /opt/google/chrome/chrome
. The Gnome Terminal runner in /usr/share/applications/org.gnome.Terminal.desktop
is gnome-terminal
but actually, all terminal windows are handled by gnome-terminal-server
. Perhaps, there are more applications that are not shown due to it.
I can confirm that some running applications are not shown in the Applications view tab. I use Fedora 38 GNOME and Resources 1.3.0. For example, resources does not show Google Chrome installed from Google's repository and default Gnome Terminal from official repositories.
I have noticed that the process names and the executable path in the *.desktop files for those apps are different. Google Chrome has the following line in the
/usr/share/applications/google-chrome.desktop
file:Exec=/usr/bin/google-chrome-stable
However, the process is
/opt/google/chrome/chrome
. The Gnome Terminal runner in/usr/share/applications/org.gnome.Terminal.desktop
isgnome-terminal
but actually, all terminal windows are handled bygnome-terminal-server
. Perhaps, there are more applications that are not shown due to it.
I'll push a fix for GNOME Terminal and Google Chrome soon. As a workaround for Google Chrome right now you can install the Flatpak version of it, which will be recognized without any problems.
Thanks!
I saw you had maybe fixed things so I just built from source. It still misses things as well as lacks correct icons for some things it catches. It finds somethings, not others still. Never differentiates instances making action on a running application a craps shoot. It also doesn't seem to update correctly if I close an application it's picked up as running. I even made .desktop files for somethings but it still doesn't display them.
I saw you had maybe fixed things so I just built from source. It still misses things as well as lacks correct icons for some things it catches. It finds somethings, not others still. Never differentiates instances making action on a running application a craps shoot. It also doesn't seem to update correctly if I close an application it's picked up as running. I even made .desktop files for somethings but it still doesn't display them.
Resources will most likely not find apps if the app is not a Flatpak and the Exec line of the .desktop file does not point to the binary directly (e.g. if it points to a bash script that then opens a binary). And also, can you please give more details? Which apps? What "actions"? How do those custom .desktop files look like? Which icons are missing?
It finds Tor Browser but not running Water Fox or Pale Moon. The wrong/gibbed icon was something like Tint or Picom. "Actions" you know like KILL (the thing you're most likely to be doing when hunting apps in a task manager ;p). Custom .desktop files look like any other but rather than Exec=(path)Waterfox it will be Exec=(path)Waterfox.sh.
For things that it did see again it doesn't differentiate. This is strange given Resources enumerates GPU's so it's multi GPU aware but then doesn't denote processes by their XScreen or various methods to select a GPU for an Application. So like when I say it finds Tor Browser it only lists one instance and doesn't say what XScreen meaning if I kill it, will it kill all of them? The one on XScreen 0.0? XScreen 0.1 or XScreen 0.2? Because it listed the Tor Browsers I quit one, then the other, and another but nothing changed in Resources. Even after all instances had been closed and I confirmed with another task manager Resources still listed them as running.
Anyhow when I got the notification someone with the aforementioned "canned DE" was having similar/same issues as me and you were going to do some fixes I figured I'd try again. I saw the GPU 0 (frame buffer) was no longer listed and a few other changes but it's still fundamentally broken for me.
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=false
Exec=/path/2/scripts/waterfox.sh
Name=Waterfox
Comment=3 Instances of Waterfox
Icon=waterfox
"Actions" you know like KILL (the thing you're most likely to be doing when hunting apps in a task manager ;p).
Okay, I thought it had something to do with actions in .desktop files.
Custom .desktop files look like any other but rather than Exec=(path)Waterfox it will be Exec=(path)Waterfox.sh.
Yeah, those apps won't be found because of that.
doesn't denote processes by their XScreen
Resources finds multiple GPUs when there are multiple entries in /sys/class/drm/card, it doesn't interface with anything X11 related at all (and I'd prefer keeping it that way, X11 is deprecated) except for what GTK does when Wayland is not available.
or various methods to select a GPU for an Application
It'd depend on what the other methods are and if they are somehow possible to identify using just /proc. Resources currently doesn't account for that.
Because it listed the Tor Browsers I quit one, then the other, and another but nothing changed in Resources. Even after all instances had been closed and I confirmed with another task manager Resources still listed them as running.
Unfortunately I can't reproduce this on Fedora using Tor installed via rpm. Works as intended. Maybe I'll get a VM with Arch started soon, not today though.
Naw just the basic actions you'd be doing in a task manager heh. I've never written that fancy [Action] stuff in a .desktop file since it only seems to work with DE's that understand it. Given GTK broke Multi GPU functionality back around v3.1 I can't run a "canned DE." (90+% of DE/WM are GTK based and KDE is broken again as well) I run CTWM and a ton of self written utils. (Not even xdotool works correctly anymore.)
Yeah I figured they (the .desktop files) wouldn't work but when I initially reported the "it needs .desktop files to work" bit is a tad misleading since it needs a specific desktop file that matches the binary. This is kinda nuts for multi GPU because you'd need a .desktop file for every instance on every GPU oh hoooo, what a mess.
The GPU bit is a tad comedic in a sad way, not an issue on you but yeah, most things these days are pushing towards Wayland which means most things are now broken by design. Things that have worked for 20+ years are now broken by design. There was news Wayland was perhaps looking to fix the horrid design choice to make multi GPU a massive waste of resources back in May '23 but it still won't run at all much less using GPU's correctly. Wayland for Multi-GPU is like eating on the hood of a Ferrarri and calling the car a dinner plate.
Well the 'other methods' really depends on the GPU setup and what type of configs someone is using. For a laptop with dual GPU's a lot of people do that DRI_PRIME bit and a few other tools/methods. For me because my GPU's are not switched everything is denoted in my xconf and launched with DISPLAY=0.X. This is why everything is launched with scripts. The Scripts allow me to set GPU's, window placements and anything else that is now broken thanks to GTK.
I noticed that some running applications are not shown in the Applications view tab. I went to see if they were shown under processes and they are.
So for example the Applications tab/view shows tray applets and even my compositor but will not show several of my running web browsers or virt-manager. In fact I have Palemoon, Waterfox, Brave and Tor-Browser all running but the only one shown is Tor-Browser. There are also text editors and tons of terms missing from the list.
While I was looking for things under the Processes tab I noticed it would jump to the bottom as I tried to scroll through things to see if the missing applications were displayed. There is an inconsistent jump to the bottom that happens. Some times you can scroll fine, other attempts the scroll bar will jump to the bottom.
As a question I'd like to toss in the GPU ordering. In Resources it shows GPU0 GPU1 GPU2 for me but GPU0 is empty while 1 and 2 are my GPU's. Just curious why 0 is shown and or why the two in the system are 1 & 2 rather than 0 & 1?