ifreund changed the topic of #river to: river - a dynamic tiling wayland compositor || https://github.com/riverwm/river || channel logs: https://libera.irclog.whitequark.org/river/
eShaev9z_ has joined #river
eShaev9z has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 246 seconds]
angry_vincent has joined #river
angry_vincent has joined #river
jao has quit [Ping timeout: 265 seconds]
haliucinas2 has joined #river
haliucinas has quit [Ping timeout: 246 seconds]
haliucinas2 is now known as haliucinas
upsala has joined #river
haliucinas has quit [Quit: haliucinas]
haliucinas has joined #river
Ordoviz has joined #river
pinpoxIRC has joined #river
<pinpoxIRC> Hey, is there a command to get the current outputs/tags/windows configuration of river, preferably as json?
<pinpoxIRC> I want to programatically get the current state to be able to manipulate it externally with riverctl in a script or program
<ifreund> pinpoxIRC: no, that doesn't exist yet unfortunately
<ifreund> it is planned to move this information ouf of river into the layout generators eventually, hopefully for the 0.4.0 release
upsala has quit [Remote host closed the connection]
<pinpoxIRC> ifreund: damn, :( I thought that would be a no-brainer. Is that something that riverctl could/should do as a sub-command?
<pinpoxIRC> In i3 that is https://man.archlinux.org/man/community/i3-wm/i3-save-tree.1.en, or you can do it with i3-msg. How much work would it be to implement a subcommand for rivertile that does this?
<leon-p> pinpoxIRC: as I just also said in the github comment, we don't do scripting by dumping JSON, but rather by just exposing events and requests in our protocol extensions and letting people write wayland clients
<leon-p> for example, we could add a protocol extension that extends the new ext-foreign-toplevel-info protocol (once it lands) to advertise the tags of toplevels ("windows")
<leon-p> there is no way yet to see the tags of a specific window, but maybe take a look at what is already possible with river-status and river-control, it may already be good enough for your use case
<pinpoxIRC> Oh ok, Is there any simple example on how this would look? I'm a bit new to river and wayland in general, I dont really know where to start to build something like this
<leon-p> hmm... "simple" is a tough one, because Wayland is pretty boilerplaty. riverctl is a wayland client, as an example
<pinpoxIRC> Hm ok. Maybe I have to find a good resource that explains wayland fundamentals first. I get river-status and river-control are protocols I just don't have a clue where/how those are exposed or how I can use it to interact with river
<pinpoxIRC> Thanks, that looks like a code I can try to understand
jao has joined #river
<pinpoxIRC> Noob question, but is there a way to read the protocol documents in a nicer way?
<pinpoxIRC> I'm just looking at the xml from github
<leon-p> I think there is a website around that auto-generates docs from them, but most people just read the XML
<leon-p> oh, you may need to know: request: the client sends the server a message; event: server sends client a message
Ordoviz has quit [Ping timeout: 268 seconds]
<pinpoxIRC> And "server" is river in this case?
<leon-p> yes
<pinpoxIRC> Ok, nice. I just stumbled across this, which looks like a good introduction https://wayland-book.com/introduction.html
<leon-p> oh, yeah I always forget that exists
<leon-p> although I do recommend checking out the supported events and requests first and making sure they allow you do implement what you want before you go on a Wayland learning tangent :)
<pinpoxIRC> Ok, thanks for the hint. Might take me a while to check everything out
<pinpoxIRC> Just out of curiousity: Do you use a multi-head workflow with river and how would you do something like showing a different tag on a non-focused monitor?
<pinpoxIRC> I'm still not 100% sure if I want to actually change the behaviour or I just haven't fully grasped the workflow with river's "native" tag-style
<leon-p> I have two screens. For showing a different tag on a non-focused monitor, I first focus the monitor and then show the tag. Although probably not the answer you want :)
<pinpoxIRC> Ok, so that would be e.g. "Super+," "Super+3" with the default bindings, right?
<leon-p> yes
<leon-p> I guess you could script it, since `focus-output` either wraps with "left|right" or can be given output names, but it may be slightly hacky
<leon-p> However anything that involves operating based on the tags of a window is not possible right now
<leon-p> whoops, not left|right but next|previous
<pinpoxIRC> So you cannot script something like "Activate tag y for window x and disable all it's other tags"
<pinpoxIRC> hm
<leon-p> no. while desirable behavour, that is blocked by a number of things
<pinpoxIRC> Ok, I see
upsala has joined #river
<leon-p> FWIW we are aware of these limitations and they certainly are on my list of things to do eventually
<pinpoxIRC> I wish I could help, maybe if I manage to get into wayland more.
<leon-p> "focus tag y for output x" would be possible to implement right now, however that would require breaking protocol changes.
<pinpoxIRC> I don't know if I'm the only one wanting i3-style tag/workspace management and can't judge if breaking protocols would be worthwile
<pinpoxIRC> Are there cases where the current workflow is easier/better/simpler than a shared set of tags for all outputs?
<leon-p> that's a hard question, because this is a very subjective thing
<pinpoxIRC> yeah probably.
<leon-p> I personaly find the i3 way of managing workspaces across multiple outputs to be utterly atrocious in literally all cases, for example :)
<pinpoxIRC> hahaha
<pinpoxIRC> how so, I'm genuinly interested
<pinpoxIRC> what is your pain-points
<leon-p> just doesn't map very well to the way I think
<leon-p> When I put a window on tag 2 on the right screen, I don't remember it as being on tag 2, I first remember it as being on the right screen.
<pinpoxIRC> ah that makes sense
<pinpoxIRC> What do you think about a "simplified" i3 style: Instead of creating the workspaces on-the-fly on the current output if non-existing, just have a shared but assign them to fixed monitors.
<pinpoxIRC> e.g. if i have 3 screens:
<pinpoxIRC> tag 1,2,3 are screen one, tag 4,5,6 screen 2, tag 7,8,9 on screen 3
<leon-p> I think, that we can all have our way when this is moved to the layout generators as well. If river has no concept of tags or workspaces, everyone can do whatever they want and be happy :)
<pinpoxIRC> I guess what i prosed is currently not possible aswell, right?
<leon-p> You can script that maybe, kinda
<leon-p> create a shell script, that when focusing tags 1 to 3 first calls `riverctl focus-output <name of first output>` and for tag 4 to 6 first calls `riverctl focus-output <name of second output>` etc...
<pinpoxIRC> That would be my dream-behavior actually. I don't ever need more that 9 tags in total, 3 per screen would be totally enough for me. It would work around the issue you have with "remembering what tag a window is on" which I share, and also allow to switch to any tag on any window with just one keyboard shortcut instead of having to change screen,
<pinpoxIRC> then tag
<pinpoxIRC> > create a shell script, that when focusing tags 1 to 3 first calls `riverctl focus-output <name of first output>` and for tag 4 to 6 first calls `riverctl focus-output <name of second output>` etc...
<pinpoxIRC> Yes! That is exactly what i want
<leon-p> note that it will behave weirdly though when you try to move a window from screen to another, you'd also need a script for that
<leon-p> as an example
<leon-p> use like this: ./focus.sh <number of tag>
Ordoviz has joined #river
Ordoviz has quit [Client Quit]
<pinpoxIRC> Thanks!
notzmv has joined #river
waleee has joined #river
dbuckley has joined #river
waleee has quit [Ping timeout: 256 seconds]
pkap has joined #river
waleee has joined #river
pkap has quit [Quit: Client closed]
Szadek has quit [Ping timeout: 276 seconds]
Szadek has joined #river
Szadek has quit [Client Quit]
Szadek has joined #river
Szadek has quit [Ping timeout: 256 seconds]
Szadek has joined #river
angry_vincent has quit [Remote host closed the connection]
upsala has quit [Remote host closed the connection]
taupiqueur has joined #river
jao has quit [Remote host closed the connection]
notzmv has quit [Ping timeout: 264 seconds]
jao has joined #river
<pinpoxIRC> Hey, I've run into an issue and I'm not sure if it is a river bug: I've tried all the tools listed under "Recommended Software" But none of them are able to set the resolution/rate for one of my monitors. I only get the result "failed to apply changes" and not much more info. Is there somewhere I can check for more information/debgugging?
<leon-p> a river log would be helpful
<leon-p> river -log-level debug
<pinpoxIRC> is that printed to stdout or written to a file?
<leon-p> to stderr
<pinpoxIRC> ok, I'll exit river then, and re-start it with river -log-level debug > log.txt
<pinpoxIRC> one sec.
<leon-p> you'll need 2>
<leon-p> not >
<leon-p> since you want to route stderr to a file, not stdout
<pinpoxIRC> leon-p:
<pinpoxIRC> it is quite log, but I ran river only for like 10 seconds.
<pinpoxIRC> I did:
<pinpoxIRC> - run wdisplays
<pinpoxIRC> - start a terminal with wofi
<pinpoxIRC> - river -log-level debug > riverlog.txt 2>&1
<pinpoxIRC> - re-arrange and set resolution, click apply -> error pops up
<pinpoxIRC> - copy the logfile
<leon-p> i'll have a look
Guest6397 has joined #river
<pinpoxIRC> Let me know if I can provide any additional information. The correct layout would be:
<pinpoxIRC> [eDP-1: 1920x1080@60Hz] [DP-2: 2560x1440@165Hz] [DP-1: 2560x1440@60Hz]
<pinpoxIRC> (both usb-c monitors)
<leon-p> in the mean time, can you try wlr-randr? I am not sure, but I faintly remember that one of the graphical ones was kinda broken, while wlr-randr definitely works
<pinpoxIRC> yes, I'll try. I did before, but I can record the log file
<leon-p> hmmm... I don't think we actually print any useful debug messages, fun :)
<pinpoxIRC> this is from wlr-randr --output eDP-1 --mode 1920x1080 --output DP-1 --on --mode 2560x1440 --output DP-2 --mode 2560x1440 --on
<pinpoxIRC> it just says "failed to apply configuration"
Guest6397 has quit [Quit: Client closed]
<leon-p> ok, just as a sanity check, the mocdes you try to use, are they known?
<leon-p> if you just run wlr-randr, do they get printed?
<leon-p> otherwise you need a custom mode
<pinpoxIRC> That are the modes
<pinpoxIRC> Also: I was running the same mode on xserver before
<leon-p> well, the logs tell me the issue is output DP-2
<pinpoxIRC> And what is the issue?
<leon-p> that the logs don't tell me
<pinpoxIRC> hahaha
<leon-p> maybe try --custom-mode instead?
<pinpoxIRC> same error
<pinpoxIRC> just for reference, this works when on Xserver:
<pinpoxIRC> --output HDMI-2 --off
<pinpoxIRC> --output DP-1 --mode 2560x1440 --pos 4480x0 --rotate normal \
<pinpoxIRC> xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal \
<pinpoxIRC> --output DP-2 --mode 2560x1440 --pos 1920x0 --rotate normal --rate 164.54 \
<pinpoxIRC> --output HDMI-1 --off \
<leon-p> eDP-1 sounds like a laptop thing. you don't by any change are using a USB-C dock?
<pinpoxIRC> no usb-c dock
<pinpoxIRC> just two monitors plugged into two usb-c ports
<pinpoxIRC> Also, both monitors work, it's just that one on DP-2 cant change resolution
<leon-p> just as a test, can you try to change to a /lower/ resolution on DP-2?
<pinpoxIRC> I can one sec
<pinpoxIRC> I just disconnected DP-1, now I can set DP-2 to what I want
<pinpoxIRC> I'll try reconnectign again and setting a low res
<pinpoxIRC> leon-p: hm, I now plugged in DP-1 again and it wont turn on
<leon-p> after that, can you try setting the desired high resolution again, but this time specify the refresh for both DP-1 and DP-2? For the higher res, the refresh is lower
<pinpoxIRC> wlr-randr --output eDP-1 --mode 1920x1080 --output DP-1 --on --mode 2560x1440 --output DP-2 --custom-mode 2560x1440 --on
<pinpoxIRC> unknown output DP-1
<leon-p> maybe it changed names? adaptor names aren't stable IIRC
<leon-p> (you can use devicce names instead, they are stable)
<pinpoxIRC> wlr-randr now does only show eDP1 and DP-2
<pinpoxIRC> I can kill river and see if it appears again
<leon-p> ah yes, then you managed to outsmart the driver :)
<pinpoxIRC> hahaha
<pinpoxIRC> It's intel graphic by the way, in case it makes a difference
<pinpoxIRC> So, what do I do now? restart river?
<leon-p> anyway, I think the problem you are having is bandwith. so I think you just need to explicitly enable a lower refresh rate for your external screens
<pinpoxIRC> okay
<leon-p> try restarting river, if that does not work, reboot
<pinpoxIRC> Just for understanding: why did that work in x then?
<leon-p> no idea
<leon-p> it probably did change the refresh rate on its own while wlroots won't
<pinpoxIRC> i'm back. My res is screwed again
<pinpoxIRC> (restarted river)
<leon-p> do both screens work at least?
<pinpoxIRC> yes
<leon-p> that's a start :)
<pinpoxIRC> That is the state I had at the beginning again: wrong res, cant' change
<pinpoxIRC> Should i try:
<pinpoxIRC> wlr-randr --output eDP-1 --mode 1920x1080@60 --output DP-1 --on --mode 2560x1440@60 --output DP-2 --mode 2560x1440@60 --on
<pinpoxIRC> (explicit 60hz on all)
<leon-p> yeah, that's my best bet
<pinpoxIRC> unknown mode: 1920x1080@60
<leon-p> yeah, then leave it for the laptop screen
<pinpoxIRC> unknown mode: 2560x1440@60
<leon-p> try 59
<pinpoxIRC> nope.
<pinpoxIRC> I tried with all the decimal places too
<pinpoxIRC> that gives a different error
<pinpoxIRC> failed to apply configuration
<leon-p> well, you could try in wdisplays again. setting it to a high res but lower refresh rate
<pinpoxIRC> ok
<pinpoxIRC> Nope, fails aswel
<leon-p> maybe the other external monitor is already at the high resolution plus high refresh rate and thus leaves not enoug bandwidth, try turning it down first
<pinpoxIRC> ok turning rate down worked. I'll try setting res now
<pinpoxIRC> nope
<leon-p> hmm
<pinpoxIRC> Fials to apply
<leon-p> unfortunately then I have no ideas
<leon-p> the lower parts of the graphics stack is all magic as far as I am concerned
<pinpoxIRC> Is it a river-specific bug though?
<leon-p> no
<leon-p> shouldn't be
<pinpoxIRC> Where whould be the correct place to report this?
<leon-p> there is #wlroots, although I guess that's more for development, not user issues
<pinpoxIRC> I don't want to bother people, but this seems like a bug imho
<leon-p> It's annoying that we don't print any helpful logs here...
<pinpoxIRC> Do you know how to add them?
<pinpoxIRC> I can run a custom version with more logging if you know how to dadd them
<leon-p> unfortunately no idea. I don't think we get that information from wlroots
<leon-p> anyway, maybe ifreund has an idea
<pinpoxIRC> leon-p:
<pinpoxIRC> I fixed it!
<leon-p> oh!
<pinpoxIRC> well it's more of a workaround
<leon-p> howß
<pinpoxIRC> I added:
<pinpoxIRC> export WLR_DRM_NO_MODIFIERS=1 & river
<pinpoxIRC> to start
<pinpoxIRC> that was from a random comment in the wlroots gitlab issues
<pinpoxIRC> that had a similar problem
<pinpoxIRC> I have no idea what that does though
<leon-p> I see. Don't expect me being able to explain what that does though :)
<pinpoxIRC> hahah
<leon-p> anywayy, glad it works for you now
<pinpoxIRC> Thank you for all the pointers
<leon-p> no problem!
<pinpoxIRC> I'll try to figure out what that even is, seems more like a hackish workaround that an actual fix
<leon-p> If you like, you can also create an entry in our github wiki for this workaround, maybe other people need it as well
<leon-p> sidenote, it would be kinda neat if we could auto-convert the wiki to manpages so we could make all that information available offline as well, but that is a bit of a tangent
<pinpoxIRC> I'll add a comment later!
<pinpoxIRC> BTW, this was the find:
<pinpoxIRC> last comment, not much info. But seems to be somethign bandwith-related after all
<leon-p> considering you seem to have encountered the same problem and the original bug reporter never reported back whether it worked, you could drop a small comment that this worked for you
<ifreund> I like having the wiki separate from the man pages, the wiki isn't anywhere near as curated but has plenty of useful information
<ifreund> as for what exactly WLR_DRM_NO_MODIFIERS does, I think that depends on your hardware. Setting it may cause less effcient buffer formats and whatnot to be used, not entirely sure on the details.
<waleee> leon-p: pandoc hasn't something for markdown -> man-page format?
<waleee> though I guess it isn't available in github actions
<pinpoxIRC> ifreund: do you know if it has any specific drawbacks or there is a better fix, now that I know this solves the issue?
<ifreund> pinpoxIRC: I'm not terribly familiar with that level of the graphics stack, your best bet would be to comment on that wlroots issue
<pinpoxIRC> okay
<pinpoxIRC> I'm about to add the comment to the wiki, should it put it under FAQ/how do I configure my screens or do you have another preferred section?
<ifreund> a one liner there sounds fine to me
<pinpoxIRC> ok done
<ifreund> thanks :)