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

Third Monitor 'Inactive' Since Update to Sway 1.4 #5008

Closed
ChasNelson1990 opened this issue Feb 12, 2020 · 30 comments
Closed

Third Monitor 'Inactive' Since Update to Sway 1.4 #5008

ChasNelson1990 opened this issue Feb 12, 2020 · 30 comments

Comments

@ChasNelson1990
Copy link

Hi there,

I've been using sway for a while now and I really like it. My problem (below) seems to have coincided with the upgrade to Sway 1.4 (not sure of the best way to confirm this); I run an Arch system and have sway installed from the official repository.

In my office I connect my laptop to a dock which is connected to two monitors. Until said update I was able to hotplug the dock and have a three monitor set-up (internal laptop monitor + 2x external monitors). And then... this stopped.

I can now only get a maximum of two monitors running. When I hotplug the dock only one external monitor turns on but, if I allow my laptop to sleep, on wake both external monitors work but the internal laptop monitor stays off.

I believe this could be related to issue #4878 as get_outputs shows which ever monitor is off as 'inactive'.

As per the advice there I have created a dmesg and sway log. Both can be found at https://gist.github.com/ChasNelson1990/02b615ec15839a77691d6a8be942c960 .

I believe the dock is plugged in and the system tries to sort monitors at around line 22400 in dmesg.log and 4700 in sway.log. Monitor DP-3 seems to load and activate fine but then the system seems to find two ports DP-4 and DP-5 at the same time. DP-4 is the third monitor (second external) that shows as inactive.

Output of swaymsg -t get_outputs:

Output eDP-1 'Unknown 0x5B2D 0x00000000' (focused)
  Current mode: 1920x1080 @ 60.033001 Hz
  Position: 2560,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 5
  Max render time: off
  Available modes:
    1920x1080 @ 48.026001 Hz
    1920x1080 @ 60.033001 Hz

Output DP-3 'Dell Inc. DELL U2719DC 7W6XSS2'
  Current mode: 2560x1440 @ 59.951000 Hz
  Position: 0,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 7
  Max render time: off
  Available modes:
    720x400 @ 70.082001 Hz
    640x480 @ 59.939999 Hz
    640x480 @ 59.939999 Hz
    640x480 @ 60.000000 Hz
    640x480 @ 75.000000 Hz
    720x480 @ 59.939999 Hz
    720x480 @ 59.939999 Hz
    720x480 @ 60.000000 Hz
    720x480 @ 60.000000 Hz
    720x576 @ 50.000000 Hz
    720x576 @ 50.000000 Hz
    800x600 @ 60.317001 Hz
    800x600 @ 75.000000 Hz
    1024x768 @ 60.004002 Hz
    1024x768 @ 75.028999 Hz
    1280x720 @ 50.000000 Hz
    1280x720 @ 59.939999 Hz
    1280x720 @ 60.000000 Hz
    1280x720 @ 60.000000 Hz
    1152x864 @ 75.000000 Hz
    1280x1024 @ 60.020000 Hz
    1280x1024 @ 75.025002 Hz
    1600x1200 @ 60.000000 Hz
    1920x1080 @ 50.000000 Hz
    1920x1080 @ 59.939999 Hz
    1920x1080 @ 60.000000 Hz
    1920x1080 @ 60.000000 Hz
    2048x1080 @ 23.997000 Hz
    2048x1080 @ 59.998001 Hz
    2560x1440 @ 59.951000 Hz

Output DP-4 'Dell Inc. DELL U2719DC HW6XSS2' (inactive)
  Available modes:
    720x400 @ 70.082001 Hz
    640x480 @ 59.939999 Hz
    640x480 @ 59.939999 Hz
    640x480 @ 60.000000 Hz
    640x480 @ 75.000000 Hz
    720x480 @ 59.939999 Hz
    720x480 @ 59.939999 Hz
    720x480 @ 60.000000 Hz
    720x480 @ 60.000000 Hz
    720x576 @ 50.000000 Hz
    720x576 @ 50.000000 Hz
    800x600 @ 60.317001 Hz
    800x600 @ 75.000000 Hz
    1024x768 @ 60.004002 Hz
    1024x768 @ 75.028999 Hz
    1280x720 @ 50.000000 Hz
    1280x720 @ 59.939999 Hz
    1280x720 @ 60.000000 Hz
    1280x720 @ 60.000000 Hz
    1152x864 @ 75.000000 Hz
    1280x1024 @ 60.020000 Hz
    1280x1024 @ 75.025002 Hz
    1600x1200 @ 60.000000 Hz
    1920x1080 @ 50.000000 Hz
    1920x1080 @ 59.939999 Hz
    1920x1080 @ 60.000000 Hz
    1920x1080 @ 60.000000 Hz
    2048x1080 @ 23.997000 Hz
    2048x1080 @ 59.998001 Hz
    2560x1440 @ 59.951000 Hz
@Emantor
Copy link
Contributor

Emantor commented Feb 12, 2020

Please try wlroots from latest master with WLR_DRM_NO_MODIFIERS=1 set.

@ChasNelson1990
Copy link
Author

Is that just an environment variable or is it in a config file somewhere?

@Emantor
Copy link
Contributor

Emantor commented Feb 12, 2020

Yes, its just an environment variable.

@ChasNelson1990
Copy link
Author

Sorry, another quick question, I know wlroots and sway have close dependency - should I also build the latest master of sway?

@Emantor
Copy link
Contributor

Emantor commented Feb 12, 2020

It won't hurt to do that as well, but I think there haven't been any breaking changes.

@ChasNelson1990
Copy link
Author

Is there a way to confirm that my computer is using the right wlroots? I built using the instructions on github but that and the environment variable don't seem to have had an effect.

@JonasKs
Copy link

JonasKs commented Feb 14, 2020

Can confirm, had to upgrade from wlroots 0.10.0 to master, and set WLR_DRM_NO_MODIFIERS=1 as my env variable. Fixed the issue.

@ChasNelson1990
Copy link
Author

As I said, I tried this and it didn't work. Is there away to confirm which version of wlroots my pc is using, incase there's somehow versions on here.

@JonasKs
Copy link

JonasKs commented Feb 17, 2020

Have you tried installing from the master branch at all? Or do you have a package manager that installed Sway for you?

I'm not sure where you check the wlroots version(not on my laptop atm), but you should probably also double check that you have WLR_DRM_NO_MODIFIERS=1 set before sway is run. So put it in e.g. your zshrc and restart sway.

@ChasNelson1990
Copy link
Author

I installed from the git master with the instruction on git. And yes, the environment variable is set before sway starts and is still set if I check from within a terminal emulator inside sway.

@jniedrauer
Copy link

Seeing this from the Fedora Module repo sway:rolling. Setting WLR_DRM_NO_MODIFIERS=1 does not help (wlroots-0.10.0-5.module_f31+7694+72cbf402.x86_64).

@dbuelow
Copy link

dbuelow commented Feb 20, 2020

I had the same problem with Sway 1.4. Fixed with aur/wlroots-git (0.10.0.r18.g68820d6c-1) and

export WLR_DRM_NO_MODIFIERS=1

@JonasKs
Copy link

JonasKs commented Feb 20, 2020

10.x release != master branch.
Install from the master branch, and not the packaged 10.x version.

@Emantor
Copy link
Contributor

Emantor commented Feb 20, 2020

10.x release != master branch.
Install from the master branch, and not the packaged 10.x version.

His version indicates that he is 18 revisions on top of 0.10.0 on commit 68820d6c… which is the current master commit.

@grahamc
Copy link
Contributor

grahamc commented Feb 20, 2020

I had a slightly different problem, where my one external monitor over USB-C wasn't working. I can confirm my external display is working again with:

For NixOS 20.03beta users, this is what I put in to my overlay:

  wlroots = super.wlroots.overrideAttrs ({ ... }: {
    version = "0.10.0-plus-ref-sway5008";
    src = self.fetchFromGitHub {
      owner = "swaywm";
      repo = "wlroots";
      rev = "273b280f469f5be3455f98f4230b169cc9ee67f2";
      sha256 = "1p0j30hnvcqbbak9bci3400vvxbwzhhzdv3sgwl190lzqxqq3q0g";
    };
    });

@lheckemann
Copy link
Contributor

That fixes my third-monitor problem too, thanks @grahamc!

@jvanbruegge
Copy link

Yes, I just installed wlroots from the AUR and have not had this issue since then

@ChasNelson1990
Copy link
Author

Hi there, have moved to sway-git and wlroot-git from AUR and, with WLR_DRM_NO_MODIFIERS=1 all the monitors are now working! Thanks.
Interestingly the keyboard and mouse are not... but I think this is due to temperamental thunderbolt.

@yorickvP
Copy link
Contributor

WLR_DRM_NO_MODIFIERS is a workaround, this should probably stay open until that's no longer needed.

@ascent12
Copy link
Member

swaywm/wlroots#1877 is basically the same thing, and swaywm/wlroots#1873 is also related.
It's a wlroots issue rather than a sway one, so it makes more sense for it to be there.

@ebrensi
Copy link

ebrensi commented Jul 29, 2020

I'm having this problem with the currrent latest Sway 1.5-1 and wlroots 0.11.0-1 on my Asus N56VZ laptop, which has the Optimus setup. The laptop has a VGA port that works fine, and a HDMI port that gets recognized but stays inactive.

Setting WLR_DRM_NO_MODIFIERS=1 does not change anything. Same thing with Weston.

Any more ideas?

@emersion
Copy link
Member

Might just be a limitation of your GPU. Hard to tell without any more info though.

@ebrensi
Copy link

ebrensi commented Jul 29, 2020

ok here's more info. I am running Manjaro, originally with XFCE but installed Sway and I run it manually from the TTY after boot, with these environment variables set.

# this may fix external monitor problem
WLR_DRM_NO_MODIFIERS=1

# make Firefox use native Wayland backend
MOZ_ENABLE_WAYLAND=1
# force wayland backend for bemenu
BEMENU_BACKEND=wayland

# Force Wayland backend for qt5 apps
QT_QPA_PLATFORM=wayland
QT_WAYLAND_DISABLE_WINDOWDECORATION=1

# for Java some apps
 _JAVA_AWT_WM_NONREPARENTING=1

# general
XDG_SESSION_TYPE=wayland

I'm using the free (nouveau) drivers. From what I've gathered from looking around onlie, the HDMI port is wired to the nvidia gpu. In Sway, swaymsg -t get_outputs identifies LDVS-1 (laptop screen), VGA-1 (external VGA port that works), and HDMI-1-1.

HDMI-1-1 is correctly identified but is listed as inactive and manually enabling it with swaymsg output HDMI-1-1 enable does not work.

@emersion
Copy link
Member

Please create a new issue with debug logs.

@arran-nz
Copy link

arran-nz commented Apr 8, 2021

WLR_DRM_NO_MODIFIERS=1 Solved the issue for me.

Jamedjo added a commit to Jamedjo/dotfiles that referenced this issue May 12, 2021
Possibly due to sway exceeding intel bandwidth limits,
by allocating new buffers before releasing old ones.

See: swaywm/wlroots#1877,
swaywm/sway#5008 and
swaywm/wlroots#1873
NicolaiRuckel added a commit to NicolaiRuckel/dotfiles that referenced this issue Jul 19, 2021
@Hubro
Copy link

Hubro commented Jul 29, 2021

Is export WLR_DRM_NO_MODIFIERS=1 still required? I'm wondering whether I can remove it from my configuration, but I don't currently have an external monitor to test with.

@BlacCello
Copy link

Yes, I have two setups each with three monitors, and both of them require WLR_DRM_NO_MODIFIERS=1. If I don't set it, it works the first time when I freshly boot and start sway with gdm. If I unplug a monitor or "dpms off" afterwards, I am only able to use two out of three monitors.

@cartok
Copy link

cartok commented May 23, 2022

@Hubro WLR_DRM_NO_MODIFIERS=1 is still required at this date

@cartok
Copy link

cartok commented May 23, 2022

@ChasNelson1990 Propably you only have an issue with thunderbolt security, check this out:

@lilydjwg
Copy link

lilydjwg commented Jul 24, 2022

My third monitor can no longer be used because WLR_DRM_NO_MODIFIERS=1 caused me intermittent black screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests