sway / wayland

I've put off migrating to wayland since i3 and X11 work fine for me, but I would like to move to wayland since that is supposedly the direction things are going.

I think I have everything nearly working except for DPMS, when I turn off both displays and then try to turn them back on, only 1 comes back on. This is the snippet controlling DPMS:

exec swayidle -w \
timeout 5 'swaymsg "output HDMI-A-1 dpms off"' \
timeout 5 'swaymsg "output DP-2 dpms off"' \
resume 'swaymsg "output * dpms on"'


Summarizing the changes I made to my system:
1. Instead of calling startx to launch my graphical environment, I have another helper, start-wayland which concatenates my sway configuration into a single file, executes sway in the background and runs scripts in /etc/xprofile
2. Updated my i3 config to use swaylock, swayidle, and swaymsg
3. Updated my i3 config to have the appropriate # of colors to define elements
4. Updated my i3 config to configure my monitor layout using wlr-randr

Since I'm no longer using startx, I abandoned .xinitrc, but should I merely update .xinitrc with exec sway & as well? That won't help my DPMS issue though.
 
I just checked swaymsg 'output * power off'; sleep 5; swaymsg 'output * power on', and both outputs work as expected.

And why do you need .xinitrc? It's xinit-specific, you can delete it if you don't use xorg.
 
i always start dwl and wayland with dbus

Code:
exec dbus-launch --exit-with-session dwl -s 'dwlb -font "monospace:size=16"' 2>/dev/null

starting sway with dbus

Code:
exec dbus-launch --exit-with-session swayidle -w \
timeout 5 'swaymsg "output HDMI-A-1 dpms off"' \
timeout 5 'swaymsg "output DP-2 dpms off"' \
resume 'swaymsg "output * dpms on"'
 
  • Like
Reactions: drr
I just checked swaymsg 'output * power off'; sleep 5; swaymsg 'output * power on', and both outputs work as expected.

And why do you need .xinitrc? It's xinit-specific, you can delete it if you don't use xorg.
Are you sure it is power on and not dpms on / dpms off? The power on power off did not work for me. I will try again this evening.
 
i have been using Wayland and Nvidia since last December

i tried the following

dwl
labwc
wayfire
hikari
river

i have tutorials on setting up dwl, labwc and wayfire in the how to section
dwl is the best for wayland on freebsd
 
  • Like
Reactions: drr
Are you sure it is power on and not dpms on / dpms off? The power on power off did not work for me. I will try again this evening.
sway-output(5) says the following:
Code:
output <name> power on|off|toggle
   Turns on or off the specified output.
   [...]

output <name> dpms on|off|toggle
   Deprecated. Alias for power.
 
have you looked at wlr-randr

Utility to manage outputs of a Wayland compositor.

Code:
sudo pkg install wlr-randr

Code:
wl-randr -h

Code:
--help
--dryrun
--json
--output <name>
  --on
  --off
  --toggle
  --mode|--custom-mode <width>x<height>[@<refresh>Hz]
  --preferred
  --pos <x>,<y>
  --transform normal|90|180|270|flipped|flipped-90|flipped-180|flipped-270
  --scale <factor>
  --adaptive-sync enabled|disabled
 
i have been using Wayland and Nvidia since last December

i tried the following

dwl
labwc
wayfire
hikari
river

i have tutorials on setting up dwl, labwc and wayfire in the how to section
dwl is the best for wayland on freebsd
Would you mind sharing any tutorial which worked for you? Especially for dwl.
 
heres all my notes

dwl





labwc


wayfire


config files




notes


youtube

 
no problem mate
they are all my tutorials

i have dwl working on the following machines

macbook air 2011 - 11 inch

macbook pro retina 2015 - 13 inch

dell xps 2019 - 15 inch

give me a shout if you get stuck on anything
 
Yes, you're right power on / off is the correct syntax, but I'm still unable to get the one monitor to come back on.

I've tried:

swaymsg "output DP-2 power on"
swaymsg "output * power on"

Only the 1 monitor turns on for whatever reason.
 
Awesome, this is working for me now! I'm not sure if it is because of FBSD 15 or what, but great, now I can use sway. That was the last hurdle.
 
Back
Top