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

Newer sway/wlroots name certain outputs randomly causing displays not to have a bg image #143

Closed
luispabon opened this issue Mar 25, 2021 · 13 comments · Fixed by #144
Closed
Labels
enhancement New feature or request

Comments

@luispabon
Copy link

luispabon commented Mar 25, 2021

Describe the bug
Looks like on the last versions of sway and wlroots, virtual outputs (like those on a thunderbolt dock) are named randomly. I have two displays on a thunderbolt dock that keep changing X where DP-X. Those outputs are virtual (one is in fact VGA and the other HDMI, but from the system's point of view they're displayport).

Anyhow the net result is that sometimes, when an output name is changed at random, I won't have a background image in there. For instance, this is the azotebg script before after I fixed it this morning because one of the displays somehow changed DP number after resuming from sleep:

# Before
 ~ cat .azotebg  
#!/usr/bin/env bash
pkill swaybg
swaybg -o DP-8 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill &
swaybg -o eDP-1 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill &
swaybg -o DP-7 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill &

# After
 ~ cat .azotebg 
#!/usr/bin/env bash
pkill swaybg
swaybg -o DP-7 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill &
swaybg -o eDP-1 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill &
swaybg -o DP-10 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill &

To Reproduce
It's pretty hard to reproduce, unless you have my setup exactly.

Expected behavior
The output names change, but obviously the display names remain the same. Perhaps the script could use these instead?

So instead of

swaybg -o DP-7 -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill

We could have:

swaybg -o "Iiyama North America PL2410HD 11046A0B03094" -i '/home/luis/Pictures/backgrounds/59853.jpg' -m fill

This is in fact the recommended method of configuring your display layouts in Kanshi so that you can have different setups off the same hardware ports (eg built in HDMI and eDP) as it's the only effective way to identify a particular screen.

Desktop (please complete the following information):

  • Linux distribution: Ubuntu 21.04
  • WM: Sway 1.6-rc2, wlroots master (pre 0.13)

Azote version (please state it clearly if you use -git version):
v1.9.0

@nwg-piotr
Copy link
Owner

This looks bad, and I wonder if it only affects outputs connected via Thunderbolt. One way or another, it should be submitted as the sway issue: the problem is swaybg-related. Well, they might have changed something in swaybg... I haven't yet seen the new sway.

@luispabon
Copy link
Author

Well it's the output port that keeps changing. I've no idea how that works internally in sway, but the dock's ports have always been reporting as display port, never mind they're HDMI, VGA (both that I use) or the actual DP and miniDP that are also present.

@nwg-piotr
Copy link
Owner

nwg-piotr commented Mar 25, 2021

Azote relies on swaybg. I'm not sure if we can use output generic names here. On my setup they look like this:

Output eDP-1 'Unknown 0xD0ED 0x00000000'
Output DP-1 'Unknown 2475WR 0x00000101'
Output HDMI-A-1 'Unknown 22V2WG5 0x00000074'

@nwg-piotr
Copy link
Owner

Alright, it seems we can. I'll take a closer look at this tonight. Will you help at testing?

@luispabon
Copy link
Author

Goes without saying 👍

@nwg-piotr
Copy link
Owner

Very well. I'm about to finish tuning nwg-panel. Will try to fix your issue as soon as it's done.

@nwg-piotr nwg-piotr added the enhancement New feature or request label Mar 25, 2021
@nwg-piotr
Copy link
Owner

nwg-piotr commented Mar 26, 2021

Would you be able to give a try to the display-names branch? I need to build the generic name out 3 fields like this:

'generic-name': "{} {} {}".format(output["make"], output["model"], output["serial"])

I'm not sure if it's going to always work as expected. If it does, I could just leave it as is. Otherwise we would need a switch - if to use output names or generic display names. But the first thing I need to know is if it works on your hardware.

@luispabon
Copy link
Author

luispabon commented Mar 26, 2021

Success!

recording.mp4

@nwg-piotr
Copy link
Owner

Very well. I think I should add the switch in settings anyway - just in case. I'll do it today or tomorrow and publish a new release. Can't promise this to be tonight, as I'm slightly obsessed with another project in Go. 😈

@luispabon
Copy link
Author

Go-od stuff mate 👍

@nwg-piotr
Copy link
Owner

2021-03-28-031005_screenshot

@luispabon
Copy link
Author

Awesome, thank you Piotr 👍🏽

@nwg-piotr
Copy link
Owner

Thanks for reporting the issue.

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

Successfully merging a pull request may close this issue.

2 participants