[meta-xilinx] [PATCH 14/19 v2] Add consoleblank recipe

Nathan Rossi nathan at nathanrossi.com
Tue May 3 05:52:34 PDT 2016


On Tue, May 3, 2016 at 9:52 PM, Jason Wu <jason.wu.misc at gmail.com> wrote:
>
>
> On 3/05/2016 5:42 PM, Jason Wu wrote:
>>
>>
>>
>> On 3/05/2016 1:17 PM, Jason Wu wrote:
>>>
>>>
>>>
>>> On 3/05/2016 1:30 AM, Nathan Rossi wrote:
>>>>
>>>> On Wed, Apr 27, 2016 at 5:46 PM, Jason Wu <jason.wu.misc at gmail.com>
>>>> wrote:
>>>>>
>>>>> This recipe installs a init script to disable console blank
>>>>
>>>>
>>>> Hi Jason,
>>>>
>>>> I had a bit of a look at this DPMS issue, I might have a solution it
>>>> is somewhat hacky but appears to allow for DPMS to function correctly.
>>>>
>>>>
>>>> https://github.com/nathanrossi/linux/commit/e4264e80116684297e353f6da4156c4ad6f8a03a
>>>>
>>>>
>>>>
>>>> It would be nice to avoid this console blank + xorg config setup and
>>>> have DPMS work (albeit with a kernel patch). Would you be able to
>>>> confirm if the above linked patch fixes the DPMS issue with your setup
>>>> too?
>>>
>>> It works for me but just to let you know that the patch does not fix the
>>> DPMS issue, as you can still see the same issue if you force the
>>> framebuffer into the sleep mode.
>>
>> sorry i mean it works if i don't try to force the fb into sleep mode.
>
>
> Patch does prevent the console blank, the problem was the doggy hdmi-> dvi
> cable.

That is great, I also tested it on a bunch of different monitors
(dvi/hdmi, new/old) and they all behave correctly. I will skip the
console-blank/x11 recipe patches and add the above mentioned kernel
patch. Will also RFC that kernel patch to git at xilinx, see if there is
a better fix or something along those lines.

Thanks,
Nathan

>
> Cheers,
>
> Jason
>
>>
>> Jason
>>>
>>>
>>> Cheers,
>>>
>>> Jason
>>>
>>>>
>>>> Thanks,
>>>> Nathan
>>>>
>>>>>
>>>>> Signed-off-by: Jason Wu <jason.wu.misc at gmail.com>
>>>>> ---
>>>>> v2:
>>>>>      use MIT from ${COREBASE}/meta/files/common-licenses
>>>>>
>>>>> ---
>>>>>   recipes-graphics/consoleblank/console-blank.bb    | 25
>>>>> +++++++++++++++++++++
>>>>>   recipes-graphics/consoleblank/files/console-blank | 27
>>>>> +++++++++++++++++++++++
>>>>>   2 files changed, 52 insertions(+)
>>>>>   create mode 100644 recipes-graphics/consoleblank/console-blank.bb
>>>>>   create mode 100644 recipes-graphics/consoleblank/files/console-blank
>>>>>
>>>>> diff --git a/recipes-graphics/consoleblank/console-blank.bb
>>>>> b/recipes-graphics/consoleblank/console-blank.bb
>>>>> new file mode 100644
>>>>> index 0000000..ae7d09a
>>>>> --- /dev/null
>>>>> +++ b/recipes-graphics/consoleblank/console-blank.bb
>>>>> @@ -0,0 +1,25 @@
>>>>> +DESCRIPTION = "Startup script - disable console blank"
>>>>> +SECTION = "base"
>>>>> +LICENSE = "MIT"
>>>>> +LIC_FILES_CHKSUM =
>>>>>
>>>>> "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
>>>>>
>>>>>
>>>>> +
>>>>> +PR = "r0"
>>>>> +
>>>>> +FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
>>>>> +SRC_URI = "file://console-blank"
>>>>> +
>>>>> +inherit update-rc.d
>>>>> +
>>>>> +INITSCRIPT_NAME = "console-blank"
>>>>> +INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ."
>>>>> +#FILES_${PN} = "${sysconfdir}/init.d/console-blank"
>>>>> +
>>>>> +# # # add to build if system machine supports screen
>>>>> +# PACKAGES += ' \
>>>>> +#      ${@bb.utils.contains("MACHINE_FEATURES", "screen",
>>>>> "console-blank", "",d)} \
>>>>> +#      '
>>>>> +
>>>>> +do_install () {
>>>>> +       install -d ${D}/${sysconfdir}/init.d/
>>>>> +       install -m 0755 ${WORKDIR}/console-blank
>>>>> ${D}${sysconfdir}/init.d/
>>>>> +}
>>>>> \ No newline at end of file
>>>>> diff --git a/recipes-graphics/consoleblank/files/console-blank
>>>>> b/recipes-graphics/consoleblank/files/console-blank
>>>>> new file mode 100644
>>>>> index 0000000..58c2f33
>>>>> --- /dev/null
>>>>> +++ b/recipes-graphics/consoleblank/files/console-blank
>>>>> @@ -0,0 +1,27 @@
>>>>> +#!/bin/sh
>>>>> +### BEGIN INIT INFO
>>>>> +# Provides:          consoleblank.sh
>>>>> +# Required-Start:
>>>>> +# Required-Stop:
>>>>> +# Default-Start:     S
>>>>> +# Default-Stop:
>>>>> +# Short-Description: disable console blank
>>>>> +# Description:       set consoleblank to 0 on tty1
>>>>> +### END INIT INFO
>>>>> +
>>>>> +cur_cb=$(cat /sys/module/kernel/parameters/consoleblank)
>>>>> +
>>>>> +if [ $cur_cb -ne 0 ]; then
>>>>> +       echo "Disable console blank"
>>>>> +       for i in {0..9}; do
>>>>> +               echo -e '\033[9;0]' > /dev/tty1
>>>>> +               cb_chk=$(cat
>>>>> /sys/module/kernel/parameters/consoleblank)
>>>>> +               if [ $cb_chk -eq 0 ]; then
>>>>> +                       exit 0
>>>>> +               fi
>>>>> +       done
>>>>> +fi
>>>>> +
>>>>> +if [ $cb_chk -ne 0 ]; then
>>>>> +       echo "Error: fail to disable console blank"
>>>>> +fi
>>>>> \ No newline at end of file
>>>>> --
>>>>> 1.9.1
>>>>>
>>>>> --
>>>>> _______________________________________________
>>>>> meta-xilinx mailing list
>>>>> meta-xilinx at yoctoproject.org
>>>>> https://lists.yoctoproject.org/listinfo/meta-xilinx



More information about the meta-xilinx mailing list