nvdweem / PCPanel

Third party/community managed controller software for the PCPanel (getpcpanel.com) devices.
Other
93 stars 6 forks source link

How to get correct Process name under Arch Linux, particularly for Steam games? #48

Open sandivuk opened 1 year ago

sandivuk commented 1 year ago

I am successfully running the .jar version of PCPanel on Arch Linux. The App Finder does not appear to work or present any apps however, so I have been forced to guess the correct names of apps to be able to control their volume. For example, Spotify is pretty easy, the process name is just "spotify".

I am having trouble however getting any Steam games to work with this. I have tried a bunch of different process names I can find through the system, including tray name, task manager name, process ID, etc. I wonder if there is some separation layer as the games are running through Steam Proton compatibility layer.

I have tried just adding Steam (and variations thereof: "steam" "steam.exe" "Steam (Runtime)" etc) but that did not do it.

Any advice?

Same behavior in both 1.6 and 1.7-SNAPSHOT

nvdweem commented 1 year ago

That the process picker isn't showing anything but that controlling the sound works is a strange combination. Are there any errors in the logs?

The software calls pactl list sink-inputs to get all processes that are playing audio. From that command it gets the process name from the keys with application.process.binary. To get the options that you can put in the field you should be able to call:

pactl list sink-inputs | grep application.process.binary
sandivuk commented 1 year ago

Thanks for the response. The commands you shared do show the processes that I need for control. For Proton Steam games, the command outputs "Wine64-preloader" as the process that is playing audio, however inputting that into the App Volume controls doesn't control the audio volume at all. This does work for other outputs, like "spotify" and "freetube"

Regarding the App Finder, at the moment I can't get the App Finder to open. Sometimes it does after a reboot, sometimes it doesn't. Here is what the terminal shows when I launch the .jar and when I click the App Finder:

java --module-path="/home/vukos/my_utilities/pcpanel/javafx-sdk-18.0.2/lib" --add-modules=javafx.controls,javafx.fxml --add-exports javafx.controls/com.sun.javafx.scene.control.skin.resources=ALL-UNNAMED --add-exports javafx.base/com.sun.javafx.event=ALL-UNNAMED -jar -Ddisable.tray /home/vukos/my_utilities/pcpanel/pcpanel-1.7-SNAPSHOT.jar

10:32:23.517 [File Checker Thread] INFO com.getpcpanel.util.FileChecker -- File checker started
2023-06-15T10:32:23.862-05:00  INFO 11998 --- [JavaFX-Launcher] o.s.boot.SpringApplication               : Starting application using Java 20.0.1 with PID 11998 (/home/vukos/my_utilities/pcpanel/pcpanel-1.7-SNAPSHOT.jar started by vukos in /home/vukos/my_utilities/pcpanel)
2023-06-15T10:32:23.863-05:00  INFO 11998 --- [JavaFX-Launcher] o.s.boot.SpringApplication               : No active profile set, falling back to 1 default profile: "default"
2023-06-15T10:32:24.236-05:00  INFO 11998 --- [JavaFX-Launcher] com.getpcpanel.util.FileUtil             : Using root: /home/vukos/.pcpanel
2023-06-15T10:32:24.648-05:00  INFO 11998 --- [JavaFX-Launcher] o.s.boot.SpringApplication               : Started application in 0.989 seconds (process running for 1.34)
2023-06-15T10:32:24.655-05:00  INFO 11998 --- [lication Thread] com.getpcpanel.MainFX                    : Starting v1.7-SNAPSHOT
2023-06-15T10:32:24.866-05:00  INFO 11998 --- [lication Thread] com.getpcpanel.hid.DeviceScanner         : Starting HID services.
2023-06-15T10:32:24.947-05:00  INFO 11998 --- [va event worker] com.getpcpanel.hid.DeviceScanner         : FOUND PCPANEL : HidDevice [path=0003:0004:00, vendorId=0x483, productId=0xa3c4, serialNumber=2038375A4B56, releaseNumber=0x200, manufacturer=PCPanel Holdings LLC, product=PCPanel Mini 1.0, usagePage=0x0, usage=0x0, interfaceNumber=0]
2023-06-15T10:32:24.947-05:00  INFO 11998 --- [lication Thread] com.getpcpanel.hid.DeviceScanner         : Enumerating attached devices...
Exception in thread "JavaFX Application Thread" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-20-openjdk/lib/libawt_xawt.so
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2408)
        at java.base/java.lang.Runtime.load0(Runtime.java:817)
        at java.base/java.lang.System.load(System.java:2015)
        at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
        at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
        at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:259)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:249)
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2413)
        at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:880)
        at java.base/java.lang.System.loadLibrary(System.java:2051)
        at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1384)
        at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1382)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
        at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1381)
        at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1419)
        at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1393)
        at java.desktop/sun.awt.AppContext$2.run(AppContext.java:273)
        at java.desktop/sun.awt.AppContext$2.run(AppContext.java:262)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
        at java.desktop/sun.awt.AppContext.initMainAppContext(AppContext.java:262)
        at java.desktop/sun.awt.AppContext$3.run(AppContext.java:315)
        at java.desktop/sun.awt.AppContext$3.run(AppContext.java:298)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
        at java.desktop/sun.awt.AppContext.getAppContext(AppContext.java:297)
        at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:123)
        at java.desktop/javax.imageio.ImageIO.<clinit>(ImageIO.java:64)
        at com.getpcpanel.ui.AppFinderDialog.getDefaultImage(AppFinderDialog.java:116)
        at com.getpcpanel.ui.AppFinderDialog.toBufferedImage(AppFinderDialog.java:111)
        at com.getpcpanel.ui.AppFinderDialog.getImage(AppFinderDialog.java:124)
        at com.getpcpanel.ui.AppFinderDialog.postInit(AppFinderDialog.java:154)
        at com.getpcpanel.ui.AppFinderDialog.initUI(AppFinderDialog.java:64)
        at com.getpcpanel.ui.AppFinderDialog.initUI(AppFinderDialog.java:43)
        at com.getpcpanel.ui.FxHelper.open(FxHelper.java:45)
        at com.getpcpanel.ui.FxHelper.buildAppFinderDialog(FxHelper.java:82)
        at com.getpcpanel.ui.PickProcessesController.showAppFinder(PickProcessesController.java:137)
        at com.getpcpanel.ui.PickProcessesController.lambda$createProcessRow$7(PickProcessesController.java:110)
        at javafx.base@18.0.2/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at javafx.base@18.0.2/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
        at javafx.base@18.0.2/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at javafx.base@18.0.2/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at javafx.base@18.0.2/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
        at javafx.base@18.0.2/javafx.event.Event.fireEvent(Event.java:198)
        at javafx.graphics@18.0.2/javafx.scene.Node.fireEvent(Node.java:8797)
        at javafx.controls@18.0.2/javafx.scene.control.Button.fire(Button.java:203)
        at javafx.controls@18.0.2/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:208)
        at javafx.controls@18.0.2/com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
        at javafx.base@18.0.2/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
        at javafx.base@18.0.2/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
        at javafx.base@18.0.2/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
        at javafx.base@18.0.2/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at javafx.base@18.0.2/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at javafx.base@18.0.2/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at javafx.base@18.0.2/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at javafx.base@18.0.2/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.base@18.0.2/javafx.event.Event.fireEvent(Event.java:198)
        at javafx.graphics@18.0.2/javafx.scene.Scene$MouseHandler.process(Scene.java:3881)
        at javafx.graphics@18.0.2/javafx.scene.Scene.processMouseEvent(Scene.java:1874)
        at javafx.graphics@18.0.2/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2607)
        at javafx.graphics@18.0.2/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411)
        at javafx.graphics@18.0.2/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
        at javafx.graphics@18.0.2/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450)
        at javafx.graphics@18.0.2/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
        at javafx.graphics@18.0.2/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449)
        at javafx.graphics@18.0.2/com.sun.glass.ui.View.handleMouseEvent(View.java:551)
        at javafx.graphics@18.0.2/com.sun.glass.ui.View.notifyMouse(View.java:937)
        at javafx.graphics@18.0.2/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at javafx.graphics@18.0.2/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:316)
        at java.base/java.lang.Thread.run(Thread.java:1623)
nvdweem commented 1 year ago

The first Google result about the error that's in the log is from StackOverflow where the issue seems to be that a headless Java is installed. In your case it's running java-20-openjdk, so following the instructions from StackOverflow sudo apt install openjdk-20-jdk should fix this specific issue.

That the volume isn't changing is, again, strange. Is it possible to change the volume of the games via the regular UI (using the process slider, not the master volume)? Does moving the knob/slider move the software slider in the regular UI for the steam games?

sandivuk commented 1 year ago

Alright installing openjdk 20 seemed to do the trick and I can use the App Finder now. Please see the screenshot below, where I have a Proton steam game and Spotify running. You can see "spotify" clearly outputting audio and then two blank audio sources. Those two appear to correspond to the running game but show no text string as you can see, nor does clicking on them do anything besides closing the App Finder window

image

EDIT: I'm not sure what you mean by changing the volume of games via the regular UI. I am able to turn knobs on the physical device and can see the knobs turn in the PCPanel UI, and they are able to control volume on audio devices and apps like spotify

nvdweem commented 1 year ago

With the regular UI, I mean the standard Arch volume controls: image If those don't work then the PCPanel software won't be able to control the volume either. If there are multiple sliders for the game and only 1 moves then that would be an indication too.

Steam games don't seem to start in my Arch VM so I'll have to see if I can run a game in a different way to see what could be happening.

sandivuk commented 1 year ago

Oh I see what you mean. Yes controlling the game volume does work using the Arch UI and there is only one slider for the game

tastelessbrain commented 3 months ago

I am successfully running the .jar version of PCPanel on Arch Linux. The App Finder does not appear to work or present any apps however, so I have been forced to guess the correct names of apps to be able to control their volume. For example, Spotify is pretty easy, the process name is just "spotify".

I am having trouble however getting any Steam games to work with this. I have tried a bunch of different process names I can find through the system, including tray name, task manager name, process ID, etc. I wonder if there is some separation layer as the games are running through Steam Proton compatibility layer.

I have tried just adding Steam (and variations thereof: "steam" "steam.exe" "Steam (Runtime)" etc) but that did not do it.

Any advice?

Same behavior in both 1.6 and 1.7-SNAPSHOT

Hey you, :) i know this post is old as hell, but it seems you figured out something that i can't. I'm struggling to get it to run on Arch. The UI is starting, the position of the individual dials is read and displayed correctly but i cant get the device and process finder to work. I cant even control default device volume.

Any tips for me? If this here is too old we can also open an new thread or talk over discord or something. :) Have a nice day.

PS that from my terminal-output when starting the 1.7 snapshot an when trying to configure the profile: (java:1075514): GLib-GObject-CRITICAL : 12:16:32.211: g_object_ref: assertion 'G_IS_OBJECT (object)' failed (java:1075514): GLib-GIO-CRITICAL : 12:16:32.211: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed