Closed explosion-mental closed 2 months ago
Can you "echo $XDG_RUNTIME_DIR" in a terminal ?
$ echo $XDG_RUNTIME_DIR
/home/explo/.local/runtime
Can you edit the file "/usr/lib/python3.12/asyncio/streams.py", line 113, in start_unix_server,
adding a print("path")
as follows:
print("PATH:", path)
return await loop.create_unix_server(factory, path, **kwds)
And then reply with the path which has been printed ?
damn
PATH: /home/explo/.local/runtime/hypr/cba1ade848feac44b2eda677503900639581c3f4_1716045925_1423382486/.pyprland.sock
Unhandled exception:
...
should I restore to default XDG_RUNTIME_DIR ?
It looks like a pretty low limitation on your system... 109 characters aren't that much... After some research it looks like the limit for unix paths is very short, so it's not specific to your system and I can imagine this can happen to more people. I'll try to mitigate it.
I can try to shave a few characters but I'm surprised you didn't get issues with other tools communicating with hyprland... maybe it's a matter of one character or two... sorry to ask you another test:
In pyprland/command.py, if you replace
CONTROL = f"{IPC_FOLDER}/.pyprland.sock"
with
CONTROL = f"{IPC_FOLDER}/.pypr.sock"
is that still failing somewhere else ? (you'll need to restart pypr completely to apply the new socket path on the daemon too)
I can think about a better improvement, but it will take more time which I don't have today, but now the problem is clear at least and there are some solutions I can think of.
Pushed something really quick & dirty, probably not the final fix, hope it helps! (you'll need to use the -git package)
I finally procrastinated & didn't do what was supposed to keep me busy... can you confirm the latest git version fixes your problem ?
I finally procrastinated & didn't do what was supposed to keep me busy... can you confirm the latest git version fixes your problem ?
I understand this feeling 😿
Is something deprecated? I get that toggle isn't found, 2 times after that it disconnects from the coekts:
Failed to open control socket, is pypr daemon running ?
Command failed.
The path problems seems to be solved tho.
Nope, toggle should work... Is it also happening with the first version of the fix?
EDIT: rather check the pypr daemon logs while launching commands in a terminal... I don't think it's related to this change
Not sure what happen, but everything works now (probably some issue with owning the socket). Thanks :]
Do you have a chance to run:
python -c "import os; print(os.pathconf('/', 'PC_PATH_MAX'))"
python -c "import os; print(os.pathconf('/tmp', 'PC_PATH_MAX'))"
... and tell what are the printed values ?
Or just use the latest git version and tell me if it breaks...
The problem seems to come up again tho, I just updated to lastest hyprland-no-systemd-git
and -pyprland-git` pkges.
pyprland version: 2.3.5-13
Really ?! I'm so disappointed...
Can you try tweaking MAX_SOCKET_PATH_LEN = 108
in the common.py
file, is 107 making it work ? or a lower value ?
Just in case it was my mistake introducing a difference of 1 AND you are exactly on the limit, you can also try the latest git version...
I just leave XDG_RUNTIME_DIR
alone again. Even Hyprland event socket was throwing out errors (failed to set up), which is the reason why sometimes I got "command not found: toggle", since it couldn't event comunicate with hyprland (I suppose..).
$ echo $XDG_RUNTIME_DIR
/run/user/1000
I can only think runtime dir that I have assign to require some special treatment, like being a tmpfs or the like. I'm not really sure. But finishing the last comment, restoring (or not defining the env var to anything else) XDG_RUNTIME_DIR seems to work out.
Pyprland version 2.2.20
Describe the bug Running
pypr
causes an error, being unable to run the daemon as usual. I tried bothpyprland
andpyprland-git
from AUR.To Reproduce Steps to reproduce the behavior:
pypr
Expected behavior
pypr
command to work normally.Additional context