Sway on nVidia?

Anyone got it working? Tried with the built in AMD can’t get that working either:

Lenovo Legion 5

System:
  Kernel: 5.17.1-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    Desktop: Qtile v: 0.21.1.dev2+g539cbf2e Distro: EndeavourOS
    base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82JY v: Legion 5 17ACH6H
    serial: <filter>
  Mobo: LENOVO model: LNVNB161216 v: SDK0R32862 WIN serial: <filter>
    UEFI: LENOVO v: GKCN44WW date: 08/30/2021
Battery:
  ID-1: BAT0 charge: 76.1 Wh (90.0%) condition: 84.6/80.0 Wh (105.7%)
    volts: 16.7 min: 15.4 model: Celxpert L20C4PC2 status: discharging
Memory:
  RAM: total: 15.54 GiB used: 3.63 GiB (23.3%)
  Array-1: capacity: 32 GiB slots: 2 EC: None max-module-size: 16 GiB
    note: est.
  Device-1: DIMM 0 size: 8 GiB speed: 3200 MT/s type: DDR4
  Device-2: DIMM 0 size: 8 GiB speed: 3200 MT/s type: DDR4
CPU:
  Info: 8-core model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64
    type: MT MCP arch: Zen 3 rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 16 MiB
  Speed (MHz): avg: 1450 high: 3200 min/max: 1200/4462 boost: enabled
    cores: 1: 1200 2: 3200 3: 1200 4: 1200 5: 1200 6: 1200 7: 1200 8: 3200
    9: 1200 10: 1200 11: 1200 12: 1200 13: 1200 14: 1200 15: 1200 16: 1200
    bogomips: 102208
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA GA104M [GeForce RTX 3070 Mobile / Max-Q] vendor: Lenovo
    driver: nvidia v: 510.54 bus-ID: 01:00.0
  Device-2: Acer Integrated Camera type: USB driver: uvcvideo bus-ID: 1-3:3
  Display: server: X.Org v: 1.21.1.3 driver: X: loaded: nvidia
    unloaded: modesetting gpu: nvidia,nvidia-nvswitch
    resolution: 1920x1080~144Hz
  OpenGL: renderer: NVIDIA GeForce RTX 3070 Laptop GPU/PCIe/SSE2
    v: 4.6.0 NVIDIA 510.54 direct render: Yes
Audio:
  Device-1: NVIDIA GA104 High Definition Audio driver: snd_hda_intel
    v: kernel bus-ID: 01:00.1
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo
    driver: N/A bus-ID: 06:00.5
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel bus-ID: 06:00.6
  Sound Server-1: ALSA v: k5.17.1-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.49 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel port: 2000 bus-ID: 03:00.0
  IF: eno1 state: down mac: <filter>
  Device-2: Realtek RTL8852AE 802.11ax PCIe Wireless Network Adapter
    vendor: Lenovo driver: rtw89_pci v: kernel port: 1000 bus-ID: 04:00.0
  IF: wlan0 state: up mac: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8
    bus-ID: 3-4:3
  Report: rfkill ID: hci0 rfk-id: 3 state: down bt-service: disabled
    rfk-block: hardware: no software: yes address: see --recommends
Drives:
  Local Storage: total: 2.29 TiB used: 60.11 GiB (2.6%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZALQ512HBLU-00BL2
    size: 476.94 GiB temp: 24.9 C
  ID-2: /dev/nvme1n1 vendor: Crucial model: CT2000P2SSD8 size: 1.82 TiB
    temp: 29.9 C
Partition:
  ID-1: / size: 1.81 TiB used: 60.11 GiB (3.2%) fs: btrfs dev: /dev/nvme1n1p2
  ID-2: /boot/efi size: 299.4 MiB used: 580 KiB (0.2%) fs: vfat
    dev: /dev/nvme1n1p1
  ID-3: /home size: 1.81 TiB used: 60.11 GiB (3.2%) fs: btrfs
    dev: /dev/nvme1n1p2
  ID-4: /var/log size: 1.81 TiB used: 60.11 GiB (3.2%) fs: btrfs
    dev: /dev/nvme1n1p2
Swap:
  ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%)
    dev: /dev/nvme1n1p3
Sensors:
  Message: No sensor data found. Is lm-sensors configured?
Info:
  Processes: 356 Uptime: 19m Init: systemd Compilers: gcc: 11.2.0 clang: N/A
  Packages: 1256 Shell: Zsh v: 5.8.1 inxi: 3.3.14

I have to add, that currently I’m just using the official sway and wlroots packages from the arch repos. It’s working with them on my end.

What card do you have?

GTX 1060.

I sadly have no idea about how well notebooks and mobile Nvidia GPU work with sway. It may add some problems with switching between GPUs, etc.

Tried everything cannot get it to work :frowning: Can’t make it work with the AMD builtin either.

Not working on nVidia, but working on the on-board AMD:
Installed git versions of sway and wlroots and changed the desktop file to run this script:

#!/bin/bash
export SDL_VIDEODRIVER=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
export QT_QPA_PLATFORM=wayland
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_DESKTOP=sway
exec sway --unsupported-gpu

The important bit being the --unsupported-gpu. Not a solution per se, but has got it working.

So if it was strictly an Nvidia GPU it wouldn’t work on Sway?

Cannot get it to run on the RTX3070, think it is too new.

Sway does not support proprietary drivers, from the official Sway Wiki:

Nvidia users

All proprietary graphics drivers are unsupported. This includes the Nvidia proprietary driver. The open source Nouveau driver can be used instead. Tip: buy your hardware with open source support in mind.

1 Like

Yes i knew that. I was just meaning that if the laptop only had the Nvidia it wouldn’t work then. But because it has Ryzen with Radeon graphics it is able to be configured to work.