Since Linux 3.1 I'm having some problems with i915 driver on HP nc6120 with 915GM chipset. The display goes black after the kernel tries to blank screen while LID is closed (see steps to reproduce to more detailed description). Currently I'm using Linux 3.7-rc6 with KMS enabled and disabled ACPI video by something equivalent to (without it the LID, and the whole ACPI, does not work): diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 0230cb6..40e060b 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -1782,6 +1797,10 @@ static int __init intel_opregion_present(void) int acpi_video_register(void) { int result = 0; + return -ENODEV; if (register_count) { /* * if the function of acpi_video_register is already called, I also tested this kernel with merged git://people.freedesktop.org/~danvet/drm-intel drm-intel-next. Steps to reproduce: 1. $ setterm -blank 1 2. close LID 3. sleep 90 4. open LID 5. press key 6. close LID nothing happens here, the screen is still turned on, should be turned off 7. open LID backlight is on, but screen is black, but some artifacts are visible so LCD is probably turned off, and the display is not usable anymore I have bisected this problem and it's introduced by commit 120eced9efe7fdb5123db4ea47e9adee9b66284e (drm/i915: Set crtc DPMS mode to ON in intel_crtc_mode_set). In Linux 3.1 to 3.6 I've been using following workaround: diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 2163818..51ebb77 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6000,10 +6000,12 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, x, y, old_fb); drm_vblank_post_modeset(dev, pipe); +#if 0 if (ret) intel_crtc->dpms_mode = DRM_MODE_DPMS_OFF; else intel_crtc->dpms_mode = DRM_MODE_DPMS_ON; +#endif return ret; } Thanks, Krzysiek --- # lspci -v ... 00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03) (prog-if 00 [VGA controller]) Subsystem: Hewlett-Packard Company NX6110/NC6120 Flags: bus master, fast devsel, latency 0, IRQ 16 Memory at d0400000 (32-bit, non-prefetchable) [size=512K] I/O ports at 7000 [size=8] Memory at c0000000 (32-bit, prefetchable) [size=256M] Memory at d0480000 (32-bit, non-prefetchable) [size=256K] Expansion ROM at <unassigned> [disabled] Capabilities: [d0] Power Management version 2 Kernel driver in use: i915 00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03) Subsystem: Hewlett-Packard Company NX6110/NC6120 Flags: bus master, fast devsel, latency 0 Memory at d0500000 (32-bit, non-prefetchable) [size=512K] Capabilities: [d0] Power Management version 2 $ dmesg ... ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:3588 intel_modeset_check_state+0x612/0x640() Hardware name: NC6120(EK094ES) active connector not linked to encoder Pid: 420, comm: kworker/0:2 Not tainted 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<80394cc2>] ? intel_modeset_check_state+0x612/0x640 [<80394cc2>] ? intel_modeset_check_state+0x612/0x640 [<80131203>] ? warn_slowpath_fmt+0x33/0x40 [<80394cc2>] ? intel_modeset_check_state+0x612/0x640 [<8032336f>] ? acpi_lid_open+0x25/0x3e [<8039962d>] ? intel_lid_notify+0x8d/0xb0 [<80151fb2>] ? notifier_call_chain+0x42/0x60 [<801522b4>] ? __blocking_notifier_call_chain+0x44/0x60 [<801522e7>] ? blocking_notifier_call_chain+0x17/0x20 [<80322e2a>] ? acpi_lid_send_state+0x7e/0xa2 [<80322e92>] ? acpi_button_notify+0x2f/0xae [<8030511b>] ? acpi_device_notify+0xf/0x11 [<8030f5eb>] ? acpi_ev_notify_dispatch+0x2b/0x40 [<80302f08>] ? acpi_os_execute_deferred+0x18/0x21 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80302ef0>] ? acpi_os_wait_events_complete+0x14/0x14 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687cc ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:3590 intel_modeset_check_state+0x5ef/0x640() Hardware name: NC6120(EK094ES) encoder->connectors_active not set Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<80394c9f>] ? intel_modeset_check_state+0x5ef/0x640 [<80394c9f>] ? intel_modeset_check_state+0x5ef/0x640 [<80131203>] ? warn_slowpath_fmt+0x33/0x40 [<80394c9f>] ? intel_modeset_check_state+0x5ef/0x640 [<8032336f>] ? acpi_lid_open+0x25/0x3e [<8039962d>] ? intel_lid_notify+0x8d/0xb0 [<80151fb2>] ? notifier_call_chain+0x42/0x60 [<801522b4>] ? __blocking_notifier_call_chain+0x44/0x60 [<801522e7>] ? blocking_notifier_call_chain+0x17/0x20 [<80322e2a>] ? acpi_lid_send_state+0x7e/0xa2 [<80322e92>] ? acpi_button_notify+0x2f/0xae [<8030511b>] ? acpi_device_notify+0xf/0x11 [<8030f5eb>] ? acpi_ev_notify_dispatch+0x2b/0x40 [<80302f08>] ? acpi_os_execute_deferred+0x18/0x21 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80302ef0>] ? acpi_os_wait_events_complete+0x14/0x14 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687cd ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:3594 intel_modeset_check_state+0x5a9/0x640() Hardware name: NC6120(EK094ES) Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<80394c59>] ? intel_modeset_check_state+0x5a9/0x640 [<80394c59>] ? intel_modeset_check_state+0x5a9/0x640 [<80131269>] ? warn_slowpath_null+0x19/0x20 [<80394c59>] ? intel_modeset_check_state+0x5a9/0x640 [<8039962d>] ? intel_lid_notify+0x8d/0xb0 [<80151fb2>] ? notifier_call_chain+0x42/0x60 [<801522b4>] ? __blocking_notifier_call_chain+0x44/0x60 [<801522e7>] ? blocking_notifier_call_chain+0x17/0x20 [<80322e2a>] ? acpi_lid_send_state+0x7e/0xa2 [<80322e92>] ? acpi_button_notify+0x2f/0xae [<8030511b>] ? acpi_device_notify+0xf/0x11 [<8030f5eb>] ? acpi_ev_notify_dispatch+0x2b/0x40 [<80302f08>] ? acpi_os_execute_deferred+0x18/0x21 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80302ef0>] ? acpi_os_wait_events_complete+0x14/0x14 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687ce ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:6968 intel_modeset_check_state+0x4c8/0x640() Hardware name: NC6120(EK094ES) encoder's hw state doesn't match sw tracking (expected 0, found 1) Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<80394b78>] ? intel_modeset_check_state+0x4c8/0x640 [<80394b78>] ? intel_modeset_check_state+0x4c8/0x640 [<80131203>] ? warn_slowpath_fmt+0x33/0x40 [<80394b78>] ? intel_modeset_check_state+0x4c8/0x640 [<8039962d>] ? intel_lid_notify+0x8d/0xb0 [<80151fb2>] ? notifier_call_chain+0x42/0x60 [<801522b4>] ? __blocking_notifier_call_chain+0x44/0x60 [<801522e7>] ? blocking_notifier_call_chain+0x17/0x20 [<80322e2a>] ? acpi_lid_send_state+0x7e/0xa2 [<80322e92>] ? acpi_button_notify+0x2f/0xae [<8030511b>] ? acpi_device_notify+0xf/0x11 [<8030f5eb>] ? acpi_ev_notify_dispatch+0x2b/0x40 [<80302f08>] ? acpi_os_execute_deferred+0x18/0x21 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80302ef0>] ? acpi_os_wait_events_complete+0x14/0x14 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687cf ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:1225 assert_pipe+0x95/0xa0() Hardware name: NC6120(EK094ES) pipe A assertion failure (expected off, current on) Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<8038e0d5>] ? assert_pipe+0x95/0xa0 [<8038e0d5>] ? assert_pipe+0x95/0xa0 [<80131203>] ? warn_slowpath_fmt+0x33/0x40 [<8038e0d5>] ? assert_pipe+0x95/0xa0 [<80394a4e>] ? intel_modeset_check_state+0x39e/0x640 [<8039962d>] ? intel_lid_notify+0x8d/0xb0 [<80151fb2>] ? notifier_call_chain+0x42/0x60 [<801522b4>] ? __blocking_notifier_call_chain+0x44/0x60 [<801522e7>] ? blocking_notifier_call_chain+0x17/0x20 [<80322e2a>] ? acpi_lid_send_state+0x7e/0xa2 [<80322e92>] ? acpi_button_notify+0x2f/0xae [<8030511b>] ? acpi_device_notify+0xf/0x11 [<8030f5eb>] ? acpi_ev_notify_dispatch+0x2b/0x40 [<80302f08>] ? acpi_os_execute_deferred+0x18/0x21 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80302ef0>] ? acpi_os_wait_events_complete+0x14/0x14 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687d0 ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:3588 intel_modeset_check_state+0x612/0x640() Hardware name: NC6120(EK094ES) active connector not linked to encoder Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<80394cc2>] ? intel_modeset_check_state+0x612/0x640 [<80394cc2>] ? intel_modeset_check_state+0x612/0x640 [<80131203>] ? warn_slowpath_fmt+0x33/0x40 [<80394cc2>] ? intel_modeset_check_state+0x612/0x640 [<80393728>] ? intel_crtc_update_dpms+0x78/0x90 [<803570d7>] ? drm_fb_helper_dpms.isra.11+0x77/0xc0 [<8035755d>] ? drm_fb_helper_blank+0x4d/0x70 [<802f2f04>] ? fb_blank+0x44/0xb0 [<802fba09>] ? fbcon_blank+0x1d9/0x2d0 [<802314b2>] ? flush_commit_list+0x562/0x620 [<8014683a>] ? __queue_delayed_work+0xaa/0x140 [<801581c9>] ? dequeue_task_fair+0x29/0x1a0 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344ad5>] ? do_unblank_screen+0x95/0x1b0 [<80344ffc>] ? console_callback+0xec/0x110 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344f10>] ? poke_blanked_console+0xb0/0xb0 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687d1 ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:3590 intel_modeset_check_state+0x5ef/0x640() Hardware name: NC6120(EK094ES) encoder->connectors_active not set Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<80394c9f>] ? intel_modeset_check_state+0x5ef/0x640 [<80394c9f>] ? intel_modeset_check_state+0x5ef/0x640 [<80131203>] ? warn_slowpath_fmt+0x33/0x40 [<80394c9f>] ? intel_modeset_check_state+0x5ef/0x640 [<80393728>] ? intel_crtc_update_dpms+0x78/0x90 [<803570d7>] ? drm_fb_helper_dpms.isra.11+0x77/0xc0 [<8035755d>] ? drm_fb_helper_blank+0x4d/0x70 [<802f2f04>] ? fb_blank+0x44/0xb0 [<802fba09>] ? fbcon_blank+0x1d9/0x2d0 [<802314b2>] ? flush_commit_list+0x562/0x620 [<8014683a>] ? __queue_delayed_work+0xaa/0x140 [<801581c9>] ? dequeue_task_fair+0x29/0x1a0 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344ad5>] ? do_unblank_screen+0x95/0x1b0 [<80344ffc>] ? console_callback+0xec/0x110 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344f10>] ? poke_blanked_console+0xb0/0xb0 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687d2 ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:3594 intel_modeset_check_state+0x5a9/0x640() Hardware name: NC6120(EK094ES) Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<80394c59>] ? intel_modeset_check_state+0x5a9/0x640 [<80394c59>] ? intel_modeset_check_state+0x5a9/0x640 [<80131269>] ? warn_slowpath_null+0x19/0x20 [<80394c59>] ? intel_modeset_check_state+0x5a9/0x640 [<80393728>] ? intel_crtc_update_dpms+0x78/0x90 [<803570d7>] ? drm_fb_helper_dpms.isra.11+0x77/0xc0 [<8035755d>] ? drm_fb_helper_blank+0x4d/0x70 [<802f2f04>] ? fb_blank+0x44/0xb0 [<802fba09>] ? fbcon_blank+0x1d9/0x2d0 [<802314b2>] ? flush_commit_list+0x562/0x620 [<8014683a>] ? __queue_delayed_work+0xaa/0x140 [<801581c9>] ? dequeue_task_fair+0x29/0x1a0 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344ad5>] ? do_unblank_screen+0x95/0x1b0 [<80344ffc>] ? console_callback+0xec/0x110 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344f10>] ? poke_blanked_console+0xb0/0xb0 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687d3 ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:6968 intel_modeset_check_state+0x4c8/0x640() Hardware name: NC6120(EK094ES) encoder's hw state doesn't match sw tracking (expected 0, found 1) Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<80394b78>] ? intel_modeset_check_state+0x4c8/0x640 [<80394b78>] ? intel_modeset_check_state+0x4c8/0x640 [<80131203>] ? warn_slowpath_fmt+0x33/0x40 [<80394b78>] ? intel_modeset_check_state+0x4c8/0x640 [<803570d7>] ? drm_fb_helper_dpms.isra.11+0x77/0xc0 [<8035755d>] ? drm_fb_helper_blank+0x4d/0x70 [<802f2f04>] ? fb_blank+0x44/0xb0 [<802fba09>] ? fbcon_blank+0x1d9/0x2d0 [<802314b2>] ? flush_commit_list+0x562/0x620 [<8014683a>] ? __queue_delayed_work+0xaa/0x140 [<801581c9>] ? dequeue_task_fair+0x29/0x1a0 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344ad5>] ? do_unblank_screen+0x95/0x1b0 [<80344ffc>] ? console_callback+0xec/0x110 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344f10>] ? poke_blanked_console+0xb0/0xb0 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687d4 ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:1225 assert_pipe+0x95/0xa0() Hardware name: NC6120(EK094ES) pipe A assertion failure (expected off, current on) Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<8038e0d5>] ? assert_pipe+0x95/0xa0 [<8038e0d5>] ? assert_pipe+0x95/0xa0 [<80131203>] ? warn_slowpath_fmt+0x33/0x40 [<8038e0d5>] ? assert_pipe+0x95/0xa0 [<80394a4e>] ? intel_modeset_check_state+0x39e/0x640 [<803570d7>] ? drm_fb_helper_dpms.isra.11+0x77/0xc0 [<8035755d>] ? drm_fb_helper_blank+0x4d/0x70 [<802f2f04>] ? fb_blank+0x44/0xb0 [<802fba09>] ? fbcon_blank+0x1d9/0x2d0 [<802314b2>] ? flush_commit_list+0x562/0x620 [<8014683a>] ? __queue_delayed_work+0xaa/0x140 [<801581c9>] ? dequeue_task_fair+0x29/0x1a0 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344ad5>] ? do_unblank_screen+0x95/0x1b0 [<80344ffc>] ? console_callback+0xec/0x110 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344f10>] ? poke_blanked_console+0xb0/0xb0 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687d5 ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:3588 intel_modeset_check_state+0x612/0x640() Hardware name: NC6120(EK094ES) active connector not linked to encoder Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<80394cc2>] ? intel_modeset_check_state+0x612/0x640 [<80394cc2>] ? intel_modeset_check_state+0x612/0x640 [<80131203>] ? warn_slowpath_fmt+0x33/0x40 [<80394cc2>] ? intel_modeset_check_state+0x612/0x640 [<803570d7>] ? drm_fb_helper_dpms.isra.11+0x77/0xc0 [<8035755d>] ? drm_fb_helper_blank+0x4d/0x70 [<802f2f04>] ? fb_blank+0x44/0xb0 [<802fba09>] ? fbcon_blank+0x1d9/0x2d0 [<802314b2>] ? flush_commit_list+0x562/0x620 [<8014683a>] ? __queue_delayed_work+0xaa/0x140 [<801581c9>] ? dequeue_task_fair+0x29/0x1a0 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344ad5>] ? do_unblank_screen+0x95/0x1b0 [<80344ffc>] ? console_callback+0xec/0x110 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344f10>] ? poke_blanked_console+0xb0/0xb0 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687d6 ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:3590 intel_modeset_check_state+0x5ef/0x640() Hardware name: NC6120(EK094ES) encoder->connectors_active not set Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<80394c9f>] ? intel_modeset_check_state+0x5ef/0x640 [<80394c9f>] ? intel_modeset_check_state+0x5ef/0x640 [<80131203>] ? warn_slowpath_fmt+0x33/0x40 [<80394c9f>] ? intel_modeset_check_state+0x5ef/0x640 [<803570d7>] ? drm_fb_helper_dpms.isra.11+0x77/0xc0 [<8035755d>] ? drm_fb_helper_blank+0x4d/0x70 [<802f2f04>] ? fb_blank+0x44/0xb0 [<802fba09>] ? fbcon_blank+0x1d9/0x2d0 [<802314b2>] ? flush_commit_list+0x562/0x620 [<8014683a>] ? __queue_delayed_work+0xaa/0x140 [<801581c9>] ? dequeue_task_fair+0x29/0x1a0 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344ad5>] ? do_unblank_screen+0x95/0x1b0 [<80344ffc>] ? console_callback+0xec/0x110 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344f10>] ? poke_blanked_console+0xb0/0xb0 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687d7 ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:3594 intel_modeset_check_state+0x5a9/0x640() Hardware name: NC6120(EK094ES) Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<80394c59>] ? intel_modeset_check_state+0x5a9/0x640 [<80394c59>] ? intel_modeset_check_state+0x5a9/0x640 [<80131269>] ? warn_slowpath_null+0x19/0x20 [<80394c59>] ? intel_modeset_check_state+0x5a9/0x640 [<803570d7>] ? drm_fb_helper_dpms.isra.11+0x77/0xc0 [<8035755d>] ? drm_fb_helper_blank+0x4d/0x70 [<802f2f04>] ? fb_blank+0x44/0xb0 [<802fba09>] ? fbcon_blank+0x1d9/0x2d0 [<802314b2>] ? flush_commit_list+0x562/0x620 [<8014683a>] ? __queue_delayed_work+0xaa/0x140 [<801581c9>] ? dequeue_task_fair+0x29/0x1a0 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344ad5>] ? do_unblank_screen+0x95/0x1b0 [<80344ffc>] ? console_callback+0xec/0x110 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344f10>] ? poke_blanked_console+0xb0/0xb0 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687d8 ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:6968 intel_modeset_check_state+0x4c8/0x640() Hardware name: NC6120(EK094ES) encoder's hw state doesn't match sw tracking (expected 0, found 1) Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<80394b78>] ? intel_modeset_check_state+0x4c8/0x640 [<80394b78>] ? intel_modeset_check_state+0x4c8/0x640 [<80131203>] ? warn_slowpath_fmt+0x33/0x40 [<80394b78>] ? intel_modeset_check_state+0x4c8/0x640 [<803570d7>] ? drm_fb_helper_dpms.isra.11+0x77/0xc0 [<8035755d>] ? drm_fb_helper_blank+0x4d/0x70 [<802f2f04>] ? fb_blank+0x44/0xb0 [<802fba09>] ? fbcon_blank+0x1d9/0x2d0 [<802314b2>] ? flush_commit_list+0x562/0x620 [<8014683a>] ? __queue_delayed_work+0xaa/0x140 [<801581c9>] ? dequeue_task_fair+0x29/0x1a0 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344ad5>] ? do_unblank_screen+0x95/0x1b0 [<80344ffc>] ? console_callback+0xec/0x110 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344f10>] ? poke_blanked_console+0xb0/0xb0 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687d9 ]--- ------------[ cut here ]------------ WARNING: at /home/krzysiek/src/linux-2.6/drivers/gpu/drm/i915/intel_display.c:1225 assert_pipe+0x95/0xa0() Hardware name: NC6120(EK094ES) pipe A assertion failure (expected off, current on) Pid: 420, comm: kworker/0:2 Tainted: G W 3.7.0-rc6-00003-gddba8b4 #83 Call Trace: [<80131173>] ? warn_slowpath_common+0x73/0xb0 [<8038e0d5>] ? assert_pipe+0x95/0xa0 [<8038e0d5>] ? assert_pipe+0x95/0xa0 [<80131203>] ? warn_slowpath_fmt+0x33/0x40 [<8038e0d5>] ? assert_pipe+0x95/0xa0 [<80394a4e>] ? intel_modeset_check_state+0x39e/0x640 [<803570d7>] ? drm_fb_helper_dpms.isra.11+0x77/0xc0 [<8035755d>] ? drm_fb_helper_blank+0x4d/0x70 [<802f2f04>] ? fb_blank+0x44/0xb0 [<802fba09>] ? fbcon_blank+0x1d9/0x2d0 [<802314b2>] ? flush_commit_list+0x562/0x620 [<8014683a>] ? __queue_delayed_work+0xaa/0x140 [<801581c9>] ? dequeue_task_fair+0x29/0x1a0 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344ad5>] ? do_unblank_screen+0x95/0x1b0 [<80344ffc>] ? console_callback+0xec/0x110 [<80147224>] ? process_one_work+0x104/0x380 [<8013d963>] ? internal_add_timer+0x13/0x40 [<80344f10>] ? poke_blanked_console+0xb0/0xb0 [<80147797>] ? worker_thread+0x107/0x3a0 [<80147690>] ? rescuer_thread+0x1c0/0x1c0 [<8014bd7c>] ? kthread+0x8c/0xa0 [<806097b7>] ? ret_from_kernel_thread+0x1b/0x28 [<8014bcf0>] ? __kthread_parkme+0x60/0x60 ---[ end trace 2fa112e1a3f687da ]---
Created attachment 70463 [details] Linux v3.6+noacpivideo+workaround dmesg, works correctly Disabling ACPI video is needed to workaround some strange problems on this system. With ACPI video enabled the LID does not work and the problem cannot be easily reproduced. The workaround "reverts" commit that caused regression in Linux 3.1. diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 1e0a9e1..ff2126c 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -389,6 +389,13 @@ static int __init video_set_bqc_offset(const struct dmi_system_id *d) return 0; } +static int acpi_video_disabled; +static int __init disable_acpi_video(const struct dmi_system_id *d) +{ + acpi_video_disabled = 1; + return 0; +} + static struct dmi_system_id video_dmi_table[] __initdata = { /* * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121 @@ -433,6 +440,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7720"), }, }, + { + .callback = disable_acpi_video, + .ident = "Hewlett-Packard nc6120", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "NC6120(EK094ES)"), + }, + }, {} }; @@ -1779,6 +1794,10 @@ static int __init intel_opregion_present(void) int acpi_video_register(void) { int result = 0; + + if (acpi_video_disabled) + return -ENODEV; + if (register_count) { /* * if the function of acpi_video_register is already called, diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c040aee..2d26432 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4980,10 +4980,12 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, x, y, old_fb); drm_vblank_post_modeset(dev, pipe); +#if 0 if (ret) intel_crtc->dpms_mode = DRM_MODE_DPMS_OFF; else intel_crtc->dpms_mode = DRM_MODE_DPMS_ON; +#endif return ret; }
Created attachment 70464 [details] 3.7.0-rc4-00324-g043771a+noacpivideo dmesg With disabled ACPI video like in v3.6, but without "revert" of commit 120eced9efe7fdb5123db4ea47e9adee9b66284e (drm/i915: Set crtc DPMS mode to ON in intel_crtc_mode_set). The same problem exists in Linux >= v3.1.
Your machine screams in the lid notifier that the BIOS changed the output configuration behind our backs. Somewhat expected since your machine doesn't support OpRegion. Please try this patch on top of drm-intel-next-queued https://bugs.freedesktop.org/attachment.cgi?id=68883 For the acpi video thing, do you have the bisect result for that, too? And to clarify things: This regression has been like this since 3.1, the only difference in 3.7 is that now the kernel notices that something is wrong, too and fills your dmesg with backtraces?
Created attachment 70470 [details] 3.7.0-rc4-00325-g1e666c2 dmesg, still does not work correctly With "force restore on lid open". Still does not work correctly. It enables display after lid is opened (3.0 restored display after key was pressed and console blank was disabled). After lid is closed again the display is not turned off, after lid open + some seconds the display is fully turned off for some time, and after that the backlight it enabled, but screen is "black".
> For the acpi video thing, do you have the bisect result for that, too? No I haven't. I will try later. > > And to clarify things: This regression has been like this since 3.1, the only > difference in 3.7 is that now the kernel notices that something is wrong, too > and fills your dmesg with backtraces? Yes, it's 3.1 regression. Linux 3.7 behaves exactly like 3.1-3.6, but it's more verbose.
Ok, so at least the force lid open seems to shut up all the WARNs and things are in good order again. Just for fun, can you please try out what happens when you reenable the acpi_video stuff? We've fixed quite a few acpi/firmware interaction issues between 3.1 and 3.7, so maybe we're lucky. Please keep the force restore on lid open patch applied.
acpi video still causes problems. I tried to bisect that and I found that it never worked. I tried even 2.6.27, which I was using for a long time, and with acpi video lid does not work (I tested 2.6.27 on VGA console). The same on 2.6.29 with KMS.
Created attachment 70798 [details] drm-intel-next-2012-11-23-29-g9fa5f65 reg dumps Some register dumps by intel_reg_dumper after different stages.
Presumably we just want to quirk disable acpi video for this machine? Have you looked for a BIOS update? Can you please paste the dmidecode to identify the model?
I'm not sure if quirk for this model is a good solution. In my patch I'm using: + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "NC6120(EK094ES)"), + }, I'm sending fragments of dmidecode output, just BIOS and System Info with removed garbage. I probably saw similar ACPI video problem on other non-HP 915GM notebook, I will try to check it. The BIOS update is available, but according to release notes only following bugs are fixed: "- Fixes issue where unexpected prompts for drivelock passwords are displayed. - Fixes installation issue with SuSE Linux." I didn't bothered to update because Windows is needed for update, at least to create bootable FreeDOS floppy, and with disabled ACPI video everything worked fine, until Linux 3.1. # dmidecode 2.9 SMBIOS 2.3 present. 23 structures occupying 998 bytes. Table at 0x000FC68F. Handle 0x0000, DMI type 0, 20 bytes BIOS Information Vendor: Hewlett-Packard Version: 68DTD Ver. F.0C Release Date: 11/21/2005 [...] Handle 0x0001, DMI type 1, 25 bytes System Information Manufacturer: Hewlett-Packard Product Name: NC6120(EK094ES) Version: F.0C [...]
I found a way to bring display back after this problem, I just need to set a VGACNTRL register: writel(0x80000000, 0xd0471400) 0xd0400000 is I915GM BAR0. 00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03) (prog-if 00 [VGA controller]) Subsystem: Hewlett-Packard Company NX6110/NC6120 Flags: bus master, fast devsel, latency 0, IRQ 16 Memory at d0400000 (32-bit, non-prefetchable) [size=512K] I/O ports at 7000 [size=8] Memory at c0000000 (32-bit, prefetchable) [size=256M] Memory at d0480000 (32-bit, non-prefetchable) [size=256K] I found that by reenabling ACPI video, but with different DOS settings: diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index ae9deca..491751b 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -1457,7 +1457,7 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video) static int acpi_video_bus_start_devices(struct acpi_video_bus *video) { - return acpi_video_bus_DOS(video, 0, 0); + return acpi_video_bus_DOS(video, 3, 1); } static int acpi_video_bus_stop_devices(struct acpi_video_bus *video) In that case the single LID close + LID open triggers the issue and intel_reg_dumper diff is much cleaner in that case. --- before.dump 2012-12-18 22:21:32.000000000 +0100 +++ after.dump 2012-12-18 22:21:47.000000000 +0100 @@ -37,7 +37,7 @@ DVOA_SRCDIM: 0x00000000 DVOB_SRCDIM: 0x00000000 DVOC_SRCDIM: 0x00000000 - PP_CONTROL: 0xabcd0001 (power target: on) + PP_CONTROL: 0x00000001 (power target: on) PP_STATUS: 0xc0000008 (on, ready, sequencing idle) PP_ON_DELAYS: 0x025807d0 PP_OFF_DELAYS: 0x01f407d0 @@ -55,7 +55,7 @@ DSPATILEOFF: 0x00000000 PIPEACONF: 0xc0000000 (enabled, double-wide) PIPEASRC: 0x077f059f (1920, 1440) - PIPEASTAT: 0x00000203 (status: VSYNC_INT_STATUS VBLANK_INT_STATUS OREG_UPDATE_STATUS) + PIPEASTAT: 0x80000203 (status: FIFO_UNDERRUN VSYNC_INT_STATUS VBLANK_INT_STATUS OREG_UPDATE_STATUS) PIPEA_GMCH_DATA_M: 0x00000000 PIPEA_GMCH_DATA_N: 0x00000000 PIPEA_DP_LINK_M: 0x00000000 @@ -107,8 +107,8 @@ VCLK_DIVISOR_VGA0: 0x00031108 VCLK_DIVISOR_VGA1: 0x00031406 VCLK_POST_DIV: 0x00800080 - VGACNTRL: 0x80000000 (disabled) - TV_CTL: 0x000c0c00 + VGACNTRL: 0x22c40000 (enabled) + TV_CTL: 0x300c0c00 TV_DAC: 0x70000000 TV_CSC_Y: 0x0332012d TV_CSC_Y2: 0x07d30104
Created attachment 71791 [details] [review] i915-ensure-that-VGA-plane-is-disabled.patch This patch on top of drm-intel-next-2012-12-08-20-g4d7bb01 merged with v3.7 and that small workaround for ACPI video problems: @@ -1428,7 +1457,7 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video) static int acpi_video_bus_start_devices(struct acpi_video_bus *video) { - return acpi_video_bus_DOS(video, 0, 0); + return acpi_video_bus_DOS(video, 3, 1); } static int acpi_video_bus_stop_devices(struct acpi_video_bus *video) fixes the issue.
Nice debug work! One small change request to test for your patch: Does it still work if you move the call to i915_redisable_vga up into the force_restore block, i.e. if (force_restore) { for_each_pipe(pipe) { crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); intel_set_mode(&crtc->base, &crtc->base.mode, crtc->base.x, crtc->base.y, crtc->base.fb); } i915_redisable_vga(dev); } else { intel_modeset_update_staged_output_state(dev); } force_restore is already used to unbreak BIOS damage, so would fit in nicer. Then please submit the final patch with Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57434 added to intel-gfx@lists.freedesktop.org, so that I can include it (you don't have to be subscribed).
Yes, it works also with i915_redisable_vga() in if (force_restore) block. I submitted the final version to intel-gfx@lists.freedesktop.org. There is still that small regression, probably caused by your "drm/i915: force restore on lid open" patch, with enabling display after lid is opened when console is blanked. The console still thinks that display is disabled and the cursor is disabled and console braking does not work until any key is pressed. After that the cursor is enabled and console blanking starts working because now console knows that display is enabled. In Linux 3.0 display was restored later, after key was pressed, not after lid open. Thanks.
(In reply to comment #14) > There is still that small regression, probably caused by your "drm/i915: > force restore on lid open" patch, with enabling display after lid is opened > when console is blanked. The console still thinks that display is disabled > and > the cursor is disabled and console braking does not work until any key is > pressed. After that the cursor is enabled and console blanking starts > working because now console knows that display is enabled. In Linux 3.0 > display was restored later, after key was pressed, not after lid open. That smells more like the fbcon getting confused about things - the force restore only ensures that the hw state still matches what the driver thinks it should be, undoing any damage the bios has done. So if fbcon blanks the screen, we'll restore the blanked state, it doesn't just blindly enable outputs. Hence I think all drm/i915 bugs are now fixed, and the remaining issues are either fbcon or acpi related. Thanks a lot for digging into this and coming up with the patch.
A patch referencing this bug report has been merged in Linux v3.8-rc1: commit 45e2b5f640b3766da3eda48f6c35f088155c06f3 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Fri Nov 23 18:16:34 2012 +0100 drm/i915: force restore on lid open
A patch referencing this bug report has been merged in Linux v3.8-rc2: commit 0fde901f1ddd2ce0e380a6444f1fb7ca555859e9 Author: Krzysztof Mazur <krzysiek@podlesie.net> Date: Wed Dec 19 11:03:41 2012 +0100 i915: ensure that VGA plane is disabled
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.