Search This Blog

Thursday, August 6, 2015

Intel NUC won't turn on (after Ubuntu suspend)

UPDATE: THE SOLUTION TO THIS PROBLEM IS IN THE COMMENTS!  READ ON IF YOU WANT TO MAKE SURE YOUR PROBLEM REQUIRES THE SOLUTION!

Just got my NUC back up and running before posting this blog.  It doesn't surprise me much, as we have had a lot of issues with the Core i3 model at work.  I will say though, after ordering around 30 of these things, we have not had a single one brick or be dead on arrival.  Anyway, back to this issue.

I have been using a Microsoft Remote to power my NUC on and off via the Infrared sensor on the front.  I had to install a custom kernel module to get the operating system to understand the signal correctly.  As a result, I noticed if I use the remote to suspend the unit, I have to use the remote to turn it back on.  Pressing the soft switch on the unit itself does nothing.  I'm not sure if this issue is w/ the linux community drivers, intel, or both, but it is likely to be related.

The issue seems to be with the way the NUC hibernates after a software power down signal.  The BIOS/CMOS (whatever it's called these days), seems to store a bit somewhere in memory along with the system clock information related to the power state.  So the only way to get my NUC to power back on was to remove the battery from the motherboard, wait about five minutes for good measure, replace it, put the NUC back together, and boot on up.

To get to the bottom of the motherboard, you should first remove RAM and SSD (unless you really don't care about them.)  I was able to keep wifi connectors attached, but be gentle not to yank them off.  There are two black phillips head (+) screws located on the sides.  Remove these in front of a cat so he/she will look directly at where they land when you drop them on the floor.

Tricky Part: Turn the NUC upside down w/ your hand on the bottom to prevent the board from falling out and gently pry the back out w/ your finger.  Once the back is lifted up, you can shift/slide the board 1/16 of an inch (or about 1.5 cm) towards the rear to get the headphone jack and IR sensor clear of the holes in the chassis.

Battery is located to the left and removed via 2-pin connector

At this point the motherboard should be out and you can flip it around and get to the battery.

Also interesting is that on first boot, my mSATA SSD could not be detected.  Of course this initially had me worried, but after a second reboot, the OS discovered the disk just fine.

Not sure if a firmware update would have fixed this, but I've been running this NUC for more than 6 months without issue and am not going to bother w/ a firmware update at this time.

Likely related is the kernel modules used to power on/off the NUC via remote.  Here are the ones I have loaded:

charlie@NUC:~$ sudo lsmod | grep -i IRir_sony_decoder        12713  0 ir_lirc_codec          13021  0 lirc_dev               19980  1 ir_lirc_codecir_mce_kbd_decoder     13214  0 ir_sanyo_decoder       12839  0 ir_jvc_decoder         12751  0 ir_rc6_decoder         12874  0 ir_rc5_decoder         12710  0 ir_nec_decoder         12915  0 nuvoton_cir            17778  0 rc_core                28124  12 lirc_dev,nuvoton_cir,ir_lirc_codec,ir_rc5_decoder,ir_nec_decoder,ir_sony_decoder,ir_mce_kbd_decoder,ir_jvc_decoder,ir_rc6_decoder,ir_sanyo_decoder,rc_rc6_mce

And some additional information about my model/firmware.

BIOS Information
Vendor: Intel Corp.
Version: WYLPT10H.86A.0038.2015.0410.1634
Release Date: 04/10/2015
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 6656 kB
Characteristics:
PCI is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
BIOS ROM is socketed
EDD is supported
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int 13h)
3.5"/2.88 MB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 4.6
Base Board Information
Manufacturer: Intel Corporation
Product Name: D34010WYK
Version: H14771-303
Serial Number: XXXXXXXXXXXX (redacted)
Asset Tag:
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: To be filled by O.E.M.
Chassis Handle: 0x0003
Type: Motherboard

Ubuntu 14.04.2 (amd64)
Linux Kernel 3.13.0-61

6 comments:

  1. What: /sys/power/pm_async
    Date: January 2009
    Contact: Rafael J. Wysocki
    Description:
    The /sys/power/pm_async file controls the switch allowing the
    user space to enable or disable asynchronous suspend and resume
    of devices. If enabled, this feature will cause some device
    drivers' suspend and resume callbacks to be executed in parallel
    with each other and with the main suspend thread. It is enabled
    if this file contains "1", which is the default. It may be
    disabled by writing "0" to this file, in which case all devices
    will be suspended and resumed synchronously.

    `echo 0 > /sys/power/pm_async` Seems to resolve this. However, need to add this to a boot script to run everytime, as the default value is 1.

    ReplyDelete
  2. root@NUC:/etc/init.d# nano powerfix

    #!/bin/sh
    echo 0 > /sys/power/pm_async

    Save the above as /etc/init.d/powerfix

    root@NUC:/etc/init.d# chmod 755 powerfix
    root@NUC:/etc/init.d# ln -s /etc/init.d/powerfix /etc/rc2.d/S99powerfix

    ReplyDelete
  3. The NUC itself is now $280 in USD. https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&es_th=1&ie=UTF-8#q=280%20dollars%20to%20rupees&es_th=1

    Not including RAM and SSD Disk.

    ReplyDelete
  4. To achieve this with a systemd unit file:

    sudo bash
    cat << EOF > /etc/systemd/system/disable-async-power-management.service
    [Unit]
    Description=Disable asynchronous power management
    DefaultDependencies=no
    OnFailure=emergency.target

    [Service]
    Type=oneshot
    ExecStart=/bin/sh -c "echo 0 > /sys/power/pm_async"
    RemainAfterExit=yes

    [Install]
    RequiredBy=sysinit.target
    EOF
    systemctl start disable-async-power-management.service
    # The next command should print 0 and not 1
    cat /sys/power/pm_async
    systemctl enable disable-async-power-management.service

    ReplyDelete
  5. Thank you so much for this! I was on my second NUC and it just "died".

    ReplyDelete
    Replies
    1. Glad you fixed it. If you're using Ubuntu, i've been running Xenial for a while and is working well.

      Delete