# System startup stuckes for 1min at battery: ACPI

## chi86

Hi,

recently I adjusted my kernel to get the opengl running (according to https://wiki.gentoo.org/wiki/Intel) yet since than I have the problem that the system (its a ThinkPad) start is rather slow. Before it was done in 1min but now it stucks 1min during the tasks "battery: ACPI: Battery Slot [BAT0] (battery present)" and "random: fast init done" see the following dmesg output:

```

...

[    0.632069] ACPI: Sleep Button [SLPB]

[    0.632144] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1

[    0.632199] ACPI: Lid Switch [LID]

[    0.632260] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2

[    0.632305] ACPI: Power Button [PWRF]

[    0.634090] [Firmware Bug]: Invalid critical threshold (0)

[    0.634132] [Firmware Bug]: No valid trip found

[    0.634256] drm_mm: Testing DRM range manger (struct drm_mm), with random_seed=0x63861a66 

max_iterations=8192 max_prime=128

[    0.634329] drm_mm: igt_sanitycheck - ok!

[    0.634375] igt_debug 0x0000000000000000-0x0000000000000200: 512: free

[    0.634377] igt_debug 0x0000000000000200-0x0000000000000600: 1024: used

[    0.634378] igt_debug 0x0000000000000600-0x0000000000000a00: 1024: free

[    0.634380] igt_debug 0x0000000000000a00-0x0000000000000e00: 1024: used

[    0.634381] igt_debug 0x0000000000000e00-0x0000000000001000: 512: free

[    0.634382] igt_debug total: 4096, used 2048 free 2048

[    0.635145] battery: ACPI: Battery Slot [BAT0] (battery present)

[   26.092221] random: fast init done

[   65.322077] checking generic (e0000000 7f0000) vs hw (e0000000 10000000)

[   65.322078] fb: switching to inteldrmfb from EFI VGA

[   65.322132] Console: switching to colour dummy device 80x25

[   65.322239] [drm] Replacing VGA console driver

[   65.323314] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).

[   65.323319] [drm] Driver supports precise vblank timestamp query.

[   65.324058] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+m

em:owns=io+mem

[   65.324112] i915 0000:00:02.0: Direct firmware load for i915/kbl_dmc_ver1_04.bin failed wi

th error -2

[   65.324118] i915 0000:00:02.0: Failed to load DMC firmware i915/kbl_dmc_ver1_04.bin. Disab

ling runtime power management.

[   65.324123] i915 0000:00:02.0: DMC firmware homepage: https://git.kernel.org/pub/scm/linux

/kernel/git/firmware/linux-firmware.git/tree/i915

[   65.341632] [drm] Initialized i915 1.6.0 20180719 for 0000:00:02.0 on minor 0

[   65.344016] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)

[   65.344485] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/in

put/input3

[   65.347652] loop: module loaded

...

```

Has anyone an idea to approach this problem?Last edited by chi86 on Wed Apr 08, 2020 8:13 am; edited 2 times in total

----------

## mike155

Please post the output of 

```
emerge --info
```

Please post the output of 

```
lspci
```

Please post your kernel config using wgetpaste.

----------

## chi86

 *mike155 wrote:*   

> Please post the output of 
> 
> ```
> emerge --info
> ```
> ...

 

```
# emerge --info

Portage 2.3.89 (python 3.6.10-final-0, default/linux/amd64/17.1, gcc-9.2.0, glibc-2.29-r7, 4.19.86-gentoo x86_64)

=================================================================

System uname: Linux-4.19.86-gentoo-x86_64-Intel-R-_Core-TM-_i5-8250U_CPU_@_1.60GHz-with-gentoo-2.6

KiB Mem:     8049096 total,   1445888 free

KiB Swap:     524284 total,    269888 free

Timestamp of repository gentoo: Thu, 02 Apr 2020 09:30:01 +0000

Head commit of repository gentoo: 2ed8c7d4c44104d18bf26206e2139b8f90df13dc

sh bash 4.4_p23-r1

ld GNU ld (Gentoo 2.33.1 p2) 2.33.1

app-shells/bash:          4.4_p23-r1::gentoo

dev-lang/perl:            5.30.1::gentoo

dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.7::gentoo

dev-util/cmake:           3.16.5::gentoo

dev-util/pkgconfig:       0.29.2::gentoo

sys-apps/baselayout:      2.6-r1::gentoo

sys-apps/openrc:          0.42.1::gentoo

sys-apps/sandbox:         2.13::gentoo

sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo

sys-devel/automake:       1.16.1-r1::gentoo

sys-devel/binutils:       2.33.1-r1::gentoo

sys-devel/gcc:            9.2.0-r2::gentoo

sys-devel/gcc-config:     2.2.1::gentoo

sys-devel/libtool:        2.4.6-r6::gentoo

sys-devel/make:           4.2.1-r4::gentoo

sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)

sys-libs/glibc:           2.29-r7::gentoo

Repositories:

gentoo

    location: /usr/portage

    sync-type: rsync

    sync-uri: rsync://rsync.gentoo.org/gentoo-portage

    priority: -1000

    sync-rsync-verify-max-age: 24

    sync-rsync-verify-jobs: 1

    sync-rsync-extra-opts: 

    sync-rsync-verify-metamanifest: yes

dlang

    location: /var/lib/layman/dlang

    masters: gentoo

    priority: 50

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=broadwell -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-march=broadwell -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="https://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ ftp://ftp.halifax.rwth-aachen.de/gentoo/ rsync://ftp.halifax.rwth-aachen.de/gentoo/"

LANG="en_US.utf8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="en"

MAKEOPTS="-j8"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"

PORTAGE_TMPDIR="/var/tmp"

USE="X acl alsa amd64 berkdb bzip2 cli consolekit crypt cups dbus dri eselect-ldso fortran gdbm glamor gphoto2 gt5 gtk2 gtk3 iconv ipv6 jpeg libinput libtirpc lock multilib ncurses networkmanager nls nptl openmp pam pcre pulseaudio qt5 readline seccomp sessions split-usr ssl startup-notification tcpd threads tk udev unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev synaptics libinput" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="intel i965" XFCE_PLUGINS="brightness clock trash" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
```

```

 # lspci

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 08)

00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)

00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08)

00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)

00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)

00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)

00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)

00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)

00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)

00:1c.2 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #3 (rev f1)

00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)

00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)

00:1f.0 ISA bridge: Intel Corporation Sunrise Point LPC Controller/eSPI Controller (rev 21)

00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)

00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)

00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)

00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (4) I219-V (rev 21)

02:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)

03:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983

04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)
```

----------

## mike155

Thanks for the output of 'emerge --info' and 'lspci'. Looks good so far!

But where is the link to your kernel config? That's the most important thing!   :Smile: 

----------

## chi86

 *mike155 wrote:*   

> Thanks for the output of 'emerge --info' and 'lspci'. Looks good so far!
> 
> But where is the link to your kernel config? That's the most important thing!  
> 
> 

 

hmm do you mine that:

```
lrwxrwxrwx  1 root root   20 Dec  8 15:14 linux -> linux-4.19.86-gentoo

drwxr-xr-x 27 root root 4096 Apr  2 11:44 linux-4.19.86-gentoo

```

----------

## mike155

No. We need your kernel config. But your kernel config is too long to be posted here. Therefore...

Please read https://wiki.gentoo.org/wiki/Wgetpaste

Install wgetpaste: 

```
emerge wgetpaste
```

Send your kernel config to a pastebin service

```
zcat /proc/config.gz | wgetpaste
```

The command above returns an URL. Post that URL in a follow-up post.

----------

## chi86

sorry but i cant find anything in: proc/config.gz  it is not existing ...

----------

## mike155

OK, then please run

```
wgetpaste /usr/src/linux/.config
```

and post the answer.

You may want to enable the kernel options below (no hurry, do it the next time you configure your kernel):

```
    General setup

        [*] Kernel .config support

            [*] Enable access to .config through /proc/config.gz

```

----------

## molletts

Try adding the missing firmware to the kernel - my Radeon-based media PC hangs for a while during boot if I forget to put the firmware into the kernel so it may be the same problem:

First, install sys-kernel/linux-firmware if you don't have it already. Then add CONFIG_EXTRA_FIRMWARE="i915/kbl_dmc_ver1_04.bin" to your kernel config (in menuconfig, it's under Device Drivers -> Generic Driver Options -> Firmware Loader -> Build named firmware blobs into the kernel; put i915/kbl_dmc_ver1_04.bin into the field). You probably already have updated microcode for your CPU in here so just add the extra file to the list, separated by a space.

Then rebuild and install the new kernel and see if it changes anything. It may ask for another firmware file after loading the missing one, in which case add that one too, lather, rinse and repeat. (My Radeon needs 4 separate firmware blobs.)

----------

## chi86

 *mike155 wrote:*   

> OK, then please run
> 
> ```
> wgetpaste /usr/src/linux/.config
> ```
> ...

 

http://dpaste.com/0RNSH67

----------

## chi86

 *molletts wrote:*   

> Try adding the missing firmware to the kernel - my Radeon-based media PC hangs for a while during boot if I forget to put the firmware into the kernel so it may be the same problem:
> 
> First, install sys-kernel/linux-firmware if you don't have it already. Then add CONFIG_EXTRA_FIRMWARE="i915/kbl_dmc_ver1_04.bin" to your kernel config (in menuconfig, it's under Device Drivers -> Generic Driver Options -> Firmware Loader -> Build named firmware blobs into the kernel; put i915/kbl_dmc_ver1_04.bin into the field). You probably already have updated microcode for your CPU in here so just add the extra file to the list, separated by a space.
> 
> Then rebuild and install the new kernel and see if it changes anything. It may ask for another firmware file after loading the missing one, in which case add that one too, lather, rinse and repeat. (My Radeon needs 4 separate firmware blobs.)

 

Still the same issue

----------

## mike155

You've got an Intel UHD Graphics 620 graphics controller. That controller needs firmware. Output of 'dmesg' shows that the kernel can't load the firmware:

```
[   65.324058] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem

[   65.324112] i915 0000:00:02.0: Direct firmware load for i915/kbl_dmc_ver1_04.bin failed with error -2

[   65.324118] i915 0000:00:02.0: Failed to load DMC firmware i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.

[   65.324123] i915 0000:00:02.0: DMC firmware homepage: https://git.kernel.org/pub/scm/linux /kernel/git/firmware/linux-firmware.git/tree/i915

```

Your kernel .config shows that you haven't configured the firmware:

```
CONFIG_FW_LOADER=y

CONFIG_EXTRA_FIRMWARE=""    <---- wrong!
```

Please follow the advice given in https://wiki.gentoo.org/wiki/Intel#Firmware and retry. 

EDIT: Please try 'i915/skl_dmc_ver1_27.bin' as well as 'i915/kbl_dmc_ver1_04.bin'. I don't know which one is the right one. Probably the latter.

Please look at the output of dmesg after you boot. The error messages about the firmware should disappear or at least change - otherwise it could be that something went wrong when you built and installed the kernel.

----------

## chi86

 *mike155 wrote:*   

> You've got an Intel UHD Graphics 620 graphics controller. That controller needs firmware. Output of 'dmesg' shows that the kernel can't load the firmware:
> 
> ```
> [   65.324058] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
> 
> ...

 

Ok I finally figured out where the "i915/kbl_dmc_ver1_04.bin" comes from. According to https://wiki.gentoo.org/wiki/Intel#Firmware thats the needed firmware and now by putting it into the "CONFIG_EXTRA_FIRMWARE" it workes:

```

[    0.748272] ACPI: Sleep Button [SLPB]

[    0.748351] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1

[    0.749272] ACPI: Lid Switch [LID]

[    0.749341] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2

[    0.750263] ACPI: Power Button [PWRF]

[    0.752734] [Firmware Bug]: Invalid critical threshold (0)

[    0.752769] [Firmware Bug]: No valid trip found

[    0.752976] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled

[    0.754029] battery: ACPI: Battery Slot [BAT0] (battery present)

[    0.754063] Non-volatile memory driver v1.3

[    0.754128] Linux agpgart interface v0.103

[    0.754183] drm_mm: Testing DRM range manger (struct drm_mm), with random_seed=0xdb624325 

max_iterations=8192 max_prime=128

[    0.754261] drm_mm: igt_sanitycheck - ok!

[    0.754302] igt_debug 0x0000000000000000-0x0000000000000200: 512: free

[    0.754304] igt_debug 0x0000000000000200-0x0000000000000600: 1024: used

[    0.754305] igt_debug 0x0000000000000600-0x0000000000000a00: 1024: free

[    0.754306] igt_debug 0x0000000000000a00-0x0000000000000e00: 1024: used

[    0.754307] igt_debug 0x0000000000000e00-0x0000000000001000: 512: free

[    0.754309] igt_debug total: 4096, used 2048 free 2048

[    1.728308] tsc: Refined TSC clocksource calibration: 1799.999 MHz

[    1.728351] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x19f228ab7a2, max_idle

_ns: 440795289252 ns

[    1.728478] clocksource: Switched to clocksource tsc

[   26.143567] random: fast init done

[   70.091078] checking generic (e0000000 7f0000) vs hw (e0000000 10000000)

[   70.091080] fb0: switching to inteldrmfb from EFI VGA

[   70.091197] Console: switching to colour dummy device 80x25

[   70.091249] i915 0000:00:02.0: vgaarb: deactivate vga console

[   70.092250] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).

[   70.092254] [drm] Driver supports precise vblank timestamp query.

[   70.093024] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+m

em:owns=io+mem

[   70.093621] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)

[   70.119412] [drm] Initialized i915 1.6.0 20190822 for 0000:00:02.0 on minor 0

[   70.122698] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)

[   70.123157] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/in

put/input3

[   70.126850] loop: module loaded

[   70.126947] mei_me 0000:00:16.0: enabling device (0004 -> 0006)

[   70.127048] SCSI Media Changer driver v0.25 

[   70.127382] nvme nvme0: pci function 0000:03:00.0

[   70.127597] e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI

[   70.127604] e100: Copyright(c) 1999-2006 Intel Corporation

[   70.127628] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI

[   70.127634] e1000: Copyright (c) 1999-2006 Intel Corporation.

[   70.127656] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k

[   70.127659] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.

[   70.128043] e1000e 0000:00:1f.6: Interrupt Throttling Rate (ints/sec) set to dynamic conse

rvative mode

[   70.236740] fbcon: i915drmfb (fb0) is primary device

[   70.272844] Console: switching to colour frame buffer device 240x67

[   70.289317] i915 0000:00:02.0: fb0: i915drmfb frame buffer device

[   70.337278] nvme nvme0: missing or invalid SUBNQN field.

[   70.337342] nvme nvme0: Shutdown timeout set to 8 seconds

[   70.357772] e1000e 0000:00:1f.6 0000:00:1f.6 (uninitialized): registered PHC clock

[   70.361973] nvme nvme0: 8/0/0 default/read/poll queues

[   70.372863]  nvme0n1: p1 p2 p3 p4

[   70.420584] e1000e 0000:00:1f.6 eth0: (PCI Express:2.5GT/s:Width x1) 54:ee:75:f2:83:07

[   70.420637] e1000e 0000:00:1f.6 eth0: Intel(R) PRO/1000 Network Connection

[   70.420731] e1000e 0000:00:1f.6 eth0: MAC: 12, PHY: 12, PBA No: 1000FF-0FF

[   70.420795] sky2: driver version 1.30

[   70.420885] usbcore: registered new interface driver asix

[   70.420950] usbcore: registered new interface driver ax88179_178a

[   70.420998] usbcore: registered new interface driver cdc_ether

[   70.421041] usbcore: registered new interface driver net1080

[   70.421083] usbcore: registered new interface driver cdc_subset

[   70.421125] usbcore: registered new interface driver zaurus

[   70.421171] usbcore: registered new interface driver cdc_ncm

[   70.421213] usbcore: registered new interface driver cdc_mbim

```

Nevertheless, it still takes ages, see the jump from 1.728478 to 26.143567 and than 70.091078.

----------

## mike155

So we solved one issue, but the main problem persists...   :Confused: 

Some options of your kernel config look suspicious. I would change the kernel settings below and retry:

Enable CONFIG_X86_SYSFB. Help says:  'If unsure, say "Y"'

Disable CONFIG_DRM_DEBUG_MM. Help says:  'If in doubt, say "N"'

Disable DRM_DEBUG_SELFTEST. Help says:  'If in doubt, say "N"'

Disable CONFIG_DRM_I915_ALPHA_SUPPORT

Disable DRM_GMA500. You don't have that, have you?

Disable CONFIG_HOTPLUG_PCI. Help says:  'If in doubt, say "N"'

Enable CONFIG_MTRR_SANITIZER. Help says:  'If in doubt, say "Y"'

Disable CONFIG_SUSPEND - until you solved the issue

Disable CONFIG_HIBERNATION - until you solved the issue

Disable CONFIG_LOGO - until you solved the issue

Switch to default governor to 'performance' - until you solved the issue

Enable CONFIG_DRM_VGEM - not related to the issue

Please change these options using 'make menuconfig' - not with a text editor in /usr/src/linux/.config. 

Hint: if you press '/' in 'make menuconfig', you will get a 'search' popup window, which allows you to search for an option (e.g. HOTPLUG_PCI). You will see numbers on the left side of the result list. If you press a number key, 'make menuconfig' will jump directly to the corresponding option. This method allows you to change options very quickly!   :Smile: 

----------

## chi86

 *mike155 wrote:*   

> So we solved one issue, but the main problem persists...  
> 
> Some options of your kernel config look suspicious. I would change the kernel settings below and retry:
> 
> Enable CONFIG_X86_SYSFB. Help says:  'If unsure, say "Y"'
> ...

 

Thank you so much that did the trick!

Just if you are inteseted in the the new dmesg output: http://dpaste.com/2EXHZX5

What do you think was the problem? Just for me to understand the issue better!

I will undo the kernel settings you marked with "until problem is solved"

----------

## chi86

I still don't completly understand why i have to use the firmware, based on the VIDEO_CARDS i915

```
/usr/src/linux # cat .config | grep i915

CONFIG_EXTRA_FIRMWARE="i915/kbl_dmc_ver1_04.bin"

```

According to https://en.wikichip.org/wiki/intel/uhd_graphics/620 my Graphics Processor is of Gen. 9.5 and therefore a VIDEO_CARDS  i965! I also have that in my /etc/portage/make.conf

```
VIDEO_CARDS="intel i965"

```

I still get the error (followed by a crash of the application):

```
libGL error: MESA-LOADER: failed to open i965 (search paths /usr/lib64/dri)

libGL error: failed to load driver: i965

libGL error: MESA-LOADER: failed to open i965 (search paths /usr/lib64/dri)

libGL error: failed to load driver: i965

libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib64/dri)

libGL error: failed to load driver: swrast

Server On Display :0.0  Has Not Loaded OpenGL Extension

```

when I start a application which needs opengl support.

----------

## molletts

 *chi86 wrote:*   

> I still don't completly understand why i have to use the firmware, based on the VIDEO_CARDS i915
> 
> ```
> /usr/src/linux # cat .config | grep i915
> 
> ...

 

The kernel (DRM) driver is "i915" for all Intel Extreme/HD/UHD Graphics chips (apart from the Poulsbo ones used in some netbooks), even my old i855-based laptop. That provides mode-setting (KMS) support.

The Mesa driver for X is either "intel" (which includes both the "i915" and "i965" DRI backends) or "iris", as I understand it.

"intel" is the mature Mesa Classic driver which I use on both my old i855GME (Gen2, i915 backend) laptop and my "new" GM45 (Gen4.5, i965 backend) one. I believe some of the newest chips may not be supported by this driver but I'm not sure exactly where the cut-off point is. That may be why you get an error when you launch an OpenGL application.

"iris" is the new Gallium driver for recent (Gen8 and newer) chips. I believe it may be the default driver for them from Mesa 20 onwards which suggests that Intel consider it sufficiently mature for general use. It's being actively developed so will improve with time.

It might be worth trying the "iris" driver. It'll be a big build as it will pull in LLVM (unless you've already got it installed). The advantage is that you'll have access to stuff like hardware video decoding via VDPAU and/or VA-API and possibly support for Vulkan.

----------

## chi86

 *molletts wrote:*   

>  *chi86 wrote:*   I still don't completly understand why i have to use the firmware, based on the VIDEO_CARDS i915
> 
> ```
> /usr/src/linux # cat .config | grep i915
> 
> ...

 

I switched to Video_card driver to "iris" and rebuild the needed packages. I also switched to the mesa version 20.*. I still get the same error with the above shown application. Is there another way to test if my opengl works because I already think it may not be my gentoo environment and the issue is with the application.

Nevertheless, I posted the dmseg output:

http://dpaste.com/062JENT

and the Xorg.0.log

http://dpaste.com/0P9DX66

----------

## molletts

 *chi86 wrote:*   

> I switched to Video_card driver to "iris" and rebuild the needed packages. I also switched to the mesa version 20.*. I still get the same error with the above shown application. Is there another way to test if my opengl works because I already think it may not be my gentoo environment and the issue is with the application.
> 
> Nevertheless, I posted the dmseg output:
> 
> http://dpaste.com/062JENT
> ...

 

In the Xorg.0.log file, the i965 DRI backend still seems to be in use - was this before or after you selected the Iris driver? You may also need to switch from the "intel" DDX driver to the generic "modesetting" driver in order to use the "iris" backend.

(I'm kind of clutching at straws because I can't test it, not having access to any hardware that Iris would work on, but the impression I get is that the old DDX drivers with chipset-specific 2D acceleration are being gradually sidelined in favour of just using the modesetting driver and doing all the acceleration via the 3D engine using Glamor for 2D stuff.)

----------

## chi86

 *molletts wrote:*   

> 
> 
> In the Xorg.0.log file, the i965 DRI backend still seems to be in use - was this before or after you selected the Iris driver? You may also need to switch from the "intel" DDX driver to the generic "modesetting" driver in order to use the "iris" backend.
> 
> (I'm kind of clutching at straws because I can't test it, not having access to any hardware that Iris would work on, but the impression I get is that the old DDX drivers with chipset-specific 2D acceleration are being gradually sidelined in favour of just using the modesetting driver and doing all the acceleration via the 3D engine using Glamor for 2D stuff.)

 

Ok I fixed that by adding the following:

```
# more /etc/X11/xorg.conf.d/21-modesetting.conf

Section "Device"

    Identifier  "Intel Graphics"

    Driver      "modesetting"

    Option      "AccelMethod"    "glamor"

    Option      "DRI"            "3"

EndSection

```

Now my Xorg.0.log reads: http://dpaste.com/16SVX68

Yet I get still the same error!

----------

## molletts

 *chi86 wrote:*   

> Ok I fixed that by adding the following:
> 
> ```
> # more /etc/X11/xorg.conf.d/21-modesetting.conf
> 
> ...

 

Hmm, it's certainly using Iris... Maybe see what glxinfo says and if glxgears runs at all (both in x11-apps/mesa-progs)?

I suppose it might be worth seeing what 'eselect opengl list' has to say, if it's present, and perhaps re-selecting the xorg-x11 implementation in case it's somehow got de-selected (it should have a star against it in the list).

----------

## chi86

 *molletts wrote:*   

> 
> 
> Hmm, it's certainly using Iris... Maybe see what glxinfo says and if glxgears runs at all (both in x11-apps/mesa-progs)?
> 
> I suppose it might be worth seeing what 'eselect opengl list' has to say, if it's present, and perhaps re-selecting the xorg-x11 implementation in case it's somehow got de-selected (it should have a star against it in the list).

 

Ok the FPS in the glxgears is rather low ...

```
$ glxgears

Running synchronized to the vertical refresh.  The framerate should be

approximately the same as the monitor refresh rate.

319 frames in 5.0 seconds = 63.776 FPS

301 frames in 5.0 seconds = 60.171 FPS

301 frames in 5.0 seconds = 60.170 FPS

301 frames in 5.0 seconds = 60.171 FPS

XIO:  fatal IO error 62 (Timer expired) on X server ":0.0"

      after 1294 requests (46 known processed) with 0 events remaining.

```

About the eselect opengl :

```
# eselect opengl list

!!! Error: Can't load module opengl

exiting

```

Yet I think the "app-eselect/eselect-opengl" is obsolete:

```
# emerge eselect-opengl

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.

 * Use eselect news read to view new items.

Calculating dependencies... done!

[ebuild  N     ] app-eselect/eselect-opengl-1.3.1-r4 

[blocks B      ] app-eselect/eselect-opengl ("app-eselect/eselect-opengl" is blocking media-libs/mesa-20.0.4, x11-base/xorg-server-1.20.7)

 * Error: The above package list contains packages which cannot be

 * installed at the same time on the same system.

  (app-eselect/eselect-opengl-1.3.1-r4:0/0::gentoo, ebuild scheduled for merge) pulled in by

    eselect-opengl

  (x11-base/xorg-server-1.20.7:0/1.20.7::gentoo, installed) pulled in by

    x11-base/xorg-server required by @selected 

  (media-libs/mesa-20.0.4:0/0::gentoo, installed) pulled in by

    media-libs/mesa required by @selected 

For more information about Blocked Packages, please refer to the following

section of the Gentoo Linux x86 Handbook (architecture is irrelevant):

https://wiki.gentoo.org/wiki/Handbook:X86/Working/Portage#Blocked_packages

```

----------

## molletts

 *chi86 wrote:*   

> Ok the FPS in the glxgears is rather low ...
> 
> ```
> $ glxgears
> 
> ...

 

That'll be because it's synchronised to the display's refresh rate. At one time, just reaching 60fps would have been a sure-fire indication that you were running with working hardware acceleration but these days the CPUs are so fast that a software renderer would manage that easily.

How about glxinfo?

 *chi86 wrote:*   

> About the eselect opengl :
> 
> ```
> # eselect opengl list
> 
> ...

 

Ah, yes, that'll be libglvnd. It's defaulted to on now so eselect-opengl is no longer needed. Perhaps I should see if I can turn it on now - I had to force it off globally because I got loads of blockers when it was first enabled. I don't know whether it imposes a performance penalty by having an extra layer of indirection or anything.

----------

## chi86

 *molletts wrote:*   

> 
> 
> How about glxinfo?

 

http://dpaste.com/0KH0TAQ

Thanks for your dedication!

----------

## molletts

Hm, the glxinfo shows that it's certainly using hardware acceleration. Maybe it's just some compatibility problem with the specific application that you're using, although I'd be surprised on such modern hardware, using an "official" driver (as opposed to, say, Nouveau on an Nvidia card). Have you tried any other OpenGL applications (apart from glxgears, of course!) to see if they work?

----------

## chi86

 *molletts wrote:*   

> Have you tried any other OpenGL applications (apart from glxgears, of course!) to see if they work?

 

I just had the same idea and installed "xonotic" there you can run a benchmark which gave me the following:

```
$ xonotic-glx -benchmark demos/the-big-keybench 2>&1 | egrep -e '[0-9]+ frames'

933 frames 15.5806674 seconds 59.8819023 fps, one-second fps min/avg/max: 56 60 62 (29 seconds)

```

Which I would say indicates a working opengl  ... 

Than it probably is the other application

Thx for you help!

----------

