Search code examples
yoctoimx6

Why does my lcd console turn off if I let the imx6 board stay idle for 10 minutes?


I'm new to imx6 and yocto bsp and on exploring I found that the lcd console goes off after exactly 12 minutes. There seems to be no mention of this in the source code in yocto if there are no functions that turn off the display how could it go off?

I did some digging and found that yocto provides a wait mode which is meant to save power. I function I found in cpuidle-imx6sl.c as below but there is no mention of disabling lcd

static int imx6sl_enter_wait(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { int mode = get_bus_freq_mode();

    imx6_set_lpm(WAIT_UNCLOCKED);

    if ((mode == BUS_FREQ_AUDIO) || (mode == BUS_FREQ_ULTRA_LOW)) {
            /*
             * bit 2 used for low power mode;
             * bit 1 used for the ldo2p5_dummmy enable
             */
            if (psci_ops.cpu_suspend) {
                    psci_ops.cpu_suspend((MX6SL_POWERDWN_IDLE_PARAM | ((mode == BUS_FREQ_AUDIO ? 1 : 0) << 2) |
                                            (ldo2p5_dummy_enable ? 1 : 0) << 1), __pa(cpu_resume));
            } else {
                    pwr_ctrl_off();
                    imx6sl_wfi_in_iram_fn(wfi_iram_base, (mode == BUS_FREQ_AUDIO) ? 1 : 0,
                                    ldo2p5_dummy_enable);

            }


    } else {
            /*
             * Software workaround for ERR005311, see function
             * description for details.
             */
            imx6sl_set_wait_clk(true);
            cpu_do_idle();
            imx6sl_set_wait_clk(false);
    }
    imx6_set_lpm(WAIT_CLOCKED);

    return index;

}

I expect to find a function in the kernel source that disables lcd and also has a timer that measures exactly 10 minutes for lcd off. where can I find these?


Solution

  • You are probably seeing the console blanking timeout after 10 minutes, which turns off the display. To check the timeout value:

    $ cat /sys/module/kernel/parameters/consoleblank
    600
    

    To disable it permanently, add consoleblank=0 to the kernel commandline. For example by editing your U-Boot environment.

    You can find the code, that is responsible for this in drivers/tty/vt/vt.c.