Opened 10 years ago

Closed 10 years ago

Last modified 17 months ago

#1382 closed defect (fixed)

"reboot" from Linux just gives black screen on LX

Reported by: cjb Owned by: dilinger
Priority: blocker Milestone:
Component: kernel Version:
Keywords: Cc:
Blocked By: Blocking:
Deployments affected: Action Needed:
Verified: yes


We should start by working out what hardware mechanism Linux reboot uses.

Attachments (1)

x (1.0 KB) - added by dilinger 10 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 10 years ago by dilinger

02:34 < Mitch_BradleyEGG> I recommend resetting by  writing 1ULL to MSR 
02:34 < CP|too> agreed
02:36 < CP|too> There is already a mechanism for doing that
02:36 < CP|too>;a=blob;h=99aab41a05b0f17d12c07110638699a6ec4360da;hb=1c73de730a3979de91c8ebbca3c12ebdb3afbff7;f=arch/i386/kernel/reboot_fixups.c
02:36 < CP|too> And lo and behold - what other processor is already in that 
                file?  Why, its the GX1!
02:38 < CP|too> the mechanism exists
02:38 < CP|too> don't copy the code
02:39 < CP|too> add in the 5536 ISA header ID and write to the MSR like Mitch 

comment:2 Changed 10 years ago by dilinger

Ok, this black screen is the "screen blanking" feature of DCON; that's where it comes from. The backlight is also shut off by the kernel's reboot notifier, so that's why we see the non-backlit screen. The problem is that writing 0x2 (the DCON Sleep Mode bit) to the DCON register *should* disable power to the panel; that doesn't happen. Instead, the 0x2 write is being ignored, and the panel is remaining on.

One can test this from OFW; 'dev screen', ' 2 mode!' (or any other bits from the DCON spec). The panel on b2 will turn off; pre-b3, it remains on.

Changed 10 years ago by dilinger

  • Attachment x added

comment:3 Changed 10 years ago by dilinger

The above patch needs some #ifdefs (and perhaps a !olpc_has_vsa() or machine_is_olpc()?), but it does the reboot dance on pre-b3; should probably be applied once we figure out the DCON thing. Oh, and we should test it on b2.. :)

comment:4 Changed 10 years ago by JordanCrouse

This is a good general purpose fix - most Geode implementations will reset through ACPI anyway. There might be certain embedded controllers or super IOs that depend on the standard reset sequence through the keyboard controller , but I don't see any harm in keeping this enabled for all Geodes (famous last words).

comment:5 Changed 10 years ago by jg

  • Milestone changed from Untriaged to BTest-3
  • Priority changed from normal to high

comment:6 Changed 10 years ago by dilinger

#1388 describes the panel disable problem; we now return you to your regularly scheduled reboot-doesn't-work problem.

comment:7 Changed 10 years ago by jg

  • Priority changed from high to blocker

comment:8 Changed 10 years ago by dilinger

Bizarre. After adding the following to the dcon's reboot notifier:

printk(KERN_WARNING "turning off dcon\n");
        /* Turn off the DCON. Entirely. */
        dcon_write(DCON_REG_MODE, 0x39);
        dcon_write(DCON_REG_MODE, 0x32);
printk(KERN_WARNING "dcon is now off, sleeping for a bit\n");
printk(KERN_WARNING "done sleeping!\n");


 [   70.717948] turning off dcon                                      
[   70.722055] dcon is now off, sleeping for a bit                              
[   75.739379] done sleeping!                                                   
[   76.650648] Restarting system.          

During the sleep, the dcon turns off (completely). After the sleep is done, the dcon turns back on; something in the kernel (or perhaps something the kernel is frobbing) is causing the dcon to turn back on before the machine shuts down!

comment:9 Changed 10 years ago by dilinger

Oh, and the 'reboot' command was done from the serial console; no keypress action should've woken up the dcon.

comment:10 Changed 10 years ago by dilinger

It looks like psmouse's shutdown callback is what turns the dcon back on.

comment:11 Changed 10 years ago by wmb@…

  • Resolution set to fixed
  • Status changed from new to closed

The reboot fix is tested and committed - the machine now reboots correctly.

The LCD screen still stays black instead of going off, but we know what is causing that - see #1388.

comment:12 Changed 17 months ago by Quozl

  • Milestone BTest-3 deleted

Milestone BTest-3 deleted

Note: See TracTickets for help on using tickets.