Jump to content

Kali Linux 2.0 Critical Battery Problem


SystemCrash86
 Share

Recommended Posts

Hey guys, I'm having abit of a problem with the new Kali Linux 2.0.

Everything works great on my laptop except that when my laptop battery is critical i want it to poweroff/shutdown however no matter what i triy it keeps going in hibernate and i don't want that.

In settings i have changed from suspend to power off when critcal and it makes no difference.

Also in dconf-editor i changed it so laptop should shutdown when battery critical and this to makes no difference.

Does any one have any ideas?

Any help is greatly appreciated, thank you

Link to comment
Share on other sites

after talking with muts, he says there i sno fork from the debian base on power, so it's a matter I guess of settings or installing the needed tools, ie:acpi/acpid and such. goign to try an ISO on my laptop so I can see what is what, but this should work like it does with native debian on a laptop.

Edited by digip
Link to comment
Share on other sites

Thanks, i tried

apt-get install acpid

then ran

dmesg | grep ACPI

and the output is

root@Kali:~# dmesg | grep ACPI
[    0.000000] BIOS-e820: [mem 0x00000000b8f00000-0x00000000b8f1afff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000b8f1b000-0x00000000b968dfff] ACPI NVS
[    0.000000] ACPI: Early table checksum verification disabled
[    0.000000] ACPI: RSDP 0x00000000000F04A0 000024 (v02 TOSCPL)
[    0.000000] ACPI: XSDT 0x00000000B8F08080 000084 (v01 TOSCPL TOSCPL00 01072009 AMI  00010013)
[    0.000000] ACPI: FACP 0x00000000B8F19118 00010C (v05 TOSCPL TOSCPL00 01072009 AMI  00010013)
[    0.000000] ACPI BIOS Warning (bug): 32/64X length mismatch in FADT/Gpe0Block: 128/32 (20150204/tbfadt-618)
[    0.000000] ACPI: DSDT 0x00000000B8F08198 010F7D (v02 TOSCPL TOSCPL00 01072009 INTL 20120913)
[    0.000000] ACPI: FACS 0x00000000B968DF80 000040
[    0.000000] ACPI: APIC 0x00000000B8F19228 000068 (v03 TOSCPL TOSCPL00 01072009 AMI  00010013)
[    0.000000] ACPI: FPDT 0x00000000B8F19290 000044 (v01 TOSCPL TOSCPL00 01072009 AMI  00010013)
[    0.000000] ACPI: MSDM 0x00000000B8F192D8 000055 (v03 TOSCPL TOSCPL00 01072009 AMI  00010013)
[    0.000000] ACPI: MCFG 0x00000000B8F19330 00003C (v01 TOSCPL TOSCPL00 01072009 MSFT 00000097)
[    0.000000] ACPI: LPIT 0x00000000B8F19370 000104 (v01 TOSCPL TOSCPL00 00000003 VLV2 0100000D)
[    0.000000] ACPI: SLIC 0x00000000B8F19478 000176 (v01 TOSCPL TOSCPL00 01072009 AMI  00010013)
[    0.000000] ACPI: HPET 0x00000000B8F195F0 000038 (v01 TOSCPL TOSCPL00 01072009 AMI. 00000005)
[    0.000000] ACPI: SSDT 0x00000000B8F19628 000763 (v01 PmRef  CpuPm    00003000 INTL 20061109)
[    0.000000] ACPI: SSDT 0x00000000B8F19D90 000290 (v01 PmRef  Cpu0Tst  00003000 INTL 20061109)
[    0.000000] ACPI: SSDT 0x00000000B8F1A020 00017A (v01 PmRef  ApTst    00003000 INTL 20061109)
[    0.000000] ACPI: UEFI 0x00000000B8F1A1A0 000042 (v01 TOSCPL TOSCPL00 00000000      00000000)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled)
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] dfl edge lint[0xf4])
[    0.000000] ACPI: NMI not connected to LINT 1!
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] res dfl lint[0xbd])
[    0.000000] ACPI: NMI not connected to LINT 1!
[    0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.000223] ACPI: Core revision 20150204
[    0.020894] ACPI: All ACPI Tables successfully acquired
[    0.120807] PM: Registering ACPI NVS region [mem 0xb8f1b000-0xb968dfff] (7811072 bytes)
[    0.148269] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.148342] ACPI: bus type PCI registered
[    0.148400] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    0.176241] ACPI: Added _OSI(Module Device)
[    0.176241] ACPI: Added _OSI(Processor Device)
[    0.176241] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.176273] ACPI: Added _OSI(Processor Aggregator Device)
[    0.190870] ACPI: Dynamic OEM Table Load:
[    0.191021] ACPI: SSDT 0xFFFF880236396000 00045B (v01 PmRef  Cpu0Ist  00003000 INTL 20061109)
[    0.191992] ACPI: Dynamic OEM Table Load:
[    0.191992] ACPI: SSDT 0xFFFF880236349800 000433 (v01 PmRef  Cpu0Cst  00003001 INTL 20061109)
[    0.191992] ACPI: Dynamic OEM Table Load:
[    0.191992] ACPI: SSDT 0xFFFF880236340C00 00015F (v01 PmRef  ApIst    00003000 INTL 20061109)
[    0.191992] ACPI: Dynamic OEM Table Load:
[    0.191992] ACPI: SSDT 0xFFFF880236345DC0 00008D (v01 PmRef  ApCst    00003000 INTL 20061109)
[    0.194399] ACPI: Interpreter enabled
[    0.194469] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20150204/hwxface-580)
[    0.194632] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20150204/hwxface-580)
[    0.194813] ACPI: (supports S0 S3 S4 S5)
[    0.194871] ACPI: Using IOAPIC for interrupt routing
[    0.195805] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in ACPI motherboard resources
[    0.196536] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.633336] ACPI: Power Resource [USBC] (on)
[    0.635078] ACPI: Power Resource [PLPE] (on)
[    0.635456] ACPI: Power Resource [PLPE] (on)
[    0.637349] ACPI: Power Resource [FN00] (off)
[    0.638598] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.641422] pci 0000:00:14.0: System wakeup disabled by ACPI
[    0.643961] pci 0000:01:00.0: System wakeup disabled by ACPI
[    0.656611] pci 0000:02:00.0: System wakeup disabled by ACPI
[    0.668653] pci 0000:03:00.0: System wakeup disabled by ACPI
[    0.896612] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.897250] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 *4 5 6 10 11 12 14 15)
[    0.897886] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.898524] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 *10 11 12 14 15)
[    0.899159] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 *5 6 10 11 12 14 15)
[    0.899793] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
[    0.900519] ACPI: PCI Interrupt Link [LNKG] (IRQs *3 4 5 6 10 11 12 14 15)
[    0.901154] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 *10 11 12 14 15)
[    0.902543] ACPI: Enabled 6 GPEs in block 00 to 3F
[    0.902774] ACPI : EC: GPE = 0x18, I/O: command/status = 0x66, data = 0x62
[    0.904424] PCI: Using ACPI for IRQ routing
[    0.919530] pnp: PnP ACPI init
[    0.919693] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active)
[    1.124772] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.132311] pnp 00:02: Plug and Play ACPI device, IDs TOS0330 PNP0f13 (active)
[    1.132390] pnp 00:03: Plug and Play ACPI device, IDs TOS1106 PNP0c03 PNP030b (active)
[    1.133212] system 00:04: Plug and Play ACPI device, IDs PNP0c02 (active)
[    1.133882] pnp: PnP ACPI: found 5 devices
[    1.897849] ACPI: bus type USB registered
[    1.926690] ACPI: Thermal Zone [TZ01] (42 C)
[   22.371272] ACPI Warning: SystemIO range 0x000000000000F000-0x000000000000F01F conflicts with OpRegion 0x000000000000F000-0x000000000000F00F (\_SB_.PCI0.SBUS.SMBI) (20150204/utaddress-254)
[   22.371459] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[   22.515548] ACPI: Power Button [PWRB]
[   22.515955] ACPI: Lid Switch [LID0]
[   22.516226] ACPI: Power Button [PWRF]
[   22.544219] ACPI: Battery Slot [BAT1] (battery present)
[   22.727519] ACPI: AC Adapter [ACAD] (off-line)
[   23.079114] toshiba_bluetooth: Detected Toshiba ACPI Bluetooth device - installing RFKill handler
[   23.221749] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[   23.699104] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.21
root@Kali:~# 

This problem that i am having is not confined to just one laptop, i have tried it on sereral machines with the same result. Nothing i have tried so far has worked.

Link to comment
Share on other sites

acpi is generally what monitors events for power, or at least that's been my familiarity with it, but I could be wrong. you should be able to monitor and shutdown on battery levels with acpi though, but let me dig into this and get it working on my laptop. The VM is not going to help me see what you do since it's not going to show a battery, so the options for me dont' show anything for shutdown under power and battery options.

edit:

without even installing acpi, I can see that the default settings(at least in a live boot) are shutdown on critical battery, with nothing to change or set. From the power settings, scroll to the bottom under Suspend and Power off, and it's on shutdown by default, not hybernate. upower -d shows this as well, when critical, shutdown. Only time it goes to sleep is when the laptop lid is shut, which I can change under the tweak tool settings > power

Can you screenshot/post what it says under "upower -d" for battery at the bottom of the output?

Edited by digip
Link to comment
Share on other sites

On the live boot it's not a problem because it says shutdown by default and does exactly that on critical battery.

The problem occurs when i install Kali to my hard drive.

After typing upower -d in terminal the bottom of the output reads:

Daemon:

daemon-version: 0.99.1

on-battery: yes

lid-is-closed: no

lid-is-present: yes

critical-action: HybridSleep

how do i change this?

Link to comment
Share on other sites

Ah,I see. Try editing /etc/UPower/UPower.conf

you can comment out and copy the last line to end in "PowerOff" (not sur eif case sensitive) instead of HybridSleep. I only say comment, so you can see the old command if you need to change back for any reason, but that last line should be it, change, reboot, then run the dump command and see what it outputs. Will need to test it I guess. My laptop I have to disable uefi just to boot kali since I need to make a perisstent thumbdrive with EFI files, which I haven't done yet. I have windows 8.1 and work files on the main system, so don't want to wipe what is on there. Need my photoshop and such for my job, so not an option for me right now to go fully native on the new laptop.

if this still doesn't work, you can try changing the percentage policy to true as well.

edit:

btw, you can probably remove acpi and acpid, I thought maybe they were missing, but it looks like it's not using them for shutdown but instead upower and gnome power manager.

Edited by digip
Link to comment
Share on other sites

Ah,I see. Try editing /etc/UPower/UPower.conf

you can comment out and copy the last line to end in "PowerOff" (not sur eif case sensitive) instead of HybridSleep. I only say comment, so you can see the old command if you need to change back for any reason, but that last line should be it, change, reboot, then run the dump command and see what it outputs. Will need to test it I guess. My laptop I have to disable uefi just to boot kali since I need to make a perisstent thumbdrive with EFI files, which I haven't done yet. I have windows 8.1 and work files on the main system, so don't want to wipe what is on there. Need my photoshop and such for my job, so not an option for me right now to go fully native on the new laptop.

if this still doesn't work, you can try changing the percentage policy to true as well.

edit:

btw, you can probably remove acpi and acpid, I thought maybe they were missing, but it looks like it's not using them for shutdown but instead upower and gnome power manager.

I have done that and rebooted but since my laptop battery is just over half way full i will let you know what happens when it becomes critical.

Thanks for all your help

Link to comment
Share on other sites

You're welcome. Fingers crossed it works.

It didn't work, nothing i tried worked and this is a fresh iso install just in case. I edited /etc/Upower/Upower.conf to show "CriticalPowerAction=PowerOff" and uncommented the PowerOff value. Rebooted. And when i ran upower- d it still said HybridSleep at the bottom.

Link to comment
Share on other sites

Did you let it power all the way down? There are some setting sin there and an aritlca i saw that mentioned changign the settings to use percentages depending on firmware, but I'm not sure if that helps, or if the settings only change when at a critical level. By defautl it should hybernate or go to poweroff if it's too low for hybernation. I think you can adjust what levels it does things at as well if you look through the file on alert messages and such too. only other thing I can think to try is full blown https://projects.gnome.org/gnome-power-manager/ which has a panel and settings for what to do at which levels in the gui.

Forgot gnome power mnager is already installed. Kinda stumped.

Make sure ACPI is also enabled in the bios though, but if you had something else installed on this before and worked, then no need to check.

Edited by digip
Link to comment
Share on other sites

looking at some other posts from ubuntu users in general, from a few years past, looks like the hibernation mode is there by default in th event you have files opened, you'd lose them or corrupt anything in capture in a poweroff mode, vs hibernation which saves the last state of files opened. This is not unique to kali, although I'm still looking to see about how we go about changing this to a complete poweroff. Screenshots form gnome-power-manager vs what we have in kali differ and the options don't look the same, which I'm wondering if it's a gdm3 or other power daemon in control of these settings. Still, reading the documentation, it should hibernate unless below savable state for which it will then go to poweroff automatically, which you said isn't working. I'll have to build a thumb drive with EFI files so I can test with persistence as some point, but if you find out anything more, please let me know.

Link to comment
Share on other sites

I turned off gnome manager just to see what would happen and my laptop turns off like it should on critical power - however i lose all my notifications, none of them work so i don't know when it will turn off as there is no warning. But turning this off my computer seems to skip hibernation and go straight for shut down. I am very confused as to why gnome power manger doesn't work like it should.

Link to comment
Share on other sites

I turned off gnome manager just to see what would happen and my laptop turns off like it should on critical power - however i lose all my notifications, none of them work so i don't know when it will turn off as there is no warning. But turning this off my computer seems to skip hibernation and go straight for shut down. I am very confused as to why gnome power manger doesn't work like it should.

Hybernation saves the state, poweroff, saves nothing. The monitoring and notification is usually done by a daemon like acpid and apps that tie into it, which gnome-power-manager, from what I can tell uses upower as it's daemon to monitor the status, but maybe isn't working in gdm3. that's where I'm at a loss as well, as the screenshots for gnome-power-manager on the site show options to alert in shutdown and at what power levels to warn at, while in kali, I don't see any options do change this, which I was hoping the upower config would handle. only thing i can think is libnotify is missing or broken maybe - https://projects.gnome.org/gnome-power-manager/

You can see form their page, it's definitely showing critical messages, which for gdm3, I think show up from the bottom of the monitor though, in a rectangular box.

https://projects.gnome.org/gnome-power-manager/gpm.html

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...