isjerryxiao / kmsvnc

A VNC server for DRM/KMS capable GNU/Linux devices
GNU General Public License v3.0
50 stars 6 forks source link

i915: no usable planes found #20

Open 532910 opened 3 days ago

532910 commented 3 days ago
# ./kmsvnc 
No keyboard layout set from environment variables, use US layout by default
See https://xkbcommon.org/doc/current/structxkb__rule__names.html
drm driver is i915
Plane 32 CRTC 0 FB 0 Type primary
Plane 41 CRTC 0 FB 0 Type overlay
Plane 50 CRTC 0 FB 0 Type overlay
Plane 59 CRTC 0 FB 0 Type overlay
Plane 68 CRTC 0 FB 0 Type overlay
Plane 77 CRTC 0 FB 0 Type overlay
Plane 86 CRTC 0 FB 0 Type overlay
Plane 95 CRTC 0 FB 0 Type cursor
Plane 102 CRTC 0 FB 0 Type primary
Plane 111 CRTC 0 FB 0 Type overlay
Plane 120 CRTC 0 FB 0 Type overlay
Plane 129 CRTC 0 FB 0 Type overlay
Plane 138 CRTC 0 FB 0 Type overlay
Plane 147 CRTC 0 FB 0 Type overlay
Plane 156 CRTC 0 FB 0 Type overlay
Plane 165 CRTC 0 FB 0 Type cursor
Plane 172 CRTC 0 FB 0 Type primary
Plane 181 CRTC 0 FB 0 Type overlay
Plane 190 CRTC 0 FB 0 Type overlay
Plane 199 CRTC 0 FB 0 Type overlay
Plane 208 CRTC 0 FB 0 Type overlay
Plane 217 CRTC 0 FB 0 Type overlay
Plane 226 CRTC 0 FB 0 Type overlay
Plane 235 CRTC 0 FB 0 Type cursor
No usable planes found
% tree /dev/dri
[drwxr-xr-x root     root      201]  /dev/dri/
├── [drwxr-xr-x root     root      101]  by-path/
│   ├── [lrwxrwxrwx root     root        8]  pci-0000:00:02.0-card -> ../card0
│   └── [lrwxrwxrwx root     root       13]  pci-0000:00:02.0-render -> ../renderD128
├── [crw-rw---- root     video       0]  card0
└── [crw-rw---- root     render      0]  renderD128
% lspci -vnn -s 00:02.0
00:02.0 VGA compatible controller [0300]: Intel Corporation JasperLake [UHD Graphics] [8086:4e61] (rev 01) (prog-if 00 [VGA controller])
    DeviceName: Onboard - Video
    Subsystem: Intel Corporation Device [8086:2212]
    Flags: bus master, fast devsel, latency 0, IRQ 138, IOMMU group 0
    Memory at 6000000000 (64-bit, non-prefetchable) [size=16M]
    Memory at 4000000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 3000 [size=64]
    Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
    Capabilities: <access denied>
    Kernel driver in use: i915
    Kernel modules: i915
% uname -a                                                                                                             
Linux pc 6.11.9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.11.9-1 (2024-11-17) x86_64 GNU/Linux

CPU Intel Celeron N5105

532910 commented 2 days ago

the same issue with Intel Atom x5-Z8330 and

% lspci -vnn -s 00:02.0

00:02.0 VGA compatible controller [0300]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller [8086:22b0] (rev 36) (prog-if 00 [VGA controller])
    DeviceName:  Onboard IGD
    Subsystem: Intel Corporation Device [8086:2066]
    Flags: bus master, fast devsel, latency 0, IRQ 168
    Memory at 90000000 (64-bit, non-prefetchable) [size=16M]
    Memory at 80000000 (64-bit, prefetchable) [size=256M]
    I/O ports at f000 [size=64]
    Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
    Capabilities: <access denied>
    Kernel driver in use: i915
    Kernel modules: i915
532910 commented 2 days ago

For N5105 it helped to set i915.modeset=1 as it -1 by default, which means "force vga console preference"

# kmsvnc                  
No keyboard layout set from environment variables, use US layout by default
See https://xkbcommon.org/doc/current/structxkb__rule__names.html
drm driver is i915
Plane 32 CRTC 100 FB 259 Type primary
Using plane 32 to locate framebuffers
Template framebuffer is 259: 3840x2160 fourcc:808669761 mod:72057594037927938 flags:2
handles 1 0 0 0
offsets 0 0 0 0
pitches 15360 0 0 0
format AR30, modifier INTEL:Y_TILED
vaapi vendor Intel iHD driver for Intel(R) Gen Graphics - 24.4.0 ()
got vaapi image:
image fmt: fourcc 808669761, AR30, byte_order VA_LSB_FIRST, bpp 32, depth 30, blue_mask 0x3ff, green_mask 0xffc00, red_mask 0x3ff00000, alpha_mask 0x30000000, reserved 0 0 0 0
22/11/2024 06:32:54 Listening for VNC connections on TCP port 5900
22/11/2024 06:32:54 Listening for VNC connections on TCP6 port 5900

Though only once, after next reboot, it fails:

# kmsvnc
No keyboard layout set from environment variables, use US layout by default
See https://xkbcommon.org/doc/current/structxkb__rule__names.html
drm driver is i915
Plane 32 CRTC 100 FB 259 Type primary
Using plane 32 to locate framebuffers
Template framebuffer is 259: 3840x2160 fourcc:808665665 mod:72057594037927938 flags:2
handles 1 0 0 0
offsets 0 0 0 0
pitches 15360 0 0 0
format AB30, modifier INTEL:Y_TILED
vaapi vendor Intel iHD driver for Intel(R) Gen Graphics - 24.4.0 ()
Unsupported pixfmt AB30 for vaapi, please create an issue with your pixfmt.
532910 commented 2 days ago

for x5-Z8330 i915.modeset=1 changes nothing:

# cat /sys/module/i915/parameters/modeset
1
# kmsvnc
No keyboard layout set from environment variables, use US layout by default
See https://xkbcommon.org/doc/current/structxkb__rule__names.html
drm driver is i915
Plane 32 CRTC 0 FB 0 Type primary
Plane 36 CRTC 0 FB 0 Type overlay
Plane 42 CRTC 0 FB 0 Type overlay
Plane 48 CRTC 0 FB 0 Type cursor
Plane 54 CRTC 0 FB 0 Type primary
Plane 58 CRTC 0 FB 0 Type overlay
Plane 64 CRTC 0 FB 0 Type overlay
Plane 70 CRTC 0 FB 0 Type cursor
Plane 76 CRTC 0 FB 0 Type primary
Plane 80 CRTC 0 FB 0 Type overlay
Plane 86 CRTC 0 FB 0 Type overlay
Plane 92 CRTC 0 FB 0 Type cursor
No usable planes found
532910 commented 2 days ago

next try: I removed i915.modeset=1 on N5105 and this time it started:

# cat /sys/module/i915/parameters/modeset
-1
# kmsvnc
No keyboard layout set from environment variables, use US layout by default
See https://xkbcommon.org/doc/current/structxkb__rule__names.html
drm driver is i915
Plane 32 CRTC 100 FB 259 Type primary
Using plane 32 to locate framebuffers
Template framebuffer is 259: 3840x2160 fourcc:808669761 mod:72057594037927938 flags:2
handles 1 0 0 0
offsets 0 0 0 0
pitches 15360 0 0 0
format AR30, modifier INTEL:Y_TILED
vaapi vendor Intel iHD driver for Intel(R) Gen Graphics - 24.4.0 ()
got vaapi image:
image fmt: fourcc 808669761, AR30, byte_order VA_LSB_FIRST, bpp 32, depth 30, blue_mask 0x3ff, green_mask 0xffc00, red_mask 0x3ff00000, alpha_mask 0x30000000, reserved 0 0 0 0
22/11/2024 07:24:10 Listening for VNC connections on TCP port 5900
22/11/2024 07:24:10 Listening for VNC connections on TCP6 port 5900
532910 commented 2 days ago

wow, this error happens when no monitor is connected (x5-Z8330 in my case) or it's suspended (N5105)

and here's why rebooting helped

chvt 1 / chvt 7 also makes it work

532910 commented 2 days ago

with Matrox G200eW it works even with no monitor connected

07:03.0 VGA compatible controller [0300]: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 [102b:0532] (rev 0a) (prog-if 00 [VGA controller])
    DeviceName:  Onboard VGA
    Subsystem: Super Micro Computer Inc MGA G200eW WPCM450 [15d9:0640]
    Flags: bus master, medium devsel, latency 64, IRQ 23, IOMMU group 7
    Memory at de000000 (32-bit, prefetchable) [size=16M]
    Memory at df800000 (32-bit, non-prefetchable) [size=16K]
    Memory at df000000 (32-bit, non-prefetchable) [size=8M]
    Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
    Capabilities: <access denied>
    Kernel driver in use: mgag200
    Kernel modules: matroxfb_base, mgag200