hawaii-desktop / greenisland

UNMAINTANED, please go to https://github.com/lirios/wayland
https://liri.io
GNU General Public License v2.0
75 stars 9 forks source link

Could not find DRM device! #217

Closed dvc94ch closed 8 years ago

dvc94ch commented 8 years ago

I'm testing the experimental PR from here https://github.com/sddm/sddm/pull/616. I'm running into an issue where greenisland doesn't correctly detect a drm device. I ran some basic commands and pasted the outputs below.

root@builder /# cat /var/log/sddm.log
[18:51:57.253] (II) DAEMON: Initializing...
[18:51:57.264] (II) DAEMON: Starting...
[18:51:57.265] (II) DAEMON: Adding new display on vt 7 ...
[18:51:57.267] (II) DAEMON: Compositor starting...
[18:51:57.267] (II) DAEMON: Running: sddm-wayland-compositor -platform greenisland
[18:51:57.268] (EE) DAEMON: Failed to start compositor process.
root@builder /# QT_PLUGIN_PATH=/gnu/store/97c366bna69r9p7fcc0x3pbp7p7wh5sk-greenisland-0.8.90/lib64/plugins sddm-wayland-compositor -platform greenisland
QML debugging is enabled. Only use this in a safe environment.
greenisland.qpa.deviceintegration: EGL device integration plugin lookup paths: /gnu/store/97c366bna69r9p7fcc0x3pbp7p7wh5sk-greenisland-0.8.90/lib64/plugins /gnu/store/y98rxvc0bga3s0c8jfsv2ya4a09jfzq6-qt56-5.6.1-1/plugins /gnu/store/w69wanqqkarjmvp4wsnhvimdbd19dl1q-sddm-9ee48dd/bin
greenisland.qpa.deviceintegration: Preferred EGL device integration based on the hardware configuration: "kms"
greenisland.qpa.deviceintegration: Using "kms" EGL device integration
greenisland.qpa.kms: Loading configuration from "/root/.config/greenisland/platform.json"
greenisland.qpa.kms: Could not open configuration file "/root/.config/greenisland/platform.json" for reading
greenisland.qpa.kms: Found the following video devices:
Could not find DRM device!
Aborted
root@builder /# udevadm info /sys/class/drm/card0
P: /devices/pci0000:00/0000:00:02.0/virtio0/drm/card0
N: dri/card0
E: DEVNAME=/dev/dri/card0
E: DEVPATH=/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0
E: DEVTYPE=drm_minor
E: ID_PATH=pci-0000:00:02.0
E: ID_PATH_TAG=pci-0000_00_02_0
E: MAJOR=226
E: MINOR=0
E: SUBSYSTEM=drm
E: USEC_INITIALIZED=5489503
root@builder /# lspci -s 00:02.0 -vvv
00:02.0 VGA compatible controller: Red Hat, Inc Virtio GPU (rev 01) (prog-if 00 [VGA controller])
    Subsystem: Red Hat, Inc Device 1100
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0
    Interrupt: pin A routed to IRQ 10
    Region 0: Memory at fd800000 (32-bit, prefetchable) [size=8M]
    Region 2: Memory at fe000000 (64-bit, prefetchable) [size=8M]
    Region 4: Memory at febd0000 (32-bit, non-prefetchable) [size=4K]
    Expansion ROM at 000c0000 [disabled] [size=128K]
    Capabilities: [98] MSI-X: Enable+ Count=3 Masked-
        Vector table: BAR=4 offset=00000000
        PBA: BAR=4 offset=00000800
    Capabilities: [84] Vendor Specific Information: VirtIO: <unknown>
        BAR=0 offset=00000000 size=00000000
    Capabilities: [70] Vendor Specific Information: VirtIO: Notify
        BAR=2 offset=00400000 size=00400000 multiplier=00001000
    Capabilities: [60] Vendor Specific Information: VirtIO: DeviceCfg
        BAR=2 offset=003ff000 size=00001000
    Capabilities: [50] Vendor Specific Information: VirtIO: ISR
        BAR=2 offset=003fe000 size=00001000
    Capabilities: [40] Vendor Specific Information: VirtIO: CommonCfg
        BAR=2 offset=003fd000 size=00001000
    Kernel driver in use: virtio-pci
lspci: Unable to load libkmod resources: error -12
434   fstat(4, {st_mode=S_IFREG|0444, st_size=49, ...}) = 0
434   mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdf35e26000
434   read(4, "# see udev.conf(5) for details\n\n"..., 4096) = 49
434   read(4, "", 4096)                 = 0
434   close(4)                          = 0
434   munmap(0x7fdf35e26000, 4096)      = 0
434   stat("/sys/subsystem", 0x7ffdb1a68bf0) = -1 ENOENT (No such file or directory)
434   stat("/sys/bus", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
434   open("/sys/bus", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
434   fstat(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
434   getdents(4, /* 34 entries */, 32768) = 944
434   getdents(4, /* 0 entries */, 32768) = 0
434   close(4)                          = 0
434   stat("/sys/class", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
434   open("/sys/class", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
434   fstat(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
434   getdents(4, /* 63 entries */, 32768) = 1864
434   stat("/sys/class/drm", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
434   open("/sys/class/drm", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5
434   fstat(5, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
434   getdents(5, /* 8 entries */, 32768) = 240
434   readlink("/sys/class/drm/card0-Virtual-1", "../../devices/pci0000:00/0000:00"..., 1024) = 71
434   stat("/sys/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0/card0-Virtual-1/uevent", {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
434   readlink("/sys/class/drm/card0", "../../devices/pci0000:00/0000:00"..., 1024) = 55
434   stat("/sys/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0/uevent", {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
434   getdents(5, /* 0 entries */, 32768) = 0
434   close(5)                          = 0
434   getdents(4, /* 0 entries */, 32768) = 0
434   close(4)                          = 0
434   readlink("/sys/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0", 0x7ffdb1a67fc0, 1024) = -1 EINVAL (Invalid argument)
434   stat("/sys/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0/uevent", {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
434   open("/sys/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0/uevent", O_RDONLY|O_CLOEXEC) = 4
434   fstat(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
434   mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdf35e26000
434   read(4, "MAJOR=226\nMINOR=0\nDEVNAME=dri/ca"..., 4096) = 54
434   read(4, "", 4096)                 = 0
434   close(4)                          = 0
434   munmap(0x7fdf35e26000, 4096)      = 0
434   readlink("/sys/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0/subsystem", "../../../../../../class/drm", 1024) = 27
434   open("/run/udev/data/c226:0", O_RDONLY|O_CLOEXEC) = 4
434   fstat(4, {st_mode=S_IFREG|0644, st_size=68, ...}) = 0
434   mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdf35e26000
434   read(4, "I:5489503\nE:ID_PATH=pci-0000:00:"..., 4096) = 68
434   read(4, "", 4096)                 = 0
434   close(4)                          = 0
434   munmap(0x7fdf35e26000, 4096)      = 0
434   readlink("/sys/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0/card0-Virtual-1", 0x7ffdb1a67fc0, 1024) = -1 EINVAL (Invalid argument)
434   stat("/sys/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0/card0-Virtual-1/uevent", {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
434   open("/sys/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0/card0-Virtual-1/uevent", O_RDONLY|O_CLOEXEC) = 4
434   fstat(4, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
434   mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdf35e26000
434   read(4, "", 4096)                 = 0
434   close(4)                          = 0
434   munmap(0x7fdf35e26000, 4096)      = 0
434   readlink("/sys/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0/card0-Virtual-1/subsystem", "../../../../../../../class/drm", 1024) = 30
434   open("/run/udev/data/+drm:card0-Virtual-1", O_RDONLY|O_CLOEXEC) = 4
434   fstat(4, {st_mode=S_IFREG|0644, st_size=68, ...}) = 0
434   mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdf35e26000
434   read(4, "I:5491180\nE:ID_PATH=pci-0000:00:"..., 4096) = 68
434   read(4, "", 4096)                 = 0
434   close(4)                          = 0
434   munmap(0x7fdf35e26000, 4096)      = 0
434   write(2, "greenisland.qpa.kms: Found the f"..., 56) = 56
434   write(2, "Could not find DRM device!\n", 27) = 27
434   rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
434   tgkill(434, 434, SIGABRT)         = 0
434   --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=434, si_uid=0} ---
434   +++ killed by SIGABRT +++
plfiorini commented 8 years ago

This is usually related to logind/pam, for example when you login as a user and then sudo su - and try to run the compositor.

If that is the case then login as root from the beginning (at the tty login prompt).

plfiorini commented 8 years ago

Logging in as normal user should also work.

In both cases your distro need to be properly configured to use the logind pam module. All distros should have it.

plfiorini commented 8 years ago

Ops I was too quick and didn't notice you came from the SDDM PR. That's the reason why I haven't merged the PR yet. I need to find out what's the deal with logind and sddm.

plfiorini commented 8 years ago

@dvc94ch silly me i forgot to run the compositor through the sddm-helper which is needed to open a session with logind. the issue is not in the compositor rather in sddm, the PR is now updated although i have other problems with the helper though so it's still not working.

Closing the issue here as it needs to be fixed from sddm.