You are not logged in.

#1 2019-09-26 08:33:42

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 44

bbswitch not working on ASUS vivobook pro N580G

[phas@vostok ~]$ sudo systemctl status bumblebeed
● bumblebeed.service - Bumblebee C Daemon
   Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; disabled; vendor>
   Active: active (running) since Thu 2019-09-26 10:31:13 CEST; 5s ago
 Main PID: 5520 (bumblebeed)
    Tasks: 1
   Memory: 1.2M
   CGroup: /system.slice/bumblebeed.service
           └─5520 /usr/bin/bumblebeed

Sep 26 10:31:13 vostok systemd[1]: Started Bumblebee C Daemon.
Sep 26 10:31:13 vostok bumblebeed[5520]: [  215.966190] [INFO]/usr/bin/bumblebe>

bumblebeed is started.

[phas@vostok ~]$ dmesg | tail
[  215.791110] bbswitch: version 0.8
[  215.791115] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[  215.791122] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[  215.791131] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20190703/nsarguments-59)
[  215.791239] bbswitch: detected an Optimus _DSM function
[  215.791248] pci 0000:01:00.0: enabling device (0006 -> 0007)
[  215.791354] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[  215.793616] bbswitch: disabling discrete graphics
[phas@vostok ~]$ 

bbswitch reports working correctly

            100.0%        PCI Device: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile]

But powertop still reports the discrete card at full power and, seconds after bbswitch, the cpu fan ramps up to 100% until the computer is turned off (not rebooted)

Offline

#2 2019-09-26 13:26:47

seth
Member
Registered: 2012-09-03
Posts: 13,143

Re: bbswitch not working on ASUS vivobook pro N580G

cat /proc/acpi/bbswitch
dmes | grep bbswitch

If we ignore powertop and focus on the fan: is there high CPU load as well (to be the direct cause)?
If so: in what process?

Offline

#3 2019-09-26 16:00:15

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 44

Re: bbswitch not working on ASUS vivobook pro N580G

seth wrote:
cat /proc/acpi/bbswitch
dmes | grep bbswitch

If we ignore powertop and focus on the fan: is there high CPU load as well (to be the direct cause)?
If so: in what process?

[phas@vostok ~]$ cat /proc/acpi/bbswitch
0000:01:00.0 OFF
[phas@vostok ~]$ dmesg | grep bbswitch
[   11.541286] bbswitch: version 0.8
[   11.541290] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[   11.541296] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[   11.541402] bbswitch: detected an Optimus _DSM function
[   11.541478] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[   11.541820] bbswitch: disabling discrete graphics
Summary: 2281.8 wakeups/second,  0.0 GPU ops/seconds, 0.0 VFS ops/sec and 44.4% CPU use

Summary: 2281.8 wakeups/second,  0.0 GPU ops/seconds, 0.0 VFS ops/sec and 44.4% CPU use

Offline

#4 2019-09-26 16:04:14

seth
Member
Registered: 2012-09-03
Posts: 13,143

Re: bbswitch not working on ASUS vivobook pro N580G

The last bit only partly answers my question: it looks like half the cores are one fire, so check "top" which process loads the CPU.
However, that's probably the cause for the symptoms and there's no problem w/ bbswitch.

Offline

#5 2019-09-26 16:47:59

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 44

Re: bbswitch not working on ASUS vivobook pro N580G

seth wrote:

The last bit only partly answers my question: it looks like half the cores are one fire, so check "top" which process loads the CPU.
However, that's probably the cause for the symptoms and there's no problem w/ bbswitch.

Sorry I took the data in a moment where I had load because I was doing stuff.

            Package |             Core    |            CPU 0       CPU 6
                    |                     | Average      900 MHz    1089 MHz
Idle                | Idle                | Idle

                    |             Core    |            CPU 1       CPU 7
                    |                     | Average      930 MHz    1017 MHz
                    | Idle                | Idle

                    |             Core    |            CPU 2       CPU 8
                    |                     | Average      931 MHz    1044 MHz
                    | Idle                | Idle

                    |             Core    |            CPU 3       CPU 9
                    |                     | Average      908 MHz     921 MHz
                    | Idle                | Idle

                    |             Core    |            CPU 4       CPU 10
                    |                     | Average      912 MHz    1229 MHz
                    | Idle                | Idle

                    |             Core    |            CPU 5       CPU 11
                    |                     | Average      959 MHz    1016 MHz
                    | Idle                | Idle
           Pkg(HW)  |            Core(HW) |            CPU(OS) 0   CPU(OS) 6
                    |                     | C0 active   1.8%        1.2%
                    |                     | POLL        0.0%    0.1 ms  0.0%    0.0 ms
                    |                     | C1         11.8%    0.6 ms  0.6%    1.5 ms
C2 (pc2)    0.0%    |                     |
C3 (pc3)    0.0%    | C3 (cc3)    0.1%    | C3          0.1%    0.1 ms  0.1%    0.1 ms
C6 (pc6)    0.0%    | C6 (cc6)    1.0%    | C6          0.7%    0.2 ms  1.4%    0.5 ms
C7 (pc7)    0.0%    | C7 (cc7)   67.4%    | C7s         0.0%    0.0 ms  0.0%    0.0 ms
C8 (pc8)    0.0%    |                     | C8          4.7%    0.7 ms  5.6%    1.2 ms
C9 (pc9)    0.0%    |                     | C9          2.6%    0.4 ms  0.0%    0.3 ms
C10 (pc10)  0.0%    |                     |
                    |                     | C10        65.1%    2.7 ms 89.1%   12.5 ms
                    |                     | C1E        10.9%    1.1 ms  0.3%    0.4 ms

                    |            Core(HW) |            CPU(OS) 1   CPU(OS) 7
                    |                     | C0 active   0.9%        0.8%
                    |                     | POLL        0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C1          0.1%    0.3 ms  0.6%    0.5 ms
                    |                     |
                    | C3 (cc3)    0.0%    | C3          0.0%    0.1 ms  0.0%    0.1 ms
                    | C6 (cc6)    1.2%    | C6          0.7%    0.5 ms  0.8%    0.6 ms
                    | C7 (cc7)   92.9%    | C7s         0.0%    0.1 ms  0.0%    0.2 ms
                    |                     | C8          6.9%    1.7 ms  2.5%    1.1 ms
                    |                     | C9          0.2%    2.4 ms  0.1%    2.5 ms
                    |                     |
                    |                     | C10        90.0%   12.8 ms 94.0%   16.0 ms
                    |                     | C1E         0.1%    0.4 ms  0.1%    0.3 ms

                    |            Core(HW) |            CPU(OS) 2   CPU(OS) 8
                    |                     | C0 active   0.7%        0.9%
                    |                     | POLL        0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C1          0.0%    0.4 ms  0.2%    1.3 ms
                    |                     |
                    | C3 (cc3)    0.0%    | C3          0.0%    0.1 ms  0.0%    0.2 ms
                    | C6 (cc6)    0.9%    | C6          0.8%    0.6 ms  0.3%    0.4 ms
                    | C7 (cc7)   94.5%    | C7s         0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C8          2.0%    1.4 ms  3.4%    1.4 ms
                    |                     | C9          0.0%    0.9 ms  0.2%    3.8 ms
                    |                     |
                    |                     | C10        95.7%   18.8 ms 94.0%   19.1 ms
                    |                     | C1E         0.1%    0.5 ms  0.1%    0.4 ms

                    |            Core(HW) |            CPU(OS) 3   CPU(OS) 9
                    |                     | C0 active   0.7%        0.9%
                    |                     | POLL        0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C1          0.0%    0.4 ms  0.1%    0.2 ms
                    |                     |
                    | C3 (cc3)    0.0%    | C3          0.0%    0.0 ms  0.0%    0.1 ms
                    | C6 (cc6)    0.4%    | C6          0.3%    0.6 ms  0.3%    0.6 ms
                    | C7 (cc7)   95.0%    | C7s         0.0%    0.0 ms  0.0%    0.0 ms
                    |                     | C8          1.4%    1.1 ms  2.1%    1.5 ms
                    |                     | C9          0.0%    0.0 ms  0.0%    0.8 ms
Summary: 890.6 wakeups/second,  0.0 GPU ops/seconds, 0.0 VFS ops/sec and 9.7% CPU use

                Usage       Events/s    Category       Description
              3.2 ms/s     159.6        Process        [PID 1852] [irq/95-ELAN1200]
              1.1 ms/s     166.0        Interrupt      [17] idma64.1
              2.0 ms/s     136.1        Timer          tick_sched_timer
            100.0%                      Device         Audio codec hwC0D0: Conexant
             17.4 ms/s     104.9        Process        [PID 4019] /usr/bin/gnome-shell
             20.6 ms/s      75.6        Process        [PID 4492] /usr/lib/gnome-terminal-server
             11.3 ms/s      64.8        Process        [PID 7228] /usr/lib/chromium/chromium --type=renderer --field-trial-handle=1522552500291817644,17934281172205053309,131072 --la
             20.2 ms/s      50.8        Process        [PID 3867] /usr/lib/Xorg -nolisten tcp -auth /var/run/sddm/{76c92d7d-e60e-4cee-b114-232709a37cfb} -background none -noreset -di
              2.3 ms/s      35.2        Process        [PID 4977] /usr/lib/chromium/chromium --ppapi-flash-version=32.0.0.255 --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplaye
              0.8 ms/s      14.9        Process        [PID 343] /usr/sbin/haveged -w 1024 -v 1 --Foreground
             76.0 µs/s       8.4        kWork          psi_avgs_work
             59.5 µs/s       7.9        kWork          flush_to_ldisc
             97.6 µs/s       5.8        Process        [PID 11] [rcu_preempt]
             13.5 µs/s       4.9        kWork          intel_atomic_helper_free_state_
             68.6 µs/s       4.8        kWork          intel_atomic_cleanup_work
              0.0 µs/s       4.8        kWork          intel_atomic_commit_work
              1.8 ms/s       2.5        Process        [PID 4160] /usr/share/skypeforlinux/skypeforlinux --executed-from=/home/phas --pid=4146
             34.9 µs/s       2.7        Timer          watchdog_timer_fn
            123.1 µs/s       2.6        Interrupt      [0] HI_SOFTIRQ
            261.7 µs/s       2.5        Process        [PID 4367] /usr/share/skypeforlinux/skypeforlinux --type=renderer --autoplay-policy=no-user-gesture-required --ms-disable-index
            404.0 µs/s       2.4        Process        [PID 7311] powertop
              1.9 ms/s       1.6        Interrupt      [7] sched(softirq)
             89.6 µs/s       2.1        Process        [PID 4657] /usr/share/skypeforlinux/skypeforlinux --type=renderer --autoplay-policy=no-user-gesture-required --ms-disable-index
            171.8 µs/s       1.8        Process        [PID 4116] /usr/lib/at-spi2-registryd --use-gnome-session
             63.4 µs/s       2.0        Process        [PID 4667] /usr/share/skypeforlinux/skypeforlinux --type=renderer --autoplay-policy=no-user-gesture-required --ms-disable-index
            234.9 µs/s       1.6        Process        [PID 4989] /usr/lib/chromium/chromium --ppapi-flash-version=32.0.0.255 --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplaye
            259.0 µs/s       1.4        Process        [PID 6871] /usr/lib/chromium/chromium --ppapi-flash-version=32.0.0.255 --ppapi-flash-path=/usr/lib/PepperFlash/libpepflashplaye
              1.5 ms/s       0.5        Process        [PID 7440] top
             41.4 µs/s       1.0        Interrupt      [143] i915
             25.7 µs/s       1.0        Process        [PID 4669] /usr/share/skypeforlinux/skypeforlinux --type=renderer --autoplay-policy=no-user-gesture-required --ms-disable-index
             58.0 µs/s       1.0        Process        [PID 6020] /usr/share/skypeforlinux/skypeforlinux --type=renderer --autoplay-policy=no-user-gesture-required --ms-disable-index
             12.8 µs/s       1.0        kWork          pci_pme_list_scan
              2.3 ms/s      0.00        Interrupt      [17] i2c_designware.1
             18.5 µs/s       0.9        Process        [PID 3778] /usr/lib/systemd/systemd-logind
             74.4 µs/s       0.8        Process        [PID 312] [jbd2/sdb2-8]
             13.0 µs/s       0.8        kWork          blk_mq_requeue_work
              1.8 ms/s      0.00        Timer          hrtimer_wakeup
             13.6 µs/s       0.7        Timer          intel_uncore_fw_release_timer
            171.4 µs/s       0.6        Process        [PID 3511] /usr/bin/NetworkManager --no-daemon
            657.2 µs/s       0.4        Process        [PID 7439] bash
             59.4 µs/s       0.5        kWork          i915_hangcheck_elapsed
             27.4 µs/s       0.5        Process        [PID 2153] [irq/129-iwlwifi]
              0.9 ms/s      0.15        Interrupt      [1] timer(softirq)
            135.2 µs/s       0.4        kWork          handle_update
             60.1 µs/s       0.4        Interrupt      [4] block(softirq)
             29.5 µs/s       0.4        kWork          retire_work_handler
             24.3 µs/s       0.4        Process        [PID 4353] /usr/share/skypeforlinux/skypeforlinux --type=gpu-process --no-sandbox --gpu-preferences=KAAAAAAAAACAAACAAQAAAAAAAAA
            103.7 µs/s       0.3        kWork          __i915_gem_free_work
             58.0 µs/s       0.5        kWork          i915_hangcheck_elapsed
  Usage     Device name
             31.4%        CPU misc
             31.4%        CPU core
             31.4%        DRAM
            100.0%        Audio codec hwC0D0: Conexant
             40.6%        Display backlight
              0.0%        USB device: usb-device-8087-0aaa
              0.0%        USB device: xHCI Host Controller
            100.0%        I2C Device (i2c-ELAN1200:00): ELAN1200:00
            100.0%        Radio device: iwlwifi
            100.0%        PCI Device: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
            100.0%        Radio device: btusb
            100.0%        PCI Device: Intel Corporation Device a30d
            100.0%        PCI Device: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
            100.0%        PCI Device: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16)
            100.0%        PCI Device: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem
            100.0%        PCI Device: Intel Corporation Wireless-AC 9560 [Jefferson Peak]
            100.0%        PCI Device: Intel Corporation 82801 Mobile SATA Controller [RAID mode]
            100.0%        PCI Device: Intel Corporation Cannon Lake PCH SMBus Controller
            100.0%        PCI Device: Intel Corporation UHD Graphics 630 (Mobile)
            100.0%        PCI Device: Intel Corporation Cannon Lake PCH Thermal Controller
            100.0%        PCI Device: Intel Corporation Cannon Lake PCH Shared SRAM
            100.0%        PCI Device: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers
            100.0%        PCI Device: Intel Corporation Cannon Lake PCH cAVS
            100.0%        PCI Device: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller
            100.0%        PCI Device: Intel Corporation Cannon Lake PCH PCI Express Root Port #15
            100.0%        PCI Device: Intel Corporation Cannon Lake PCH SPI Controller
            100.0%        PCI Device: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile]
             42.0%        PCI Device: Intel Corporation Cannon Lake PCH Serial IO I2C Controller #1
             41.3%        runtime-i2c_designware.1
              7.5 pkts/s  Network interface: wlo1 (iwlwifi)
              0.0%        PCI Device: Intel Corporation Cannon Lake PCH HECI Controller
              0.0%        PCI Device: Intel Corporation Device a32a
              0.0%        runtime-ACPI0003:00
              0.0%        runtime-INT33A1:00
              0.0%        PCI Device: Intel Corporation Cannon Lake PCH Serial IO I2C Controller #0
              0.0%        PCI Device: Intel Corporation Cannon Lake PCH PCI Express Root Port #9
              0.0%        runtime-PNP0C14:00
              0.0%        runtime-iTCO_wdt
              0.0%        runtime-PNP0C0D:00
              0.0%        runtime-rtsx_usb_ms.1.auto
              0.0%        runtime-INT3450:00
              0.0%        runtime-microcode
              0.0%        runtime-ASUS7000:00
              0.0%        runtime-intel_rapl_msr.0
              0.0%        runtime-ATK4002:00
              0.0%        runtime-PNP0C0C:00
              0.0%        runtime-reg-dummy
              0.0 pkts/s  Network interface: eno2 (r8169)
              0.0%        runtime-PNP0C14:03

Offline

#6 2019-09-26 17:04:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,006

Re: bbswitch not working on ASUS vivobook pro N580G

Powertop cannot accurately asses power draw for most single devices, as the relevant sensors aren't available on most hardware (or share relevant information with other parts of the system) so it will "look" like everything is enabled while it actually isn't. If your overall power draw is within reason that's what you should be looking at.

(And if these outputs are while on AC you also won't see the relevant information, try on battery)

Last edited by V1del (2019-09-26 17:05:55)

Offline

#7 2019-09-26 17:18:06

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 44

Re: bbswitch not working on ASUS vivobook pro N580G

V1del wrote:

Powertop cannot accurately asses power draw for most single devices, as the relevant sensors aren't available on most hardware (or share relevant information with other parts of the system) so it will "look" like everything is enabled while it actually isn't. If your overall power draw is within reason that's what you should be looking at.

(And if these outputs are while on AC you also won't see the relevant information, try on battery)

Ok but brand new high level laptop shouldn't do 2 hours on battery. Especially when was doing 6 on windows

Offline

#8 2019-09-26 18:27:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,006

Re: bbswitch not working on ASUS vivobook pro N580G

Maybe, i'd still say look at the actual data. FWIW there have been reports of an issue with 5.3 and newer intel chipsets presumably solved with

i915.enable_guc=0

on your kernel parameters or try the LTS kernel for a test.

I'm still fairly certain your GPU is off and you are actually seeing a different manifestation here. You might also want to set up udev rules or enable TLP or so which triggers a few power saving knobs that aren't automatically triggered otherwise.

Last edited by V1del (2019-09-26 18:29:34)

Offline

#9 2019-09-26 20:52:14

seth
Member
Registered: 2012-09-03
Posts: 13,143

Re: bbswitch not working on ASUS vivobook pro N580G

We still have no usable data to reflect the CPU load when "the cpu fan ramps up to 100% until the computer is turned off"
Also try to drop bbswitch. If eg. the GPU reacts badly to the deactivation, this should lower the load and increase the runtime.

Especially when was doing 6 on windows

Do you still have a windows installation?
https://wiki.archlinux.org/index.php/Du … t_Start-Up

Offline

#10 2019-09-27 14:07:09

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 44

Re: bbswitch not working on ASUS vivobook pro N580G

seth wrote:

We still have no usable data to reflect the CPU load when "the cpu fan ramps up to 100% until the computer is turned off"

I tried and checked multiple times. The cpu load is reasonable and battery life
Now I'm at the airport it's kinda difficoult to do thets but I will be back.

Also try to drop bbswitch. If eg. the GPU reacts badly to the deactivation, this should lower the load and increase the runtime.

tried before didn't work.

Do you still have a windows installation?

Nope.

Offline

#11 2019-09-27 14:56:05

seth
Member
Registered: 2012-09-03
Posts: 13,143

Re: bbswitch not working on ASUS vivobook pro N580G

If leaving the GPU under control of the driver w/o actually using it does not increase (but maybe even lower?) the battery life, your problem is somewhere else.
This sentence seems capped:

The cpu load is reasonable and battery lifeThe cpu load is reasonable and battery life

I'd try to cut out gnome (or KDE as well) because the indexers of those DEs have a nasty habit of loading the system and draining the battery (though I seem to recall that one can inhibit them when the system is on battery)

Offline

#12 2019-10-05 19:33:56

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 44

Re: bbswitch not working on ASUS vivobook pro N580G

seth wrote:

If leaving the GPU under control of the driver w/o actually using it does not increase (but maybe even lower?) the battery life, your problem is somewhere else.
This sentence seems capped:

The cpu load is reasonable and battery lifeThe cpu load is reasonable and battery life

I'd try to cut out gnome (or KDE as well) because the indexers of those DEs have a nasty habit of loading the system and draining the battery (though I seem to recall that one can inhibit them when the system is on battery)

I tried to disable gdm and run "powertop" without any guy. The overall power draw is still around 15W

Offline

#13 2019-10-05 20:52:06

seth
Member
Registered: 2012-09-03
Posts: 13,143

Re: bbswitch not working on ASUS vivobook pro N580G

Did you try

V1del wrote:

FWIW there have been reports of an issue with 5.3 and newer intel chipsets presumably solved with

i915.enable_guc=0

on your kernel parameters or try the LTS kernel for a test.

?

Offline

#14 2019-10-06 10:48:35

riccardocagnasso
Member
Registered: 2012-02-22
Posts: 44

Re: bbswitch not working on ASUS vivobook pro N580G

I did it. I had to add the following to boot options

acpi_osi=! acpi_osi="!Windows 2009"

(notice the second "!" before "Windows 2009")

After that, bumblebee and bbswitch started to work correctly and the average power usage dropped well below 10W.

The only problem now is that I have to

tee /proc/acpi/bbswitch <<< ON

before launching GNOME and only after that i can do

tee /proc/acpi/bbswitch <<< OFF

otherwise, I will get a black screen after login. But it seems to be a known issue. As soon as I find a proper workaround/fix I'll post it here.

Last edited by riccardocagnasso (2019-10-06 10:50:32)

Offline

Board footer

Powered by FluxBB