Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-08-08 Thread Uwe Kleine-König
Hello Helge,

Cc: += linux-i2c

On Sun, Aug 07, 2016 at 08:48:29PM +0200, Helge Wiemann wrote:
> I located the battery and removed it for 60 seconds, then booted up my NAS
> and performed your commands. My syslog and tracelog are attached.
> 
> I think this made no difference. The date is still incorrect.

This didn't help, the bus is still stuck:

> [2.817881] i2c i2c-0: mv64xxx_i2c_fsm: Ctlr Error -- state: 0x7, status: 
> 0x38, addr: 0x30, flags: 0x1

This translates to:
state: MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA
status: MV64XXX_I2C_STATUS_MAST_LOST_ARB

Not sure this is accurate though.

From a quick look the mv64xxx driver doesn't support bus recovery. So
unless someone implements this the best bet is probably:

 - do it by hand, maybe from the bootloader
 - do it really by hand, by shortcutting ground and SCL up to 9 times
   until SDA goes high again.

Maybe someone from the i2c folks has a better idea.

Best regards
Uwe


signature.asc
Description: PGP signature


Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-08-07 Thread Helge Wiemann

Hello Uwe,

I located the battery and removed it for 60 seconds, then booted up my 
NAS and performed your commands. My syslog and tracelog are attached.


I think this made no difference. The date is still incorrect.

Any ideas?

Helge
On 08/07/2016 11:46 AM, Uwe Kleine-König wrote:

Hello Helge,

On 08/07/2016 11:37 AM, Helge Wiemann wrote:

apt install i2c-tools
echo 0-0030 > /sys/bus/i2c/devices/0-0030/driver/unbind
i2cget -y 0 0x30 0x80

This is what you asked for:

1) -bash: echo: write error: No such device
2) no output
3) i2cget -y 0 0x30 0x80
4) -bash: echo: write error: No such device

Trace & system log are attached.


Your i2c bus is stuck, probably because the rtc pulls down the SDA line.

Can you make your machine completely voltage free for a moment? That is
remove any power cords and a maybe existing backup battery.

If you are able to locate the chip on your pcb, there must be 0 V
between pin 4 (VSS) and pin 8 (VDD).

Best regards
Uwe


Jan  1 01:00:16 MediaCenter rsyslogd: [origin software="rsyslogd" 
swVersion="8.4.2" x-pid="353" x-info="http://www.rsyslog.com;] start
Jan  1 01:00:16 MediaCenter systemd-modules-load[139]: Inserted module 
'gpio_keys'
Jan  1 01:00:16 MediaCenter systemd[1]: Started Apply Kernel Variables.
Jan  1 01:00:16 MediaCenter systemd[1]: Started Load/Save Random Seed.
Jan  1 01:00:16 MediaCenter systemd[1]: Started Create Static Device Nodes in 
/dev.
Jan  1 01:00:16 MediaCenter systemd[1]: Starting udev Kernel Device Manager...
Jan  1 01:00:16 MediaCenter systemd[1]: Starting Local File Systems (Pre).
Jan  1 01:00:16 MediaCenter systemd[1]: Reached target Local File Systems (Pre).
Jan  1 01:00:16 MediaCenter systemd[1]: Started udev Kernel Device Manager.
Jan  1 01:00:16 MediaCenter systemd[1]: Starting Copy rules generated while the 
root was ro...
Jan  1 01:00:16 MediaCenter systemd[1]: Started Copy rules generated while the 
root was ro.
Jan  1 01:00:16 MediaCenter systemd[1]: Found device /dev/ttyS0.
Jan  1 01:00:16 MediaCenter systemd[1]: Found device WDC_WD20EZRX-00D8PB0 5.
Jan  1 01:00:16 MediaCenter systemd[1]: Activating swap 
/dev/disk/by-uuid/a6ff8daf-d56b-459d-949a-02b92792c94e...
Jan  1 01:00:16 MediaCenter systemd[1]: Found device WDC_WD20EZRX-00D8PB0 1.
Jan  1 01:00:16 MediaCenter systemd[1]: Starting File System Check on 
/dev/disk/by-uuid/893d4ade-55b6-4c90-9bd4-191e30d54075...
Jan  1 01:00:16 MediaCenter systemd[1]: Activated swap 
/dev/disk/by-uuid/a6ff8daf-d56b-459d-949a-02b92792c94e.
Jan  1 01:00:16 MediaCenter systemd[1]: Starting Swap.
Jan  1 01:00:16 MediaCenter systemd[1]: Reached target Swap.
Jan  1 01:00:16 MediaCenter systemd-fsck[194]: /dev/sda1: clean, 17/62248 
files, 17317/248832 blocks
Jan  1 01:00:16 MediaCenter systemd[1]: Started File System Check on 
/dev/disk/by-uuid/893d4ade-55b6-4c90-9bd4-191e30d54075.
Jan  1 01:00:16 MediaCenter systemd[1]: Starting system-ifup.slice.
Jan  1 01:00:16 MediaCenter systemd[1]: Created slice system-ifup.slice.
Jan  1 01:00:16 MediaCenter systemd[1]: Mounting /boot...
Jan  1 01:00:16 MediaCenter systemd[1]: Mounted /boot.
Jan  1 01:00:16 MediaCenter systemd[1]: Starting Local File Systems.
Jan  1 01:00:16 MediaCenter systemd[1]: Reached target Local File Systems.
Jan  1 01:00:16 MediaCenter systemd[1]: Starting Create Volatile Files and 
Directories...
Jan  1 01:00:16 MediaCenter systemd[1]: Starting LSB: Raise network 
interfaces
Jan  1 01:00:16 MediaCenter systemd[1]: Starting Remote File Systems.
Jan  1 01:00:16 MediaCenter kernel: [0.00] Booting Linux on physical 
CPU 0x0
Jan  1 01:00:16 MediaCenter kernel: [0.00] Initializing cgroup subsys 
cpuset
Jan  1 01:00:16 MediaCenter kernel: [0.00] Initializing cgroup subsys 
cpu
Jan  1 01:00:16 MediaCenter kernel: [0.00] Initializing cgroup subsys 
cpuacct
Jan  1 01:00:16 MediaCenter kernel: [0.00] Linux version 
3.16.0-4-kirkwood (debian-ker...@lists.debian.org) (gcc version 4.8.4 (Debian 
4.8.4-1) ) #1 Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02)
Jan  1 01:00:16 MediaCenter kernel: [0.00] CPU: Feroceon 88FR131 
[56251311] revision 1 (ARMv5TE), cr=0005397f
Jan  1 01:00:16 MediaCenter kernel: [0.00] CPU: VIVT data cache, VIVT 
instruction cache
Jan  1 01:00:16 MediaCenter kernel: [0.00] Machine: QNAP TS-119/TS-219
Jan  1 01:00:16 MediaCenter kernel: [0.00] Ignoring unrecognised tag 
0x41000403
Jan  1 01:00:16 MediaCenter kernel: [0.00] Memory policy: Data cache 
writeback
Jan  1 01:00:16 MediaCenter kernel: [0.00] On node 0 totalpages: 131072
Jan  1 01:00:16 MediaCenter kernel: [0.00] free_area_init_node: node 0, 
pgdat c05d4d84, node_mem_map dfbf9000
Jan  1 01:00:16 MediaCenter kernel: [0.00]   DMA zone: 1024 pages used 
for memmap
Jan  1 01:00:16 MediaCenter kernel: [0.00]   DMA zone: 0 pages reserved
Jan  1 01:00:16 MediaCenter kernel: [0.00]   DMA zone: 131072 pages, 
LIFO batch:31
Jan  1 01:00:16 MediaCenter kernel: [

Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-08-07 Thread Uwe Kleine-König
Hello Helge,

On 08/07/2016 11:37 AM, Helge Wiemann wrote:
> apt install i2c-tools
> echo 0-0030 > /sys/bus/i2c/devices/0-0030/driver/unbind
> i2cget -y 0 0x30 0x80
> 
> This is what you asked for:
> 
> 1) -bash: echo: write error: No such device
> 2) no output
> 3) i2cget -y 0 0x30 0x80
> 4) -bash: echo: write error: No such device
> 
> Trace & system log are attached.

Your i2c bus is stuck, probably because the rtc pulls down the SDA line.

Can you make your machine completely voltage free for a moment? That is
remove any power cords and a maybe existing backup battery.

If you are able to locate the chip on your pcb, there must be 0 V
between pin 4 (VSS) and pin 8 (VDD).

Best regards
Uwe




signature.asc
Description: OpenPGP digital signature


Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-08-07 Thread Uwe Kleine-König
Hello Helge,

On 08/06/2016 08:55 PM, Helge Wiemann wrote:
> Ever since I applied your patch the system clock would not sync and
> point to January 1st (1970?). Is there any way I can reverse the stuff I
> did to my NAS?

What is my patch? Can you show your boot log? What is the output on
console and boot log when doing the following commands:

  # echo 0-0030 > /sys/bus/i2c/drivers/rtc-s35390a/unbind
  # echo 1 > /sys/kernel/debug/tracing/events/i2c/enable
  # i2cget -y 0 0x30 0x80
  # echo 0-0030 > /sys/bus/i2c/drivers/rtc-s35390a/bind
  # cat /sys/kernel/debug/tracing/trace

Best regards
Uwe



signature.asc
Description: OpenPGP digital signature


Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-08-06 Thread Helge Wiemann

Hello Uwe,

It took a little longer as I was out of town for two weeks.

Ever since I applied your patch the system clock would not sync and 
point to January 1st (1970?). Is there any way I can reverse the stuff I 
did to my NAS?


Once I have done that I will retest again and see if I get to the gist 
of the problem. I want to go through the whole procedure again and 
understand what the issue is.


Would you mind? Thank you.

Helge

On 07/19/2016 10:10 PM, Uwe Kleine-König wrote:

Hello,

On Tue, Jul 19, 2016 at 09:47:04PM +0200, Helge Wiemann wrote:

I do have "/sys/bus/i2c/devices/0-0030", but did not specifically follow
your instructions you described in the bug report. If it helps you I will,
please let me know.

I am running a cron job to switch off my NAS at 11 PM. However, my issue
(shutting down after a short boot) was not related to that, I did not see
any particular pattern at all. This issue did still occur when I switched
off my NAS using the power button or SSH. So I doubt either RTC or Crontab
are the culprits.


I think you're wrong here. Reading your syslog I see the following:

  - You shut down your machine at Jul 9 22:29
  - You booted it at Jul 10 14:28
  - Log has:
Jul 10 14:59:37 MediaCenter systemd[1]: Starting [Cron] "00 23 * * * 
/sbin/poweroff".
Jul 10 14:59:37 MediaCenter systemd[1]: Started [Cron] "00 23 * * * 
/sbin/poweroff".
and in the following the machine shuts down.
  - In the fo llowing boot at Jul 10 15:00 this is not mentioned and the
machine boots up successfully.

So my suspection is that at 14:59 the poweroff job was caught up for
because it didn't run the day before. Then at 15:00 it wasn't run,
because it already was active a minute before.

Assuming your machine still has a (more or less) accurate date in its
rtc, I'm sure the issue returns if you disable the machine before 23:00
and restart it the next day. Given that you don't have the path
/sys/bus/i2c/devices/0-0030/rtc maybe the driver fails to bind now
because the rtc hardware is in a strange state and so the cron daemon
doesn't notice it has to catch up for the poweroff job?

Can you provide a boot log of the supposed fixed current state?

Best regards
Uwe





Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-07-19 Thread Uwe Kleine-König
Hello,

On Tue, Jul 19, 2016 at 09:47:04PM +0200, Helge Wiemann wrote:
> I do have "/sys/bus/i2c/devices/0-0030", but did not specifically follow
> your instructions you described in the bug report. If it helps you I will,
> please let me know.
> 
> I am running a cron job to switch off my NAS at 11 PM. However, my issue
> (shutting down after a short boot) was not related to that, I did not see
> any particular pattern at all. This issue did still occur when I switched
> off my NAS using the power button or SSH. So I doubt either RTC or Crontab
> are the culprits.

I think you're wrong here. Reading your syslog I see the following:

 - You shut down your machine at Jul 9 22:29
 - You booted it at Jul 10 14:28
 - Log has:
Jul 10 14:59:37 MediaCenter systemd[1]: Starting [Cron] "00 23 * * * 
/sbin/poweroff".
Jul 10 14:59:37 MediaCenter systemd[1]: Started [Cron] "00 23 * * * 
/sbin/poweroff".
   and in the following the machine shuts down.
 - In the following boot at Jul 10 15:00 this is not mentioned and the
   machine boots up successfully.

So my suspection is that at 14:59 the poweroff job was caught up for
because it didn't run the day before. Then at 15:00 it wasn't run,
because it already was active a minute before.

Assuming your machine still has a (more or less) accurate date in its
rtc, I'm sure the issue returns if you disable the machine before 23:00
and restart it the next day. Given that you don't have the path
/sys/bus/i2c/devices/0-0030/rtc maybe the driver fails to bind now
because the rtc hardware is in a strange state and so the cron daemon
doesn't notice it has to catch up for the poweroff job?

Can you provide a boot log of the supposed fixed current state?

Best regards
Uwe


signature.asc
Description: PGP signature


Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-07-19 Thread Helge Wiemann

Hello Uwe,

I do have "/sys/bus/i2c/devices/0-0030", but did not specifically follow 
your instructions you described in the bug report. If it helps you I 
will, please let me know.


I am running a cron job to switch off my NAS at 11 PM. However, my issue 
(shutting down after a short boot) was not related to that, I did not 
see any particular pattern at all. This issue did still occur when I 
switched off my NAS using the power button or SSH. So I doubt either RTC 
or Crontab are the culprits.


Whatever the issue was, it's a thing of the past as your fixed worked.

Thanks a lot for that!

Helge
--
On 07/18/2016 09:27 PM, Uwe Kleine-König wrote:

Hello Helge,

On Mon, Jul 18, 2016 at 08:24:38PM +0200, Helge Wiemann wrote:

Issuing...

echo +150 > /sys/bus/i2c/devices/0-0030/rtc/rtc*/wakealarm

...would not work as I don't have the "rtc" directory.


But you have /sys/bus/i2c/devices/0-0030? Even if you didn't unbind the
driver with the command line that I mentioned in the bug report?


But I have attached
my log file and it clearly indicates there is indeed an RTC issue.


I only see the following related to rtcs:


Jul 12 21:22:16 MediaCenter kernel: [2.815689] rtc-mv rtc-mv: internal RTC 
not ticking
Jul 12 21:22:16 MediaCenter kernel: [2.828086] rtc (null): invalid alarm 
value: 1900-1-12 19:19:0
Jul 12 21:22:16 MediaCenter kernel: [2.834150] rtc-s35390a 0-0030: rtc 
core: registered rtc-s35390a as rtc0
Jul 12 21:22:16 MediaCenter kernel: [2.861368] rtc-s35390a 0-0030: setting 
system clock to 2016-07-12 19:22:02 UTC (1468351322)


The first is harmless, the second is also harmless and fixed in when my
patches go in. The two last lines are obviously ok.

One thing that I consider strange is:


Jul 10 14:28:58 MediaCenter systemd[1]: Starting [Cron] "00 23 * * * 
/sbin/poweroff"...


I guess something (anacron?) tries to catch up that the machine was
already off at 23:00 yesterday? That could explain why you have to boot
twice and is independant of an rtc issue.


I do not have an answer to your questions, but let me explain again what
happened before I applied your patch:

Every other boot or so when I pushed the ON button on my NAS the system
would try to boot (first beep) and then immediately shut down (another beep)
while in the middle of the process. I think you will see the exact same
thing in the log files.

It would not matter how I would shut down the system the night before
(either by pushing the button or sending an SSH command), my NAS would
consistently show this pattern every second time I would try to boot it
again.

Whether it has anything to do with RTC I do not know, but I doubt it. All I
can confirm is that your fix did the magic and I have not had to start the
NAS twice ever since.


If my suspicion above is right, it could only be that the rtc is
relevant because it influences the check "Given the last shutdown time
and the current boot time, was the job at 23:00 last night done or
should it be done now instead?".

Best regards
Uwe





Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-07-18 Thread Uwe Kleine-König
Hello Helge,

On Mon, Jul 18, 2016 at 08:24:38PM +0200, Helge Wiemann wrote:
> Issuing...
> 
> echo +150 > /sys/bus/i2c/devices/0-0030/rtc/rtc*/wakealarm
> 
> ...would not work as I don't have the "rtc" directory. 

But you have /sys/bus/i2c/devices/0-0030? Even if you didn't unbind the
driver with the command line that I mentioned in the bug report?

> But I have attached
> my log file and it clearly indicates there is indeed an RTC issue.

I only see the following related to rtcs:

> Jul 12 21:22:16 MediaCenter kernel: [2.815689] rtc-mv rtc-mv: internal 
> RTC not ticking
> Jul 12 21:22:16 MediaCenter kernel: [2.828086] rtc (null): invalid alarm 
> value: 1900-1-12 19:19:0
> Jul 12 21:22:16 MediaCenter kernel: [2.834150] rtc-s35390a 0-0030: rtc 
> core: registered rtc-s35390a as rtc0
> Jul 12 21:22:16 MediaCenter kernel: [2.861368] rtc-s35390a 0-0030: 
> setting system clock to 2016-07-12 19:22:02 UTC (1468351322)

The first is harmless, the second is also harmless and fixed in when my
patches go in. The two last lines are obviously ok.

One thing that I consider strange is:

> Jul 10 14:28:58 MediaCenter systemd[1]: Starting [Cron] "00 23 * * * 
> /sbin/poweroff"...

I guess something (anacron?) tries to catch up that the machine was
already off at 23:00 yesterday? That could explain why you have to boot
twice and is independant of an rtc issue.

> I do not have an answer to your questions, but let me explain again what
> happened before I applied your patch:
> 
> Every other boot or so when I pushed the ON button on my NAS the system
> would try to boot (first beep) and then immediately shut down (another beep)
> while in the middle of the process. I think you will see the exact same
> thing in the log files.
> 
> It would not matter how I would shut down the system the night before
> (either by pushing the button or sending an SSH command), my NAS would
> consistently show this pattern every second time I would try to boot it
> again.
> 
> Whether it has anything to do with RTC I do not know, but I doubt it. All I
> can confirm is that your fix did the magic and I have not had to start the
> NAS twice ever since.

If my suspicion above is right, it could only be that the rtc is
relevant because it influences the check "Given the last shutdown time
and the current boot time, was the job at 23:00 last night done or
should it be done now instead?".

Best regards
Uwe


signature.asc
Description: PGP signature


Re: Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-07-17 Thread Uwe Kleine-König
Hello Helge,

On Sun, Jul 17, 2016 at 08:25:37AM +0200, Helge Wiemann wrote:
> Sorry for my late reply, but I stopped watching this thread and relied on
> the mailing system to send me a notification (which never came). I learned
> from Martin yesterday there has been a fix and he kindly forwarded your
> solution to me.
> 
> This is what made my problems disappear entirely:
> 
> apt install i2c-tools
> echo 0-0030 > /sys/bus/i2c/devices/0-0030/driver/unbind
> i2cget -y 0 0x30 0x80

I'm glad I could help, but still I wonder about your case.
You wrote: "Although the shutdown issue disappeared after reinstalling
the entire system my NAS would still occasionally boot and immediately
shutdown for no obvious reason. A second boot would bring the system up
as expected, but it was annoying nonetheless."

I have no explanation for this behavior. What do you mean saying
"immediatly shutdown"? Is this like a power off, or a clean reboot like
"init 6"? And I don't see what a reboot would change for the rtc chip
that I would expect only be able to wake up the machine but not shut it
down. Do you have a boot log? Can you reproduce the problem, e.g. by
setting the alarm:

echo +150 > /sys/bus/i2c/devices/0-0030/rtc/rtc*/wakealarm

and then wait 3 minutes.

If yes, goes the problem away after:

for i in +150 0 +150 0; do
echo $i > /sys/bus/i2c/devices/0-0030/rtc/rtc*/wakealarm
done

instead of the i2cget command?

On a side note I also don't understand why reinstalling the NAS changes
anything. Does the installer access the rtc other than setting the time?

Best regards
Uwe


signature.asc
Description: PGP signature


Re: Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-07-17 Thread Helge Wiemann

Hello Uwe,

Sorry for my late reply, but I stopped watching this thread and relied 
on the mailing system to send me a notification (which never came). I 
learned from Martin yesterday there has been a fix and he kindly 
forwarded your solution to me.


This is what made my problems disappear entirely:

apt install i2c-tools
echo 0-0030 > /sys/bus/i2c/devices/0-0030/driver/unbind
i2cget -y 0 0x30 0x80

I ignored the error message and have not had an issue since. Thanks a 
lot for your help, this is great news!


HW



Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-07-16 Thread Helge Wiemann

Hello Martin,

Thank you for posting this. Although the shutdown issue disappeared 
after reinstalling the entire system my NAS would still occasionally 
boot and immediately shutdown for no obvious reason. A second boot would 
bring the system up as expected, but it was annoying nonetheless.


I tried this fix and the problem has entirely gone away! No random 
shutdown while booting.


So thank you for making the connection and posting the link here.

Helge
--
On 07/15/2016 04:56 PM, Martin Michlmayr wrote:

I don't think it has been mentioned here, but Uwe Kleine-König has
found and fixed this bug!

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794266#95





Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-07-15 Thread Martin Michlmayr
I don't think it has been mentioned here, but Uwe Kleine-König has
found and fixed this bug!

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794266#95

-- 
Martin Michlmayr
http://www.cyrius.com/



Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-04-30 Thread jfc
Hi Martin,

Thanks for your help. I followed the given procedure and I can power off
the Qnap now.

qnap:/home/jfc# echo 0-0030 > /sys/bus/i2c/devices/0-0030/driver/unbind
qnap:/home/jfc# i2cget 0 0x30 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will read from device file /dev/i2c-0, chip address 0x30, data address
0x01, using read byte data.
Continue? [Y/n] y
   Error: Read failed

Le 22/04/2016 18:44, Martin Michlmayr a écrit :
> * jfc  [2016-04-20 20:21]:
>> I get the same issue since I upgraded my Qnap TS-119P II | Turbo to
>> Jessie. I'm not able to shutdown my Qnap anymore, it always reboot
>> whatever command I use (halt, shutdown, systemctl).
> I just found the bug report again (not that it contains more info):
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794266
>



Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-04-27 Thread Uwe Kleine-König
Hello Helge,

On 04/17/2016 04:18 PM, Helge Wiemann wrote:
> However, all is good now.

can you try if doing:

echo +2 > /sys/class/rtc/rtc0/wakealarm

triggers the problem again?

If so,

echo 0 > /sys/class/rtc/rtc0/wakealarm

might fix it again.

Do you have something about rtc in your dmesg in the broken case?

Best regards
Uwe



signature.asc
Description: OpenPGP digital signature


Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-04-22 Thread Martin Michlmayr
* jfc  [2016-04-20 20:21]:
> I get the same issue since I upgraded my Qnap TS-119P II | Turbo to
> Jessie. I'm not able to shutdown my Qnap anymore, it always reboot
> whatever command I use (halt, shutdown, systemctl).

I just found the bug report again (not that it contains more info):
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794266

-- 
Martin Michlmayr
http://www.cyrius.com/



Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-04-20 Thread jfc
Hello,

I get the same issue since I upgraded my Qnap TS-119P II | Turbo to
Jessie. I'm not able to shutdown my Qnap anymore, it always reboot
whatever command I use (halt, shutdown, systemctl).

Is there a way to fix that, without going to a fresh install?

Thanks,

jfc 

Le 17/04/2016 16:18, Helge Wiemann a écrit :
> Martin & Roger
>
> A quick update: I had to reinstall the entire system because of a
> network glitch during a kernel upgrade which resulted in a bricked
> device. After resetting my NAS and installing Jessie from scratch the
> reboot issue disappeared and the system has been running well since.
>
> So apparently something got messed up when I upgraded from Wheezy to
> Jessie and I am inclined to attribute my problems to the upgrade
> process rather than the kernel or qcontrol.
>
> I am staying away from qcontrol and did not make any changes to it.
> However, all is good now.
>
> Thank you for your patience and support. I really appreciate your help.
>
> Helge
>



Re: Re: Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-04-17 Thread Helge Wiemann

Martin & Roger

A quick update: I had to reinstall the entire system because of a 
network glitch during a kernel upgrade which resulted in a bricked 
device. After resetting my NAS and installing Jessie from scratch the 
reboot issue disappeared and the system has been running well since.


So apparently something got messed up when I upgraded from Wheezy to 
Jessie and I am inclined to attribute my problems to the upgrade process 
rather than the kernel or qcontrol.


I am staying away from qcontrol and did not make any changes to it. 
However, all is good now.


Thank you for your patience and support. I really appreciate your help.

Helge



Re: Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-04-13 Thread Helge Wiemann

Martin & Roger,

Appreciate your responses and continuing support.

I installed the new kernel from the backports, but to no avail. A 
shutdown still results in a reboot. I even removed the qcontrol package 
to see what would happen, but it makes no difference.


I also suspect it has to do with qcontrol because I believe the problems 
started not right after the upgrade to Jessie, but when I upgraded to 
the latest version of qcontrol (which I did a few days after my upgrade 
to Jessie).


Whatever the issue is, I guess I have to wait until a fixed version of 
qcontrol is available. It is what it is. Shit happens. :-)


Helge



Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-04-13 Thread Martin Michlmayr
* Roger Shimizu  [2016-04-14 03:12]:
> > I think the issue is known bug in the current Kirkwood kernel, hence I don't
> > want to dwell on the subject. I upgraded to Debian Jessie recently on my QNP
> > TS-112P and ever since I have been unable to shutdown my system, because it
> > restarts rather than turns itself off when I issue "shutdown -h now" or
> > "poweroff".
> 
> there's recent fix for shutdown/reboot on QNAP:
> - https://bugs.debian.org/807696
> - https://bugs.debian.org/810680

Neither of those bugs apply to the kernel in jessie, though.

My suspicion is that this problem is related to the introduction of
wakealarm support in qcontrol.  I believe someone else reported a
similar problem in the past but I don't have a reference right now.

-- 
Martin Michlmayr
http://www.cyrius.com/



Re: Debian Jessie on QNAP TS-112P - Reboot instead of shutdown

2016-04-13 Thread Roger Shimizu
On Sat, Apr 9, 2016 at 4:54 AM, Helge Wiemann  wrote:
> Hello,
>
> I think the issue is known bug in the current Kirkwood kernel, hence I don't
> want to dwell on the subject. I upgraded to Debian Jessie recently on my QNP
> TS-112P and ever since I have been unable to shutdown my system, because it
> restarts rather than turns itself off when I issue "shutdown -h now" or
> "poweroff".

there's recent fix for shutdown/reboot on QNAP:
- https://bugs.debian.org/807696
- https://bugs.debian.org/810680

So probably a kernel upgrade can help you resolve the issue.

> Since I don't want to wait for a kernel update I was wondering if I can
> install this kernel image:
>
> linux-image-4.3.0-0.bpo.1-kirkwood (4.3.5-1~bpo8+1)
>
> I found it here:
>
> https://packages.debian.org/jessie-backports/linux-image-4.3.0-0.bpo.1-kirkwood
>
> Would this fix my problem and will I be able to install it without bricking
> my system? "dkpg -i" tells me this will break flash-kernel, therefore I did
> not go ahead.

You just need to install the backport version of flash-kernel first.
- https://packages.debian.org/jessie-backports/flash-kernel

If you add backports repo to your sources.list:

  deb http:///debian jessie-backports main

it should be as simple as "apt install"

Cheers,
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 17B3ACB1