Hi,
This started since 5.14-rc1. The following error appears in dmesg (as of 5.14-rc7) when I build the kernel with CONFIG_DRM_SIMPLEDRM=m
[ 3.252275] [drm] Initialized simpledrm 1.0.0 20200625 for simple-framebuffer.0 on minor 0 [ 3.252298] simple-framebuffer simple-framebuffer.0: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-22)
thanks, Amanoel
Hi
Am 24.08.21 um 00:42 schrieb Amanoel Dawod:
Hi,
This started since 5.14-rc1. The following error appears in dmesg (as of 5.14-rc7) when I build the kernel with CONFIG_DRM_SIMPLEDRM=m
[ 3.252275] [drm] Initialized simpledrm 1.0.0 20200625 for simple-framebuffer.0 on minor 0 [ 3.252298] simple-framebuffer simple-framebuffer.0: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-22)
Thanks for trying out the driver and reporting back. I suspect that your system uses a color format that is not yet supported. But let's see.
What's the platform you're on?
Simpledrm depends on the system framebuffer to be configured by the UEFI BIOS or boot loader. What's the resolution and color format on your system?
Could you please boot the kernel with the command-line option drm.debug=0x1ff and provide all dmesg output the is related to DRM?
Best regards Thomas
thanks, Amanoel
On Tue, Aug 24, 2021, at 1:49 PM, Thomas Zimmermann wrote:
Hi
Am 24.08.21 um 00:42 schrieb Amanoel Dawod:
Hi,
This started since 5.14-rc1. The following error appears in dmesg (as of 5.14-rc7) when I build the kernel with CONFIG_DRM_SIMPLEDRM=m
[ 3.252275] [drm] Initialized simpledrm 1.0.0 20200625 for simple-framebuffer.0 on minor 0 [ 3.252298] simple-framebuffer simple-framebuffer.0: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-22)
Thanks for trying out the driver and reporting back. I suspect that your system uses a color format that is not yet supported. But let's see.
What's the platform you're on?
Simpledrm depends on the system framebuffer to be configured by the UEFI BIOS or boot loader. What's the resolution and color format on your system?
Could you please boot the kernel with the command-line option drm.debug=0x1ff and provide all dmesg output the is related to DRM?
Best regards Thomas
thanks, Amanoel
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
Attachments:
- OpenPGP_signature
Thanks for your reply.
This is on x86 platform. Specifically, Gigabyte B450i board with AMD Ryzen 3400G (integrated graphics). Up to date bios version.
Resolution is 3840 x 2160.
Please find attached dmesg output related to DRM as requested.
Hi
Am 24.08.21 um 20:17 schrieb Amanoel Dawod:
Thanks for your reply.
This is on x86 platform. Specifically, Gigabyte B450i board with AMD Ryzen 3400G (integrated graphics). Up to date bios version.
Resolution is 3840 x 2160.
Simpledrm is probably slow with this resolution, but that's an unrelated issue.
Please find attached dmesg output related to DRM as requested.
I hope to get one of the internal debug error messages that the DRM console prints.
In the attached log, the amdgpu driver is too noisy. Would it be possible to disable the amdgpu and radeon drivers for this test? So only simpledrm should be active. Likely this doesn't produce any graphical output and you may have to be able to login remotely to get the log.
Best regards Thomas
On Wed, Aug 25, 2021, at 8:56 AM, Thomas Zimmermann wrote:
In the attached log, the amdgpu driver is too noisy. Would it be possible to disable the amdgpu and radeon drivers for this test? So only simpledrm should be active. Likely this doesn't produce any graphical output and you may have to be able to login remotely to get the log.
Best regards Thomas
Please find attached dmesg log without amdgpu/radeon drivers.
Hi
Am 25.08.21 um 18:01 schrieb Amanoel Dawod:
On Wed, Aug 25, 2021, at 8:56 AM, Thomas Zimmermann wrote:
In the attached log, the amdgpu driver is too noisy. Would it be possible to disable the amdgpu and radeon drivers for this test? So only simpledrm should be active. Likely this doesn't produce any graphical output and you may have to be able to login remotely to get the log.
Best regards Thomas
Please find attached dmesg log without amdgpu/radeon drivers.
Oh, now simpledrm itself fills up the log with pointless messages. :/ Looking at the file, there's plenty of Gnome buffer swapping. I suspect that Gnome works? It's just the console that's not available?
Could you please boot directly into a text terminal? That should be possible by adding systemd.unit=multi-user.target to the kernel command line if your distro uses systemd. Due to the issue, you probably won't see anything on the screen, so you may need remote access.
Thanks for your help with debugging and sorry for sending you through so many hops.
Best regards Thomas
Hi
On Wed, Aug 25, 2021, at 2:02 PM, Thomas Zimmermann wrote:
Oh, now simpledrm itself fills up the log with pointless messages. :/ Looking at the file, there's plenty of Gnome buffer swapping. I suspect that Gnome works? It's just the console that's not available?
Yes, Gnome was working, only the console was blank.
Could you please boot directly into a text terminal? That should be possible by adding systemd.unit=multi-user.target to the kernel command line if your distro uses systemd. Due to the issue, you probably won't see anything on the screen, so you may need remote access.
Thanks for your help with debugging and sorry for sending you through so many hops.
Best regards Thomas
No problem, managed to boot directly into a text terminal and grabbed DRM related dmesg log. Hopefully it's what you're looking for :)
Find it attached please.
Hi Amanoel
Am 25.08.21 um 21:12 schrieb Amanoel Dawod:
No problem, managed to boot directly into a text terminal and grabbed DRM related dmesg log. Hopefully it's what you're looking for :)
Find it attached please.
Thanks, this was helpful. The failure is shown at
[ 3.263394] [drm:0xffffffffc0303583] bad framebuffer height 2304, should be >= 768 && <= 768
where the FB height is too large. But I'm puzzled why this happens. The only way seems to be tiling, which isn't supported by Linux' simple framebuffers AFAIK. All framebuffers are supposed to be linear.
You said that the resolution is 3840 x 2160, but the attached log says 1024x768. I guess that the former is the monitor's native resolution and the latter is the display mode?
The attached patch adds a few extra lines of debugging output. Could you please apply it, rebuild, and report back with the log.
Best regards Thomas
Hi
On Thu, Aug 26, 2021, at 2:31 PM, Thomas Zimmermann wrote:
You said that the resolution is 3840 x 2160, but the attached log says 1024x768. I guess that the former is the monitor's native resolution and the latter is the display mode?
Yes, that's the monitor native resolution and what I was running within Gnome shell, but I believe since I'm now booting to text mode with only simpledrm it reports 1024x768.
The attached patch adds a few extra lines of debugging output. Could you please apply it, rebuild, and report back with the log.
Best regards Thomas
Sure, I applied the patch. Please find new dmesg output attached.
Hi,
Did anything happen with this issue? I've updated linux kernel to 5.14.7 from 5.13 today, and I've been hit with a very similar problem (even inside qemu), except in my case the height reported in "bad framebuffer height" was twice the actual height, not three times. After some digging around I've figured out that at the end of drm_fb_helper_single_fb_probe, surface_height is multiplied by CONFIG_DRM_FBDEV_OVERALLOC/100, which was somewhy set to 200 in my kernel config. Setting it to 100 fixed that problem. (It looks like the default now, I don't know why was it set to 200 in my config, maybe the old default was different).
However it's still very buggy, even after setting CONFIG_DRM_FBDEV_OVERALLOC to 100. On my notebook (ASUS G551JW, with a 4th gen i7 cpu), this is what I observe: * after the kernel boots, the tux logos rapidly flicker at the top of the screen and I only see text at the bottom of the screen. After a few seconds it returns to normal. * when starting X, whet it switches to a new VT the tux logos reappear along with some text, but only in the upper left corner. This is also only happens for a second or so, until X overtakes the display. * when terminating X, the tux logos with the garbage text remain in the upper left corner, but the rest of the screen is replaced with the correct contents. The garbage in the top left corner remains until something overwrites it (like scrolling the terminal). So it works, but buggy as hell and at this point I'm better disabling simpledrm and just relying on the i915 driver, losing early console. I tried booting with drm.debug=0x1ff, but by the time I could run dmesg it generated so many messages that the early boot messages were already lost.
Now, my desktop is even worse. Motherboard is an ASRock Z87M Extreme4, with a GeForce GT 640 and GTX 980 cards (the integrated GPU in the intel CPU is disabled in UEFI settings). Unfortunately this requires the proprietary nvidia drivers, so it's probably my own problem, but anyway it works until I it loads the nvidia drivers, then afterwards (while still in fbcon) I instead get 4 or 5 small copies of my terminal in the upper part of the screen with wrong stride, so it's completely unreadable. And if I ever start X, I won't have any fbcon until reboot. So 5.14 is basically unusable on this machine.
Any ideas what should I try? Everything worked well with 5.13 and its simplefb.
Thanks, Zoltan
Hi,
thanks for the feedback.
Am 24.09.21 um 20:03 schrieb Zoltán Kővágó:
Hi,
Did anything happen with this issue? I've updated linux kernel to 5.14.7 from 5.13 today, and I've been hit with a very similar problem (even inside qemu), except in my case the height reported in "bad framebuffer height" was twice the actual height, not three times. After some digging around I've figured out that at the end of drm_fb_helper_single_fb_probe, surface_height is multiplied by CONFIG_DRM_FBDEV_OVERALLOC/100, which was somewhy set to 200 in my kernel config. Setting it to 100 fixed that problem. (It looks like the default now, I don't know why was it set to 200 in my config, maybe the old default was different).
I was away for a while and I haven't tried this. But it was my next idea. Thanks for confirming.
However it's still very buggy, even after setting CONFIG_DRM_FBDEV_OVERALLOC to 100. On my notebook (ASUS G551JW, with a 4th gen i7 cpu), this is what I observe:
- after the kernel boots, the tux logos rapidly flicker at the top of
the screen and I only see text at the bottom of the screen. After a few seconds it returns to normal.
- when starting X, whet it switches to a new VT the tux logos reappear
along with some text, but only in the upper left corner. This is also only happens for a second or so, until X overtakes the display.
- when terminating X, the tux logos with the garbage text remain in the
upper left corner, but the rest of the screen is replaced with the correct contents. The garbage in the top left corner remains until something overwrites it (like scrolling the terminal). So it works, but buggy as hell and at this point I'm better disabling simpledrm and just relying on the i915 driver, losing early console. I tried booting with drm.debug=0x1ff, but by the time I could run dmesg it generated so many messages that the early boot messages were already lost.
It's all build around core DRM helpers. I don't know why simpledrm seems error prone, while the other drivers work with these same helpers. Something to explore...
Now, my desktop is even worse. Motherboard is an ASRock Z87M Extreme4, with a GeForce GT 640 and GTX 980 cards (the integrated GPU in the intel CPU is disabled in UEFI settings). Unfortunately this requires the proprietary nvidia drivers, so it's probably my own problem, but anyway it works until I it loads the nvidia drivers, then afterwards (while still in fbcon) I instead get 4 or 5 small copies of my terminal in the upper part of the screen with wrong stride, so it's completely unreadable. And if I ever start X, I won't have any fbcon until reboot. So 5.14 is basically unusable on this machine.
Ask Nvidia.
Any ideas what should I try? Everything worked well with 5.13 and its simplefb.
I'd suggest to go back to simplefb for a while and maybe try simpledrm occasionally.
Best regards Thomas
Thanks, Zoltan
Hi,
On 2021-09-24 20:19, Thomas Zimmermann wrote:
Ask Nvidia.
I've tried nouveau in the meantime, but it takes over simpledrm (and changes the screen resolution and turns on the secondary display), so it's completely different. And it also works, at half the performance.
Any ideas what should I try? Everything worked well with 5.13 and its simplefb.
I'd suggest to go back to simplefb for a while and maybe try simpledrm occasionally.
Oh, I was under the impression that simplefb was removed from the kernel. It turns out it just has `depends on (FB = y) && !DRM_SIMPLEDRM`, so it didn't show up in the config after I enabled simpledrm. Ouch. Based on a quick test, simplefb fortunately still appears to work.
Thanks, Zoltan
dri-devel@lists.freedesktop.org