Author Topic: [Arca Noae] Checked your disk lately?  (Read 8166 times)

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 14
  • Posts: 351
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #15 on: December 08, 2015, 11:54:50 am »
I can't remember when I used xwp shutdown delay the last time. There should be no additional delay necessary with current xwp and current ACPI. See what David says about ACPI shutdown. https://www.arcanoae.com/wiki/acpi/requirements/

If shutdown does not work reliable for you then I would suggest to open a ticket for ACPI. Of course only if it reproduceable with  "acpistat poweroff" as stated in the wiki. If shutdown work with this but does not work with latest xwp beta then I would be interesting too. 

I use xwp settings 'ACPI shutdown' and 'xwp new ini file routines'.

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 39
  • Posts: 1010
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #16 on: December 08, 2015, 06:15:37 pm »
Quote
There should be no additional delay necessary with current xwp and current ACPI.

Some years ago now, I did have a problem with a new machine, where it was getting the power turned off before the disk finished writing something. I didn't see any reason not to use the delay (obviously it was implemented for some reason), so I just started using it always. I still don't see any reason not to use the delay, it is definitely safer than not using it. Note that turning off the power, before the disk has finished writing, is not the same as not being able to load the power off module because the file system had been shut down. It sounds like Peter's problem is that the power is going off before the disk is finished, so the delay may be necessary (worth trying anyway).

I will note, that not all machines use ACPI. My ancient ThinkPad A22e doesn't use it, and it looks like it might need the delay (but I haven't tried without it, for a long time). I will also note, that that machine does suspend/resume, with no problem, and has done so since Intel fixed their network driver, oh so many years ago. I have yet to get a modern machine to do that.

While I am at it, I have one old machine that will not power off using ACPI, or APM. It goes through the routine, and something clicks when it should go off, but it just does a power on again. Of course windows will power it off, and even using DEL when Air Boot opens, will power it off. The delay makes no difference. I will note, that windows XP refuses to use ACPI, but eCS uses it with no problems, other than it won't complete a power off. Very strange...

Pete

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 28
  • Posts: 626
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #17 on: December 08, 2015, 06:28:55 pm »
Hi Andi B.

Well, ACPI seems to work fine here - although I have just discovered the /VW switch is required in order for the Marvell 88SE9172 eSATA controller to be available to the system.

The mainboard uses the AMD 990FX / SB950 chipsets which, i seem to recall being told by Lewis in an email, are "untested but expected to work" with current ACPI.

At the moment a shutdown problem is the suspect so although I have never needed tthe XWP Shutdown Delay option before I will give it a try in order to try and establish whether the problem is caused during shutdown.


Regards

Pete

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 28
  • Posts: 216
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #18 on: December 08, 2015, 11:29:37 pm »
Just a guess: there is always the chance that shutdown will be prevented by USB host Controllers that are still active and therefore accessing memory. The fact that some HW device is still reading from / writing to memory (USB host Controllers are busmaster capable) is enough to make shutdown fail. This is true in general for any other busmaster capable device (in short: a busmaster capable NIC still being active might exhibit the same problem).
It's always worth a try an specify /FS on every USB host Controller Driver line in config.sys. This switch will halt the host Controller and therefore will prevent it from touching memory.

In a perfect world, all OS/2 drivers serving busmaster capable devices should disable busmaster capability on shutdown. But not every driver does so ...

Lars

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 14
  • Posts: 351
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #19 on: December 09, 2015, 09:58:01 am »
Quote
Some years ago now, I did have a problem with a new machine, where it was getting the power turned off before the disk finished writing something. I didn't see any reason not to use the delay (obviously it was implemented for some reason)...
Honestly I do not know how long the xwp delay will be when the button is checked. Is it configurable?

Anyway I vaguely remember a discussion for giving flash based storage devices enough time to write there cache to the flash cells. Since a long time there is a delay in xpw shutdown for this marked with [SHL]. I think I set his value in my last beta builds from 200ms to 500ms for safety reason. Older source code has bigger values there but sometime SHL decided 200ms is enough. I guess for good reasons ;) This was at the time as the ACPI memory swap out problem was started to be solved.

From Lars post I now think my occasional shutdown problems does have not have anything to do with the delay but with USB. I supposed it before as it seems they only show up when I use my external USB drives. So for my next xwp build I reduce the delay in xwp to the value Steven has found to be enough.

Bottom line - delays and values seemed to be discussed and changed for more than 5 years now. If there is a delay needed more than the 200ms then this should be hardcoded in xwp. A few hundred ms are hardly noticed by the user anyway. If there is no reason other than a workaround for other drivers fault, then this has to be discussed and solved in that driver.

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 39
  • Posts: 1010
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #20 on: December 09, 2015, 06:45:56 pm »
Quote
Honestly I do not know how long the xwp delay will be when the button is checked. Is it configurable?

It is 4 seconds, and produces 4 beeps when it happens.

Quote
If there is no reason other than a workaround for other drivers fault, then this has to be discussed and solved in that driver.

I don't think it is the driver that was causing the problem that I had, a few years ago (and I suspect that this might be Pete's problem). It seemed that the driver thought all disk activity was done, but the drive still had some stuff in it's internal cache when the machine finished processing the shutdown, and cut the power. The delay fixed that problem, and 4 seconds at shutdown is hardly noticeable. It probably doesn't need to be more than 1 second, but machines are getting faster, and disk caches are getting bigger, so some delay is probably a good thing. Why not use more time than anybody might think is necessary. 200 ms might be enough, most of the time, but so is 1000 ms. 199 ms may not be enough. Who really cares how long it takes to shut down a machine, as long as it gets done right. This is not a race. Well, I suppose it is a race between getting all of the data written, and pulling the plug. Getting all of the data written is much more important than pulling the plug.

I will note, that I have always had to use /FS on the USB drivers, in that same machine, or the BIOS, very often (3 out of 5), would hang on initializing the USB stuff on a warm boot. It is very rare to have any USB device attached at shutdown (except for the mouse, and the UPS). I never really saw any other problems with USB. BIOS still has a problem initializing the USB, but it is about 1 in 100 with /FS. I have used /FS on other machines, and it doesn't make any difference, so I would suggest that /FS should be the default (why not?).

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 14
  • Posts: 351
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #21 on: December 11, 2015, 09:52:31 am »
Quote
It seemed that the driver thought all disk activity was done, but the drive still had some stuff in it's internal cache when the machine finished processing the shutdown, and cut the power. The delay fixed that problem
To my understanding that was the reason why SHL added the delay in xwp code. It's another story that this version of xwp source code never found the way to the public until I started uploading betas.

Quote
and 4 seconds at shutdown is hardly noticeable. It probably doesn't need to be more than 1 second, but machines are getting faster, and disk caches are getting bigger, so some delay is probably a good thing. Why not use more time than anybody might think is necessary. 200 ms might be enough, most of the time, but so is 1000 ms. 199 ms may not be enough. Who really cares how long it takes to shut down a machine, as long as it gets done right.
This all is a workaround for a problem either not understand or not solved in the right way. I consider workarounds only as second best choice. There must be a proper solution and I've no evidence that Steven ones is not the correct one. I'm happy if you can prove the opposite. But for this you have to -
- use the latest AN ACPI
- and the latest xwp beta
- and the 'apcitool shutdown' has to work reliable
- and xwp shutdown does not
- and xwp shutdown with delay does

If all these things are true then we should discuss the proper value of delay. Otherwise I would suggest Pete to look for a real fix for his problem.

I want to say that I do not post this to offend against someone but only cause I want to fix xwp if it has bugs and make it even more perfect.

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 39
  • Posts: 1010
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #22 on: December 12, 2015, 01:33:16 am »
Quote
To my understanding that was the reason why SHL added the delay in xwp code. It's another story that this version of xwp source code never found the way to the public until I started uploading betas.

It sad that there seems to be no mention of what was changed, or why. Actually, that isn't entirely true, there is a list of things that changed, but the average user (including me) has no idea what it is talking about. Whether 200 ms is enough delay remains to be seen. I am not willing to change my main system, yet, but I will change other, less critical, systems (including the one where I had the problem, but it has a different hard disk now), and see what happens.

In Pete's case, he has a problem that sounds like the one that I had, and adding the delay fixed mine, so he should try it. If it fixes it, and he meets the rest of your conditions, I would suggest a longer delay in XWP. He didn't mention which version of XWP, or eWP, he is using, so the delay may work. In any case, I would suggest that the delay be left in the code, for diagnostic reasons, but it could probably be less than 4 seconds.

Quote
This all is a workaround for a problem either not understand or not solved in the right way.

There are probably 100 (or more) of those in eCS. In a lot of cases, the work around is necessary because there is no way to fix the problems properly.  In other cases, nobody is interested in doing it. And in even more cases, those who might be able to fix them, insist that the problem doesn't exist. I suspect that most of the work arounds come from somebody who can sort it out, who fixed it because they had the problem. The rest of us are left hanging, and anything that somebody can figure out becomes the work around.

While I have your attention, why don't you turn off that annoying animation that is default on XWP shutdown? At least make it so that it is not the default.

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 14
  • Posts: 351
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #23 on: December 13, 2015, 01:49:35 pm »
Quote
While I have your attention, why don't you turn off that annoying animation that is default on XWP shutdown? At least make it so that it is not the default.
Cause for me it is not so much annoying to spend any time on it :). Didn't find much in the doc so how can you disable it?

Andreas Schnellbacher

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 15
  • Posts: 292
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #24 on: December 13, 2015, 04:26:13 pm »
Desktop -> Properties -> XShutdown -> Shutdown only
Animation  [ ] before shutdown  [ ] before reboot

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 14
  • Posts: 351
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #25 on: December 13, 2015, 07:52:04 pm »
Thanks Andreas, I'm blind cause I've overlooked it 2 times I searched for it in that dialog :(.

Anyway, I don't think it would help very much if I change default setting. I'm pretty sure xwp will take over your old settings when you install a new version. As I've deactivated animation years ago I didn't get annoyed by it since a long time ;)

Dough, do this setting got reenabled for you when you install a new version? Then it's a bug of course. Or do you make new installations so often that this is a problem for you?

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 39
  • Posts: 1010
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #26 on: December 14, 2015, 03:38:29 am »
Quote
do this setting got reenabled for you when you install a new version? Then it's a bug of course. Or do you make new installations so often that this is a problem for you?

No, it doesn't change for an update to x(e)WP. I have been doing a lot of new VBox installs lately, while testing things. I usually don't think about it until I shut down, then, I forget again after I start up. It is not really a problem, but it is annoying until I make a specific boot, just to get it turned off. I realize that some new version of OS/2 will be required to get an updated XWP into it, but if it starts now, it will get there eventually.

Andreas Schnellbacher

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 15
  • Posts: 292
    • View Profile
Re: [Arca Noae] Checked your disk lately?
« Reply #27 on: December 15, 2015, 09:02:35 pm »
I've overlooked it 2 times I searched for it in that dialog
I made the same experience a few years ago. That part of the notebook page seems to be too crowded.