edelweiss-tech / kernel

Baikal-M Linux kernel
Other
0 stars 2 forks source link

(LVDS) monitor stays in idle state forever #1

Open asheplyakov opened 3 years ago

asheplyakov commented 3 years ago

Steps to reproduce:

  1. Login into the desktop environment (xfce)
  2. (Optional) Configure the screen saver to switch monitor to the idle state in 5 minutes of inactivity
  3. Wait long enough so the monitor goes idle
  4. Move the mouse or press some key(s)

Expected result: monitor is switched on

Actual result: monitor is idle, the kernel complains:

 2408.382970] CPU: 3 PID: 3825 Comm: X Tainted: G        W         5.4.91-bm-g9db6bd7ac976-dirty #1
[ 2408.382973] Hardware name: Baikal Electronics Baikal-M mitx board (DT)
[ 2408.382977] pstate: 80000005 (Nzcv daif -PAN -UAO)
[ 2408.382981] pc : drm_atomic_helper_wait_for_vblanks.part.26+0x2a4/0x2b0
[ 2408.382985] lr : drm_atomic_helper_wait_for_vblanks.part.26+0x2a4/0x2b0
[ 2408.382987] sp : ffff800012d6b940
[ 2408.382990] x29: ffff800012d6b940 x28: 0000000000022fb0 
[ 2408.382994] x27: ffff00093f804980 x26: 0000000000000000 
[ 2408.382998] x25: 0000000000000000 x24: ffff0009722c6800 
[ 2408.383002] x23: 0000000000000001 x22: 0000000000000038 
[ 2408.383006] x21: 0000000000000001 x20: ffff00096fff24f8 
[ 2408.383009] x19: 0000000000000000 x18: ffffffffffffffff 
[ 2408.383012] x17: 0000000000000000 x16: 0000000000000000 
[ 2408.383015] x15: ffff8000110885c8 x14: ffff80001120ff70 
[ 2408.383019] x13: ffff80001120fb98 x12: 0000003c00000000 
[ 2408.383022] x11: ffff8000110a5000 x10: ffff8000111ed000 
[ 2408.383025] x9 : 0000000000000000 x8 : ffff800011202f0b 
[ 2408.383028] x7 : 0000000000000000 x6 : 0000000000000001 
[ 2408.383032] x5 : 0000000000000000 x4 : 0000000000000001 
[ 2408.383035] x3 : 0000000000000007 x2 : 0000000000000006 
[ 2408.383038] x1 : 7279fdc52803da00 x0 : 0000000000000000 
[ 2408.383041] Call trace:
[ 2408.383047]  drm_atomic_helper_wait_for_vblanks.part.26+0x2a4/0x2b0
[ 2408.383050]  drm_atomic_helper_commit_tail+0x68/0x80
[ 2408.383054]  commit_tail+0x10c/0x118
[ 2408.383057]  drm_atomic_helper_commit+0xdc/0x158
[ 2408.383063]  drm_atomic_commit+0x54/0x60
[ 2408.383069]  drm_client_modeset_commit_atomic.isra.11+0x180/0x1f0
[ 2408.383073]  drm_client_modeset_commit_force+0x68/0x1a0
[ 2408.383078]  drm_fb_helper_pan_display+0xe8/0x1e0
[ 2408.383085]  fb_pan_display+0xc4/0x160
[ 2408.383088]  do_fb_ioctl+0x344/0x650
[ 2408.383091]  fb_ioctl+0x5c/0x78
[ 2408.383096]  do_vfs_ioctl+0xc8/0xa40
[ 2408.383099]  ksys_ioctl+0x50/0x80
[ 2408.383102]  __arm64_sys_ioctl+0x28/0xb8
[ 2408.383108]  el0_svc_common.constprop.3+0x74/0x170
[ 2408.383110]  el0_svc_handler+0x80/0xa0
[ 2408.383115]  el0_svc+0x8/0x1fc
[ 2408.383118] ---[ end trace 80e9557d5ce8a379 ]---
[ 2408.657271] [drm:baikal_vdu_crtc_atomic_check] *ERROR* Requested pixel clock is 0 Hz, available - 1928571
asheplyakov commented 3 years ago

The boot loader (grub) tries to switch the screen resolution to 800x600. However such video modes are not supported, so the panel switches off. Linux kernel does not control the LVDS-DP bridge directly, so it can't reset the hardware and set an appropriate video mode. Thus the panel stays idle forever (or rather to the next reboot).

As of now we use the gfxmode=auto in grub.cfg to avoid the problem. However this is very fragile. To solve the problem for real the (UEFI) firmware should reject unsupported video modes. Alternatively the kernel should be equipped with a proper driver so it can re-initialize the (LVDS-display port bridge) hardware on its own.