Rafael.Vanoni <> wrote:
> Li, Aubrey wrote:
>> Rafael.Vanoni <> wrote:
>>
>>> Li, Aubrey wrote:
>>>> Hi Rafael,
>>>>
>>>> If I recall correctly, I raised this issue during the code review.
>>>> Just checked powertop in the newest onnv-gate. The initial
>>>> display behavior is changed.
>
> I went over my archives, there are no mentions of a black screen as a
> result of these changes.
>
>>>> Previously, when run powertop, The string "Collecting data for
>>>> 5.00 second(s)" will be shown for 5s and then call curse window
>>>> initialization to show the report immediately. Now this behavior is
>>>> changed to give a black screen to the user for 5s then output the
>>>> powertop report. This is unexpected. I already received the
>>>> complain from my internal team.
>>> Hi Aubrey
>>>
>>> I'm not sure I understand the problem as you described it. I tested
>>> the changes on a variety of systems before integrating, with
>>> different intervals, and the behavior seems correct to me. I call
>>> powertop(1), the string is shown for the interval and then curses
>>> comes up with the reports. I don't see a black screen as you
>>> mentioned.
>>>
>>> What build are you running? Do you see the same problem with the
>>> source from the project gate? Are you calling it from the default
>>> shell?
>>>
>>> I just re-tested it on two systems using a binary straight from the
>>> gate's proto area. The source hasn't changed since I pushed 6834110
>>> on the 19th. Is this the first time you see this issue?
>>>
>>> Thanks,
>>> Rafael
>>
>> We tested it with gdm disabled on opensolaris2009.6.(pfexec svcadm
>> disable gdm)
>
> Ok, so you only see this with gdm disabled..
>
>> Per the code,
>>
>> 1) powertop is called
>> 2) the string(Collecting...) is printed on the screen
>> 3) display_init_curses() is called to switch the display mode from
>> text
>> to curse mode, which will clear the screen.
>> 4) select() is called, 5 seconds later, the report is outputed.
>> =======================================================
>> main(){
>> (void) printf(_("Collecting data for %.2f second(s) \n"),
>> (float)g_ticktime); if (!PT_ON_DUMP) {
>> pt_display_init_curses(); pt_display_setup(B_FALSE);
>> g_gui = B_TRUE;
>> pt_display_title_bar();
>> pt_display_status_bar();
>> }
>> while (true) {
>> tv.tv_sec = (long)g_ticktime;
>> if (!PT_ON_DUMP) {
>> key = select(1, &rfds, NULL, NULL, &tv);
>> } else key = select(1, NULL, NULL, NULL,
>> &tv); } ======================================================
>>
>> Is this a problem?
>
> Well, you omitted some of the code ;) But the problem is not there.
> pt_display_init_curses() doesn't clear the screen.
>
> The terminal environment is quite different with and without gnome.
> There's clearly a bug here since with sun-color the first refresh is
> not flushed out, I'll file a bug and investigate this further.
>
> Thanks,
> Rafael
okay, thanks for doing this.
-Aubrey