Change login manager output in sway

Hello people,
I am playing with sway garuda linux edition on an older docked laptop. Tbh, I wanted to disable the monitor screen in bios, but it is not possible and it is being used even when it is not connected physically. I managed to disable it automatically when i log in, but the login manager still pops up on the screen i do not want it to.
Could you guys please give me any advice on how could i change it?

My output from swaymsg -t get_outputs:

Output HDMI-A-1 'Dell Inc. DELL SE2416H P7HT872S05WB' (focused)
  Current mode: 1920x1080 @ 60.000 Hz
  Position: 1920,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 1
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    1920x1080 @ 60.000 Hz
    1920x1080 @ 60.000 Hz
    1920x1080 @ 59.940 Hz
    1920x1080 @ 50.000 Hz
    1600x900 @ 60.000 Hz
    1280x1024 @ 75.025 Hz
    1280x1024 @ 60.020 Hz
    1152x864 @ 75.000 Hz
    1280x720 @ 60.000 Hz
    1280x720 @ 60.000 Hz
    1280x720 @ 59.940 Hz
    1280x720 @ 50.000 Hz
    1024x768 @ 75.029 Hz
    1024x768 @ 60.004 Hz
    800x600 @ 75.000 Hz
    800x600 @ 60.317 Hz
    720x576 @ 50.000 Hz
    720x480 @ 60.000 Hz
    720x480 @ 60.000 Hz
    720x480 @ 59.940 Hz
    720x480 @ 59.940 Hz
    720x480 @ 59.940 Hz
    640x480 @ 75.000 Hz
    640x480 @ 60.000 Hz
    640x480 @ 59.940 Hz
    640x480 @ 59.940 Hz
    720x400 @ 70.082 Hz

Output LVDS-1 'Chi Mei Optoelectronics corp. 0x1726 0x00000000' (inactive)
  Available modes:
    1920x1080 @ 60.020 Hz

My output from the required command:

System:
  Kernel: 5.16.10-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=a3af92b9-c79d-4ca2-9af9-7db519bc4fe3 rw rootflags=subvol=@
    quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
  Desktop: sway 1.7 vt: 1 dm: N/A Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: ASUSTeK product: N73SV v: 1.0
    serial: <superuser required>
  Mobo: ASUSTeK model: N73SV v: 1.0 serial: <superuser required>
    BIOS: American Megatrends v: N73SV.306 date: 08/18/2011
CPU:
  Info: model: Intel Core i7-2630QM bits: 64 type: MT MCP arch: Sandy Bridge
    family: 6 model-id: 0x2A (42) stepping: 7 microcode: 0x2F
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 820 high: 967 min/max: 800/2900 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 967 2: 798 3: 798
    4: 798 5: 805 6: 798 7: 798 8: 798 bogomips: 31926
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
    IBRS_FW, STIBP: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics
    vendor: ASUSTeK driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:0116
    class-ID: 0300
  Device-2: NVIDIA GF108M [GeForce GT 540M] driver: N/A
    alternate: nouveau, nvidia_drm, nvidia bus-ID: 01:00.0 chip-ID: 10de:0df4
    class-ID: 0300
  Device-3: IMC Networks USB2.0 UVC 2M WebCam type: USB driver: uvcvideo
    bus-ID: 1-1.2:3 chip-ID: 13d3:5205 class-ID: 0e02 serial: <filter>
  Display: wayland server: X.org 1.21.1.3 compositor: sway v: 1.7 driver:
    loaded: N/A display-ID: 1 resolution: <missing: xdpyinfo>
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: Intel 6 Series/C200 Series Family High Definition Audio
    vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
    chip-ID: 8086:1c20 class-ID: 0403
  Device-2: NVIDIA GF108 High Definition Audio driver: snd_hda_intel
    v: kernel bus-ID: 01:00.1 chip-ID: 10de:0bea class-ID: 0403
  Sound Server-1: ALSA v: k5.16.10-zen1-1-zen running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.47 running: yes
Network:
  Device-1: Intel Centrino Wireless-N 1000 [Condor Peak] driver: iwlwifi
    v: kernel bus-ID: 03:00.0 chip-ID: 8086:0083 class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  Device-2: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet vendor: ASUSTeK
    driver: atl1c v: kernel port: 9000 bus-ID: 05:00.0 chip-ID: 1969:1083
    class-ID: 0200
  IF: enp5s0 state: down mac: <filter>
Bluetooth:
  Device-1: ASUSTek BT-270 Bluetooth Adapter type: USB driver: btusb v: 0.8
    bus-ID: 1-1.5:4 chip-ID: 0b05:1788 class-ID: fe01 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 2 state: up address: <filter>
Drives:
  Local Storage: total: 698.64 GiB used: 9.36 GiB (1.3%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital
    model: WD7500BPKT-80PK4T0 size: 698.64 GiB block-size: physical: 4096 B
    logical: 512 B speed: 3.0 Gb/s type: HDD rpm: 7200 serial: <filter>
    rev: 1A01 scheme: MBR
Partition:
  ID-1: / raw-size: 698.63 GiB size: 698.63 GiB (100.00%)
    used: 9.36 GiB (1.3%) fs: btrfs dev: /dev/sda1 maj-min: 8:1
  ID-2: /home raw-size: 698.63 GiB size: 698.63 GiB (100.00%)
    used: 9.36 GiB (1.3%) fs: btrfs dev: /dev/sda1 maj-min: 8:1
  ID-3: /var/log raw-size: 698.63 GiB size: 698.63 GiB (100.00%)
    used: 9.36 GiB (1.3%) fs: btrfs dev: /dev/sda1 maj-min: 8:1
  ID-4: /var/tmp raw-size: 698.63 GiB size: 698.63 GiB (100.00%)
    used: 9.36 GiB (1.3%) fs: btrfs dev: /dev/sda1 maj-min: 8:1
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 7.67 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 44.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 261 Uptime: 12m wakeups: 1 Memory: 7.67 GiB
  used: 2.25 GiB (29.3%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.2.0 Packages: pacman: 1285 lib: 336 Shell: fish v: 3.3.1
  default: Bash v: 5.1.16 running-in: alacritty inxi: 3.3.12
Garuda (2.5.5-1):
  System install date:     2022-02-23
  Last full system update: 2022-02-23
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       <superuser required>
  Snapshots:               Snapper
  Failed units:

If you include terminal outputs in your post please
use the proper output format in your post.
Using "~" 3 times above and "~" 3 times below the text block
will provide a readable, raw look,

and
:slight_smile:

1 Like

ok, sure, will do next time
and thank you :))

@johnyssho Edit your post please :smiley:

What is this exactly? I’m unsure. Is it something to actually do with sway?

Also! Welcome to Garuda!

No, I mean BIOS, the base PC firmware.

What was your method for doing that?

I hope someone will correct me if I am wrong here: the login manager is QTGreetd, and my understanding is it launches Sway. So Sway hasn’t started yet when you are logging in–thus whatever you finagled to keep the session off of the laptop screen hasn’t kicked in yet.

BluishHumility

You are correct it is Greetd (~kennylevinsen/greetd - sourcehut git) which is a display manager / login manager. It actually verifies the user and then launches sway. They are different environments totally.

Johnyssho

I'm guessing you would have to figure out how to execute a command to turn off the monitor in Greetd. Maybe using the command section of the [default] in the config for Greetd might work. But I'm not sure.

Something like this where you replace DP-1 with the actual monitor identity.
swaymsg output DP-1 disable

I haven't done it, and don't know if you can call swaymsg outside of a sway session so I don't know if it would work at all...

Actually you could edit the config file possibly from the command that is already there which is located in /etc/greetd/swayconfig

The swayconfig file has
exec "qtgreet; swamsg exit" and you could just add to it
exec qtgreet; swaymsg output LVDS-1 disable; swaymsg exit and test it out.

But I'm not going to guarantee that this is going to destroy your setup.

1 Like

My method was, that I edited the output sway config file.
Added this line:
output LVDS-1 disable
And it worked.

Gonna try that in a moment, will report back.

Ok. I did this:
exec "qtgreet; swaymsg output LVDS-1 disable; swaymsg output HDMI-A-1 enable; swaymsg exit
But It did not change anything.
But still, thank you very much :)))
All of you.

Yes, tried this as well, but it did not work. It actually made greetd fail, so, don't do that. :))
But, thank you for your reply.
johnyssho