Re: [qubes-users] Tip: How to speed up QubesOS shutdown

2017-03-19 Thread Grzesiek Chodzicki
W dniu niedziela, 19 marca 2017 00:28:18 UTC+1 użytkownik Andrew David Wong 
napisał:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> On 2017-03-18 09:24, Grzegorz Chodzicki wrote:
> > 
> > 
> > On 03/18/2017 05:21 PM, Unman wrote:
> >> On Sat, Mar 18, 2017 at 08:59:29AM -0700, Grzesiek Chodzicki wrote:
> >>> W dniu sobota, 18 marca 2017 15:08:35 UTC+1 użytkownik Unman napisał:
>  On Sat, Mar 18, 2017 at 03:41:49AM -0700, Grzesiek Chodzicki wrote:
> > I've experienced this issue myself and I saw some people complaining 
> > about it on the mailing list. Sometimes Qubes takes forever to poweroff.
> >
> > The issue is caused by the fact that for some unknown reason machines 
> > with PCI devices attached take forever to shutdown and sometimes need 
> > to be manually killed from within VM Manager. After manually killing 
> > them, the system will shutdown normally.
> >
> > So, here's the fix:
> >
> > In Dom0 run qvm-prefs -s sys-net pci_e820_host false
> >
> > Repeat that for sys-usb and any other machine that holds a PCI device.
> >
> > Your system should shut down normally after this.
> >
> > No, I don't know how or why this works but I know that it solved the 
> > issue on my machine. Explanation welcome. I'll add this to 
> > documentation once we have a confirmation that this is 100% 
> > reproducible.
> >
>  I'd be reluctant to propose this as a tip as is, because it will almost
>  certainly break networking for some users.
>  We specifically set pci_e820 to address user problems. I don't know what
>  the intersection is between those for whom this is a fix and those for
>  whom shutdown is slow/doesn't happen.
> 
>  Have you tried the solution suggested here before of shutting down other
>  vms first, then sys-usb and sys-net? Andrew, I think, posted a simple
>  script that he uses.
> 
> Yeah, here it is:
> 
> https://github.com/QubesOS/qubes-issues/issues/1581#issuecomment-266266876
> 
> (And also in the ML archives.)
> 
>  I suspect that that will have more impact with
>  fewer consequences than this proposal, but user experience will be key
>  here: comments ?
> >>> Yes, I did try that, this is how I found out that on my system it is not 
> >>> possible to cleanly shut down VMs that hold PCI devices. If I try 
> >>> shutting down sys-net the VM Manager hangs for a few minutes, then the 
> >>> entire system stops responding then the machine gets killed, then VM 
> >>> manager throws an exception and then system becomes responsive again. 
> >>> After setting pci_e820_host to False I can cleanly shutdown sys-net and 
> >>> sys-usb just like any other VM.
> >>>
> >> So that sounds very system specific. Why not put together a tip
> >> incorporating Andrew's script ( which will help on almost all
> >> machines), and then yours as a special case to be used where that
> >> doesnt help?
> > That's the point, I don't know whether this is specific to my machine
> > but I don't have another PC to test so I posted this here so other
> > people can try it and see if that alleviates the issue.
> > 
> 
> What if you just qvm-kill sys-net?
> 
> - -- 
> Andrew David Wong (Axon)
> Community Manager, Qubes OS
> https://www.qubes-os.org
> -BEGIN PGP SIGNATURE-
> 
> iQIcBAEBCgAGBQJYzcKAAAoJENtN07w5UDAw/78P/3CXZeKbMtD4LGNu4e6VAuKV
> tkzTmEXSZq/cWDLuYPuAlWhwfpHD5y4bOkfLUsswkHQSju4StP83iG1Yahpec6u1
> ZNcrGJ0JLCJbqsSSOwLq/xJT9tw5Q0KCju7xOyhG3QkQw2ZdtVkFZEewzn3f/pLS
> E/cVqOcZkCw77WkaDX0OM+qwlNN6wzCQemy4HfEhXx+l3rt8I9/OVLNS2PE0Daf6
> bcykBIy70Ytdtzou+sU1yFC21e32kqwixJpgwYuIe0qMSWNRoJiBqc7nxZn1y495
> 21IMMpDnDOWbHyY9jH+7E+PbQ3WfusZze8QcqegQ3afGz/WquMByFHnVJ9Xm8Y0U
> ewEdea8ceJ9WdZM2MWx8jD80DlPA43rUChGWAm53blEd7Mu9Z512s2i2SoVWilQS
> OE3XMFLWlgAgM9WTuMXLn0yi4UFbHK7+ptT3P9PBRbITbEwkRtvlgZmZ2H2m9G+Q
> OwTcNS6g17kqF5sYgTuc+MKY/b44v96UgDWtDhnELbIaImmrxyOkhrZAWy+gwEqk
> sGNp2zy3CDMgYo/AMgZMWr0TVzDa1qNPmWNR+hfDZDFUkS/klxh87sQttXIkQ0o9
> ckgsWjdnXHP8OncGp5e/5TGIk0CisaERwDH8944pkuYWhj32S1UKdMyKKYIYNSkt
> A4nScFTSJttZX9ybEkg9
> =iv32
> -END PGP SIGNATURE-

It gets killed as usual, no error messages. It's the qvm-shutdown that doesn't 
work properly.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/f729221e-5eb9-4e62-b34c-d8aba3faa3bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Tip: How to speed up QubesOS shutdown

2017-03-19 Thread haaber

On 03/19/2017 01:40 AM, Jean-Philippe Ouellet wrote:
> On Tue, Mar 14, 2017 at 7:11 PM, haaber  wrote:
>> I dont't have any e820 pci device as far as I know, but shutdown is
>> definitely a problem. xfce shuts down, and then I have a black screen
>> with a blinking cursor, and, afaik unless I brutally remove electricity.
>> No clue if this is related to Grzesiek's problem ... Bernhard
> 
> e820 does not refer to a device, but rather a table containing memory
> layout information provided by the bios [1].
> 
> [1]: 
> http://wiki.osdev.org/Detecting_Memory_(x86)#BIOS_Function:_INT_0x15.2C_EAX_.3D_0xE820
> 
Oups :) ! That is funny. So my shutdown pb could be related that I added
a second 8G mem bar? At least both occured approx. simultaneously. I
just never made the link.  Bernhard

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/371db135-5a51-be7c-a650-53f7ab9179a4%40web.de.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Tip: How to speed up QubesOS shutdown

2017-03-18 Thread Jean-Philippe Ouellet
On Tue, Mar 14, 2017 at 7:11 PM, haaber  wrote:
> I dont't have any e820 pci device as far as I know, but shutdown is
> definitely a problem. xfce shuts down, and then I have a black screen
> with a blinking cursor, and, afaik unless I brutally remove electricity.
> No clue if this is related to Grzesiek's problem ... Bernhard

e820 does not refer to a device, but rather a table containing memory
layout information provided by the bios [1].

[1]: 
http://wiki.osdev.org/Detecting_Memory_(x86)#BIOS_Function:_INT_0x15.2C_EAX_.3D_0xE820

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/CABQWM_Bq0vh2s_z1i%3D2HWNv2Pn7QFvp_KZ9FbJwXd5J6%2ByV6hg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Tip: How to speed up QubesOS shutdown

2017-03-18 Thread haaber
>>> Have you tried the solution suggested here before of shutting down other
>>> vms first, then sys-usb and sys-net? Andrew, I think, posted a simple
>>> script that he uses. I suspect that that will have more impact with
>>> fewer consequences than this proposal, but user experience will be key
>>> here: comments ?
>>
>> Yes, I did try that, this is how I found out that on my system it is not 
>> possible to cleanly shut down VMs that hold PCI devices. If I try shutting 
>> down sys-net the VM Manager hangs for a few minutes, then the entire system 
>> stops responding then the machine gets killed, then VM manager throws an 
>> exception and then system becomes responsive again. After setting 
>> pci_e820_host to False I can cleanly shutdown sys-net and sys-usb just like 
>> any other VM.
>>
> 
> So that sounds very system specific. Why not put together a tip
> incorporating Andrew's script ( which will help on almost all
> machines), and then yours as a special case to be used where that
> doesnt help?

I dont't have any e820 pci device as far as I know, but shutdown is
definitely a problem. xfce shuts down, and then I have a black screen
with a blinking cursor, and, afaik unless I brutally remove electricity.
No clue if this is related to Grzesiek's problem ... Bernhard

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/8452d566-22c1-ff28-aa86-93ad7c74b750%40web.de.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Tip: How to speed up QubesOS shutdown

2017-03-18 Thread Grzegorz Chodzicki


On 03/18/2017 05:21 PM, Unman wrote:
> On Sat, Mar 18, 2017 at 08:59:29AM -0700, Grzesiek Chodzicki wrote:
>> W dniu sobota, 18 marca 2017 15:08:35 UTC+1 użytkownik Unman napisał:
>>> On Sat, Mar 18, 2017 at 03:41:49AM -0700, Grzesiek Chodzicki wrote:
 I've experienced this issue myself and I saw some people complaining about 
 it on the mailing list. Sometimes Qubes takes forever to poweroff.

 The issue is caused by the fact that for some unknown reason machines with 
 PCI devices attached take forever to shutdown and sometimes need to be 
 manually killed from within VM Manager. After manually killing them, the 
 system will shutdown normally.

 So, here's the fix:

 In Dom0 run qvm-prefs -s sys-net pci_e820_host false

 Repeat that for sys-usb and any other machine that holds a PCI device.

 Your system should shut down normally after this.

 No, I don't know how or why this works but I know that it solved the issue 
 on my machine. Explanation welcome. I'll add this to documentation once we 
 have a confirmation that this is 100% reproducible.

>>> I'd be reluctant to propose this as a tip as is, because it will almost
>>> certainly break networking for some users.
>>> We specifically set pci_e820 to address user problems. I don't know what
>>> the intersection is between those for whom this is a fix and those for
>>> whom shutdown is slow/doesn't happen.
>>>
>>> Have you tried the solution suggested here before of shutting down other
>>> vms first, then sys-usb and sys-net? Andrew, I think, posted a simple
>>> script that he uses. I suspect that that will have more impact with
>>> fewer consequences than this proposal, but user experience will be key
>>> here: comments ?
>> Yes, I did try that, this is how I found out that on my system it is not 
>> possible to cleanly shut down VMs that hold PCI devices. If I try shutting 
>> down sys-net the VM Manager hangs for a few minutes, then the entire system 
>> stops responding then the machine gets killed, then VM manager throws an 
>> exception and then system becomes responsive again. After setting 
>> pci_e820_host to False I can cleanly shutdown sys-net and sys-usb just like 
>> any other VM.
>>
> So that sounds very system specific. Why not put together a tip
> incorporating Andrew's script ( which will help on almost all
> machines), and then yours as a special case to be used where that
> doesnt help?
That's the point, I don't know whether this is specific to my machine
but I don't have another PC to test so I posted this here so other
people can try it and see if that alleviates the issue.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/b4834e61-6e58-6a2a-a552-81e9509d007b%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Tip: How to speed up QubesOS shutdown

2017-03-18 Thread Unman
On Sat, Mar 18, 2017 at 08:59:29AM -0700, Grzesiek Chodzicki wrote:
> W dniu sobota, 18 marca 2017 15:08:35 UTC+1 użytkownik Unman napisał:
> > On Sat, Mar 18, 2017 at 03:41:49AM -0700, Grzesiek Chodzicki wrote:
> > > I've experienced this issue myself and I saw some people complaining 
> > > about it on the mailing list. Sometimes Qubes takes forever to poweroff.
> > > 
> > > The issue is caused by the fact that for some unknown reason machines 
> > > with PCI devices attached take forever to shutdown and sometimes need to 
> > > be manually killed from within VM Manager. After manually killing them, 
> > > the system will shutdown normally.
> > > 
> > > So, here's the fix:
> > > 
> > > In Dom0 run qvm-prefs -s sys-net pci_e820_host false
> > > 
> > > Repeat that for sys-usb and any other machine that holds a PCI device.
> > > 
> > > Your system should shut down normally after this.
> > > 
> > > No, I don't know how or why this works but I know that it solved the 
> > > issue on my machine. Explanation welcome. I'll add this to documentation 
> > > once we have a confirmation that this is 100% reproducible.
> > > 
> > 
> > I'd be reluctant to propose this as a tip as is, because it will almost
> > certainly break networking for some users.
> > We specifically set pci_e820 to address user problems. I don't know what
> > the intersection is between those for whom this is a fix and those for
> > whom shutdown is slow/doesn't happen.
> > 
> > Have you tried the solution suggested here before of shutting down other
> > vms first, then sys-usb and sys-net? Andrew, I think, posted a simple
> > script that he uses. I suspect that that will have more impact with
> > fewer consequences than this proposal, but user experience will be key
> > here: comments ?
> 
> Yes, I did try that, this is how I found out that on my system it is not 
> possible to cleanly shut down VMs that hold PCI devices. If I try shutting 
> down sys-net the VM Manager hangs for a few minutes, then the entire system 
> stops responding then the machine gets killed, then VM manager throws an 
> exception and then system becomes responsive again. After setting 
> pci_e820_host to False I can cleanly shutdown sys-net and sys-usb just like 
> any other VM.
> 

So that sounds very system specific. Why not put together a tip
incorporating Andrew's script ( which will help on almost all
machines), and then yours as a special case to be used where that
doesnt help?

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20170318162122.GB7465%40thirdeyesecurity.org.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Tip: How to speed up QubesOS shutdown

2017-03-18 Thread Unman
On Sat, Mar 18, 2017 at 03:41:49AM -0700, Grzesiek Chodzicki wrote:
> I've experienced this issue myself and I saw some people complaining about it 
> on the mailing list. Sometimes Qubes takes forever to poweroff.
> 
> The issue is caused by the fact that for some unknown reason machines with 
> PCI devices attached take forever to shutdown and sometimes need to be 
> manually killed from within VM Manager. After manually killing them, the 
> system will shutdown normally.
> 
> So, here's the fix:
> 
> In Dom0 run qvm-prefs -s sys-net pci_e820_host false
> 
> Repeat that for sys-usb and any other machine that holds a PCI device.
> 
> Your system should shut down normally after this.
> 
> No, I don't know how or why this works but I know that it solved the issue on 
> my machine. Explanation welcome. I'll add this to documentation once we have 
> a confirmation that this is 100% reproducible.
> 

I'd be reluctant to propose this as a tip as is, because it will almost
certainly break networking for some users.
We specifically set pci_e820 to address user problems. I don't know what
the intersection is between those for whom this is a fix and those for
whom shutdown is slow/doesn't happen.

Have you tried the solution suggested here before of shutting down other
vms first, then sys-usb and sys-net? Andrew, I think, posted a simple
script that he uses. I suspect that that will have more impact with
fewer consequences than this proposal, but user experience will be key
here: comments ?

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20170318140833.GA6814%40thirdeyesecurity.org.
For more options, visit https://groups.google.com/d/optout.