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

Found 0 GPUs, cannot create backend #7240

Closed
tigerjack opened this issue Nov 7, 2022 · 19 comments
Closed

Found 0 GPUs, cannot create backend #7240

tigerjack opened this issue Nov 7, 2022 · 19 comments
Labels
bug Not working as intended waiting-on-reporter Requires reporter's feedback

Comments

@tigerjack
Copy link

Please fill out the following:

  • Sway Version:

    • swaymsg -t get_version: sway version 1.7
  • Debug Log:
    After running sway as sway -d, this is the output.
    https://pastebin.com/Utd6QzNL

  • Configuration File:

  • Stack Trace:

  • Description:
    Just launching sway from tty sometimes result in sway not launching. The problem appears at random and sometimes a reboot suffices to fix it.

May be related to this old bug.

@tigerjack tigerjack added the bug Not working as intended label Nov 7, 2022
@emersion
Copy link
Member

emersion commented Nov 7, 2022

00:00:00.006 [DEBUG] [wlr] [backend/session/session.c:385] Ignoring '/dev/dri/card0': not a KMS device

Can you post a drm_info log when this happens?

It seems like the kernel driver is half-loaded or something. Maybe look into dmesg as well.

@BridgerB
Copy link

BridgerB commented Nov 10, 2022

I just ran into this same error. I am on arch and have been updating daily so there might have been a package today that did it (2022-11-09). I am now bricked out of my machine. I use the Nvidia open-source nouveau driver. I use this script at login: https://wiki.archlinux.org/title/sway#Automatically_on_TTY_login. I login (login text is also larger than normal), then it loads for ~5 seconds then it flashes the screen below before going back to a fresh login page.
"screenshot"

@bl4ckb0ne
Copy link
Contributor

@tigerjack @BridgerB what are your GPUs?

@BridgerB
Copy link

I have a single Nvidia 1080. This morning I booted into an adjacent hard drive and removed my auto start sway script. I am now able to login to a TTY but after updating everything sway still has the same error.

@BridgerB
Copy link

drm_info output = drmGetDevices: No such file or directory

@tigerjack
Copy link
Author

tigerjack commented Nov 10, 2022

@bl4ckb0ne

VGA compatible controller: Intel Corporation CometLake-U GT2 [UHD Graphics] (rev 02)
and
3D controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)

@KaitlynEthylia
Copy link

@BridgerB have you managed to fix it? I'm getting the exact same issue

@bl4ckb0ne
Copy link
Contributor

@tigerjack @BridgerB can you post the drm_info 1 output

@emersion emersion added the waiting-on-reporter Requires reporter's feedback label Feb 1, 2023
@tigerjack
Copy link
Author

@tigerjack @BridgerB can you post the drm_info 1 output

I am on 1.8 now and I didn't get these error messages in a while.

@bl4ckb0ne
Copy link
Contributor

Alright, closing the issue then.

@bibanez
Copy link

bibanez commented Feb 3, 2023

Hello, I'm getting the same error in a fresh install of Arch with nvidia drivers and Sway version 1.8

How can I debug this?

@emersion
Copy link
Member

emersion commented Feb 3, 2023

The nvidia drivers are not officially supported.

@ii8
Copy link
Contributor

ii8 commented Feb 17, 2023

I still have this problem running sway from a tty with AMD Radeon Vega graphics. It worked fine before updating to Sway 1.8 but the version I had before was a bit older, not 1.7.

I have rebooted a few times and it has not yet made a difference, so there's no evidence that it occurrs randomly for me.

Currently I am struggling to build drm_info, if it's necessary I can try again.

The full stderr log:

00:00:00.000 [INFO] [sway/main.c:338] Sway version 1.8
00:00:00.000 [INFO] [sway/main.c:339] wlroots version 0.16.1
00:00:00.001 [INFO] [sway/main.c:120] Linux hugo 6.1.12_1 #1 SMP PREEMPT_DYNAMIC Thu Feb 16 11:45:52 UTC 2023 x86_64 GNU/Linux
00:00:00.001 [INFO] [sway/main.c:136] Contents of /etc/os-release:
00:00:00.001 [INFO] [sway/main.c:120] NAME="Void"
00:00:00.001 [INFO] [sway/main.c:120] ID="void"
00:00:00.001 [INFO] [sway/main.c:120] PRETTY_NAME="Void Linux"
00:00:00.001 [INFO] [sway/main.c:120] HOME_URL="https://voidlinux.org/"
00:00:00.001 [INFO] [sway/main.c:120] DOCUMENTATION_URL="https://docs.voidlinux.org/"
00:00:00.001 [INFO] [sway/main.c:120] LOGO="void-logo"
00:00:00.001 [INFO] [sway/main.c:120] ANSI_COLOR="0;38;2;71;128;97"
00:00:00.001 [INFO] [sway/main.c:120] 
00:00:00.001 [INFO] [sway/main.c:120] DISTRIB_ID="void"
00:00:00.001 [INFO] [sway/main.c:108] LD_LIBRARY_PATH=
00:00:00.001 [INFO] [sway/main.c:108] LD_PRELOAD=
00:00:00.001 [INFO] [sway/main.c:108] PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/texlive/2022/bin/x86_64-linuxmusl
00:00:00.001 [INFO] [sway/main.c:108] SWAYSOCK=
00:00:00.001 [INFO] [sway/main.c:376] Starting sway version 1.8
00:00:00.002 [INFO] [wlr] [libseat] [libseat/libseat.c:73] Seat opened with backend 'seatd'
00:00:00.002 [INFO] [wlr] [libseat] [libseat/backend/seatd.c:212] Enabling seat
00:00:00.002 [INFO] [wlr] [backend/session/session.c:109] Successfully loaded libseat session
00:00:00.002 [INFO] [wlr] [backend/session/session.c:473] Waiting for a DRM card device
00:00:10.012 [ERROR] [wlr] [backend/backend.c:217] Found 0 GPUs, cannot create backend
00:00:10.013 [ERROR] [wlr] [backend/backend.c:390] Failed to open any DRM device
00:00:10.108 [ERROR] [sway/server.c:73] Unable to create backend

@bl4ckb0ne
Copy link
Contributor

Looks like you're missing a KMS driver

@ii8
Copy link
Contributor

ii8 commented Feb 18, 2023

I'm not sure what you mean by missing a KMS driver, what driver could that be? I've not uninstalled anything, only updated sway and the kernel.

@emersion
Copy link
Member

Somehow your kernel graphics driver doesn't load anymore. Check dmesg maybe.

@ii8
Copy link
Contributor

ii8 commented Feb 18, 2023

I found these things in dmsg when booting linux 6.1:

[drm] amdgpu kernel modesetting enabled
[drm] BIOS signature incorrect 0 0
amdgpu: Invalid PCI ROM header signature: expecting 0xaa55, got 0xffff
amdgpu: unable to locate a BIOS ROM
amdgpu: Fatal error during GPU init 

I am able to start sway with an older kernel (6.0 instead of 6.1)
I always knew this BIOS was borked beyond repair and have tried to fix it before but there is no relevant update and it's proprietary.
In any case, clearly not a sway issue.

@blackmirroxx
Copy link

I am getting the same issue as "BridgerB commented on Nov 10, 2022" on the my new AMD radeon graphics card -> RX radeon 6650 xt
My OS is Gentoo, with kernel 6.1.31-gentoo (it used to work on 6.1.19)
It used to be working from tty with
$> dbus-run-session -- sway

I reinstalled all my XDG (e.g. xdg-utils...) related packages - no luck. As for now I sticking to my old kernel for now.

@guyuming76
Copy link

guyuming76 commented Sep 1, 2023

i just run into the same error on gentoo with DWL (based on wlroots-0.16.2)

turned out that i uninstalled the sys-auth/polkit recently.

I reinstalled this package and its dependency, and the issue fixed.

i wonder why the following line in backend.c need polkit to find gpus:
ssize_t num_gpus = wlr_session_find_gpus(session, 8, gpus);

UPDATE: if i set WLR_DRM_DEVICES=/dev/dri/card0 , i can start dwl without polkit and elogind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended waiting-on-reporter Requires reporter's feedback
Development

No branches or pull requests

9 participants