Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Screen tearing in TTY after switching to gentoo-kernel-bin
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
LemonBreezes
n00b
n00b


Joined: 04 Aug 2022
Posts: 4

PostPosted: Fri Aug 05, 2022 12:06 am    Post subject: Screen tearing in TTY after switching to gentoo-kernel-bin Reply with quote

Hello everyone. Previously, I compiled my kernel from source and the TTYs worked fine. Now, after switching to sys-kernel/gentoo-kernel-bin, I get this screen tearing after the initial kernel output is finished. Here is a picture:
https://imgur.com/a/grEk3JZ
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Fri Aug 05, 2022 5:42 am    Post subject: Reply with quote

This does not look like tearing but more like graphical corruption. Tearing is transient while moving things are displayed on the screen and goes away when the screen is static again.

DRM uses handover which first loads a generic DRM/framebuffer driver (like simpledrm, fb_simple, efifb, vesafb, etc.) and then switches over to a hardware-specific driver (like i915, amdgpu, nouveau, radeon, etc.). Sometimes this does not work properly.

What you can do is look in dmesg for the handover message and explicitly disable the generic driver using video=drivername:off kernel parameter. Post the entire dmesg here if you don't find it.
Back to top
View user's profile Send private message
LemonBreezes
n00b
n00b


Joined: 04 Aug 2022
Posts: 4

PostPosted: Sat Aug 06, 2022 9:53 pm    Post subject: Reply with quote

chithanh wrote:
This does not look like tearing but more like graphical corruption. Tearing is transient while moving things are displayed on the screen and goes away when the screen is static again.

DRM uses handover which first loads a generic DRM/framebuffer driver (like simpledrm, fb_simple, efifb, vesafb, etc.) and then switches over to a hardware-specific driver (like i915, amdgpu, nouveau, radeon, etc.). Sometimes this does not work properly.

What you can do is look in dmesg for the handover message and explicitly disable the generic driver using video=drivername:off kernel parameter. Post the entire dmesg here if you don't find it.


Hello chithanh. Here is my dmesg output: http://ix.io/46Ra/text. Also, I finally fixed it! Adding line "options nvidia-drm modeset=0'' to /etc/modprobe.d/nvidia.conf completely fixed the issue for me.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2892

PostPosted: Sun Aug 07, 2022 5:16 am    Post subject: Reply with quote

gentoo-kernel-bin uses fedora's configs and they recently enabled CONFIG_DRM_SIMPLEDRM in 5.18+ which typically takes over from things like FB_EFI and FB_SIMPLE (may have unexpected consequence and is generally broken with nvidia)

You could try force-disabling it in the kernel command line to see if it helps: initcall_blacklist=simpledrm_platform_driver_init (I think that should work anyway, haven't tried -- should fallback to FB_EFI which fedora recently re-enabled)
Back to top
View user's profile Send private message
LemonBreezes
n00b
n00b


Joined: 04 Aug 2022
Posts: 4

PostPosted: Sun Aug 07, 2022 5:28 am    Post subject: Reply with quote

Ionen wrote:
gentoo-kernel-bin uses fedora's configs and they recently enabled CONFIG_DRM_SIMPLEDRM in 5.18+ which typically takes over from things like FB_EFI and FB_SIMPLE (may have unexpected consequence and is generally broken with nvidia)

You could try force-disabling it in the kernel command line to see if it helps: initcall_blacklist=simpledrm_platform_driver_init (I think that should work anyway, haven't tried -- should fallback to FB_EFI which fedora recently re-enabled)


Hello Ionen. I still have the issue where the TTYs don't work after I run startx, even though there is no longer any visible corruption. I am indeed on 5.18.16 currently. I tried adding initcall_blacklist=simpledrm_platform_driver_init to my kernel parameters but that led to no visible output after the "loading initramfs" line.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2892

PostPosted: Sun Aug 07, 2022 5:31 am    Post subject: Reply with quote

I see, I guess it doesn't fallback to EFI with that then (sorry). Unfortunately not sure what else to suggest right now (haven't experimented with this).

I imagine stable gentoo-kernel-bin-5.15.x would work meanwhile though.
Back to top
View user's profile Send private message
LemonBreezes
n00b
n00b


Joined: 04 Aug 2022
Posts: 4

PostPosted: Sun Aug 07, 2022 5:58 am    Post subject: Reply with quote

Ionen wrote:
I see, I guess it doesn't fallback to EFI with that then (sorry). Unfortunately not sure what else to suggest right now (haven't experimented with this).

I imagine stable gentoo-kernel-bin-5.15.x would work meanwhile though.


Thanks. Downgrading to the stable gentoo-kernel-bin fixed the TTY switching issues. Now all the issues are fixed. I was using 5.17.x when I ran my manually configured kernel and updated to 5.18.x when I switched to gentoo-kernel-bin.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Tue Aug 09, 2022 11:27 am    Post subject: Reply with quote

Code:
[    2.279739] simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device
That can be disabled with video=simpledrmdrmfb:off kernel parameter. Should fallback to efifb then, or worst case have no console until nvidia driver loads. Going back to older kernel is only a temporary workaround, and disabling kernel modesetting for nvidia causes the TTY switching issues (I think).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum