Nvidia proprietary driver issues HP Pavilion Gaming Laptop

Dear all,
I' m aware there is a lot of existing threads on this so I' ll try to be as complete as possible. I have an HP Pavilion G15-cx0500nd gaming laptop with a Nvidia Gtx1060 using optimus to switch between the two cards. First of, installing Manjaro 18 with GNOME was already quite a nightmare with not being able to boot and later not being able to login. Mhwd would freeze. In the end I got everything working mostly following instructions fromthis post. .

Instead of installing bumblebee however I went for installing video/nvidia-driver and using optimus-switch from @dglt . Switching works fine. There are some glitches however when using the nvidia-driver compared to the intel one.

  • When logging in (after reboot or suspend) there is a freeze of 5-10 seconds where nothing happens and mouse doesn' t move.
  • When logging in after a suspend I get a glitchy background, see pics. I can also see that background already on the lock-screen with the clock on top Screenshot%20from%202019-05-28%2012-20-10 ![Screenshot%20from%202019-06-04%2014-10-12|690x388]
  • For a while, opening images with gthumb would take 5-8 seconds per picture for something only 4000x3000 pixels big. Can not reproduce that one anymore though.
  • When in a game, pressing the volume up action-key on my keyboard makes the game freeze 6-7 seconds for the volume-icon animation to appear on screen, and then the same effect for it to disappear again.
  • I feel the latter happens more often also when not in a game, when for example a notification pop-up appears.

The video-nvidia driver automatically installed the 4.18 nvidia driver. From an earlier ubuntu-install I remembered that the nvidia-390 drivers where the only ones working. I tried therefore switching driver to 390 using the manjaro-settings hardware config. But that completely broke my driver-installation. The resolution would be then stuck to 960xsomething in either nvidia or intel mode. So I restored again with timeshift.
Here some outputs:

inxi -Fxxxz
  Host: moritz-pc Kernel: 4.19.45-1-MANJARO x86_64 bits: 64 compiler: gcc 
  v: 8.3.0 Desktop: Gnome 3.32.2 wm: gnome-shell dm: GDM 3.32.0 
  Distro: Manjaro Linux 
  Type: Laptop System: HP product: HP Pavilion Gaming Laptop 15-cx0xxx 
  v: Type1ProductConfigId serial: <filter> Chassis: type: 10 
  serial: <filter> 
  Mobo: HP model: 8478 v: 70.37 serial: <filter> UEFI: Insyde v: F.09 
  date: 06/27/2018 
  ID-1: BAT1 charge: 43.3 Wh condition: 68.7/70.1 Wh (98%) volts: 15.1/15.4 
  model: Hewlett-Packard PABAS0241231 type: Li-ion serial: <filter> 
  status: Discharging 
  Topology: 6-Core model: Intel Core i7-8750H bits: 64 type: MT MCP 
  arch: Kaby Lake rev: A L2 cache: 9216 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 53004 
  Speed: 800 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 800 2: 800 
  3: 800 4: 800 5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800 
  Device-1: Intel UHD Graphics 630 vendor: Hewlett-Packard driver: i915 
  v: kernel bus ID: 00:02.0 chip ID: 8086:3e9b 
  Device-2: NVIDIA GP106M [GeForce GTX 1060 Mobile] vendor: Hewlett-Packard 
  driver: nvidia v: 418.74 bus ID: 01:00.0 chip ID: 10de:1c20 
  Display: x11 server: X.org 1.20.4 driver: nvidia compositor: gnome-shell 
  resolution: <xdpyinfo missing> 
  OpenGL: renderer: GeForce GTX 1060 with Max-Q Design/PCIe/SSE2 
  v: 4.6.0 NVIDIA 418.74 direct render: Yes 
  Device-1: Intel Cannon Lake PCH cAVS vendor: Hewlett-Packard 
  driver: snd_hda_intel v: kernel bus ID: 00:1f.3 chip ID: 8086:a348 
  Sound Server: ALSA v: k4.19.45-1-MANJARO 
  Device-1: Realtek RTL8822BE 802.11a/b/g/n/ac WiFi adapter 
  vendor: Hewlett-Packard driver: r8822be v: kernel port: 4000 
  bus ID: 02:00.0 chip ID: 10ec:b822 
  IF: wlo1 state: up mac: <filter> 
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Hewlett-Packard driver: r8169 v: kernel port: 3000 bus ID: 05:00.0 
  chip ID: 10ec:8168 
  IF: eno1 state: down mac: <filter> 
  Local Storage: total: 1.14 TiB used: 114.36 GiB (9.8%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLW256HEHP-000H1 
  size: 238.47 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: CXB73H1Q 
  scheme: GPT 
  ID-2: /dev/sda vendor: Seagate model: ST1000LM049-2GH172 size: 931.51 GiB 
  speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> rev: RXM3 scheme: GPT 
  ID-1: / size: 95.68 GiB used: 10.49 GiB (11.0%) fs: ext4 
  dev: /dev/nvme0n1p4 
  ID-2: /home size: 788.43 GiB used: 103.84 GiB (13.2%) fs: ext4 
  dev: /dev/sda1 
  ID-3: swap-1 size: 5.07 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda2 
  System Temperatures: cpu: 52.0 C mobo: 29.8 C gpu: nvidia temp: 53 C 
  Fan Speeds (RPM): N/A 
  Processes: 318 Uptime: 49m Memory: 15.55 GiB used: 3.03 GiB (19.5%) 
  Init: systemd v: 242 Compilers: gcc: 8.3.0 Shell: bash v: 5.0.7 
  running in: gnome-terminal inxi: 3.0.34 

mhwd -li

> Installed PCI configs:
                  NAME               VERSION          FREEDRIVER           TYPE
          video-nvidia            2018.08.09               false            PCI

Warning: No installed USB configs!
ls -laR /etc/X11
total 32
drwxr-xr-x   5 root root 4096 12 mrt 11:18 .
drwxr-xr-x 100 root root 4096  4 jun  2019 ..
drwxr-xr-x   2 root root 4096  1 jun 15:57 mhwd.d
drwxr-xr-x   3 root root 4096 12 mrt 11:19 xinit
drwxr-xr-x   2 root root 4096  1 jun 15:57 xorg.conf.d

total 16
drwxr-xr-x 2 root root 4096  1 jun 15:57 .
drwxr-xr-x 5 root root 4096 12 mrt 11:18 ..
-rw-r--r-- 1 root root 1617  1 jun 15:57 99-nvidia.conf

total 28
drwxr-xr-x 3 root root 4096 12 mrt 11:19 .
drwxr-xr-x 5 root root 4096 12 mrt 11:18 ..
-rw-r--r-- 1 root root  739  4 mrt 19:31 xinitrc
drwxr-xr-x 2 root root 4096 26 mei 23:52 xinitrc.d
-rw-r--r-- 1 root root   45  4 mrt 19:31 xserverrc

total 20
drwxr-xr-x 2 root root 4096 26 mei 23:52 .
drwxr-xr-x 3 root root 4096 12 mrt 11:19 ..
-rwxr-xr-x 1 root root  318  9 nov  2018 40-libcanberra-gtk-module.sh
-rwxr-xr-x 1 root root  203 11 mei 13:13 50-systemd-user.sh

total 20
drwxr-xr-x 2 root root 4096  1 jun 15:57 .
drwxr-xr-x 5 root root 4096 12 mrt 11:18 ..
-rw-r--r-- 1 root root  266 26 mei 23:31 00-keyboard.conf
-rw-r--r-- 1 root root  268  1 jun 15:57 99-nvidia.conf

cat /etc/X11/xorg.conf.d/*.conf
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
        Option "XkbModel" "pc105"
#adjust BusID to match your nvidia GPU

Section "Module"
    Load "modesetting"

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "AllowEmptyInitialConfiguration"

cat /etc/default/grub | grep CMDLINE
GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=a5fbc9e4-be2c-403e-9793-09e6acb8d4d1 nouveau.modeset=0 acpi_os=Linux"

Thanks for any help!

1 Like

wow, someone who actually thinks ahead. :+1:

first, before any of this you should disable any/all gnome extensions. if problem goes away, turn each back on 1 at a time until it breaks
again and you know which extension is causing it. do this first as a rule when something in gnome goes south.

gnome uses mutter as a compositor which doesnt allow for much configuration and it's known for having issues with nvidia. like stuttering or corruption like in the screenshot you posted and usually happens after waking from suspend. there is a mutter workaround for nvidia gpu's in the AUR. if it fails to install there is a line or two in the PKGBUILD that needs to be commented out. read the comments here for instruction if it fails to install.
use whichever AUR helper your familiar with, yay for example:
yay -S mutter-781835-workaround

this might be taken care of with the same mutter workaround and/or the following acpi parameters, fix the graphical issue first and if it remains you can try different keyboard/wmi module options.

after you install the mutter workaround, or even if you dont, edit mkinitcpio.conf MODULES= line to match this:
sudo nano /etc/mkinitcpio.conf

MODULES="intel_agp i915"

sudo mkinitcpio -P
if the MODULES= line has other modules listed, please post which ones.

couple things, the nouveau.modeset=0 should not be needed since nouveau is blacklisted when using nvidia mode. also the acpi_os=Linux should be acpi_osi=Linux or it will be ignored, just missing the " i ".

edit grub, starting with the first example below, 1 at a time. done forget to update-grub and reboot after each change.
sudo nano /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=! acpi_osi=Linux resume=UUID=a5fbc9e4-be2c-403e-9793-09e6acb8d4d1"

GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=! acpi_osi="Windows 2009" resume=UUID=a5fbc9e4-be2c-403e-9793-09e6acb8d4d1"

GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=! acpi_osi="Windows 2013" resume=UUID=a5fbc9e4-be2c-403e-9793-09e6acb8d4d1"

GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=! acpi_osi="Windows 2015" resume=UUID=a5fbc9e4-be2c-403e-9793-09e6acb8d4d1"

try them 1 at a time, and make sure you update-grub after each change
sudo update-grub

i would also edit the default xorg configuration optimus-switch uses.
sudo nano /etc/switch/nvidia/nvidia-xorg.conf
edit to match:

#adjust BusID to match your nvidia GPU

Section "Module"
    Load "modesetting"

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "AllowEmptyInitialConfiguration"
   # Option "DPI"  "96 x 96"
   #  Option "SWCursor"  "true"

Section "Extensions"
    Option         "Composite" "Enable"

sudo set-nvidia.sh

it all sounds like a lot, optimus-switch in nvidia mode is setup identical to PRIME and it has no hidden mysterious magical things going on in the background that would cause this.

the order of which changes to make first, i would suggest

  1. disable any/all gnome extentions, always do this first when something breaks in gnome.
  2. edit grub syntax error and use the first parameter on the list, dont forget to update-grub after.
  3. install mutter workaround
  4. mkinitcpio.conf edits
  5. nvidia-xorg.conf edits
  6. try other kernels
    sudo mhwd-kernel -i linux50

@emji another user confirmed that the mutter workaround now should install without needing edits to pkgbuild. just thought i would mention it.

1 Like

@dglt thanks for your extensive replies and help. I probably need to check when I have a free day to try all of it, will report back when I do.

1 Like

Hey @dglt,
I tried all of your steps. Unfortunately without significant improvement.

  • disable any/all gnome extentions, always do this first when something breaks in gnome.

Couldn' t see any improvements from that. Disabled them all, system basically runs on equal speed.

edit grub syntax error and use the first parameter on the list, dont forget to update-grub after.

Tried them all. Took a bit longer as it turns out that it has to be Windows 20xx instead of "Windows 20xx" (no quotes). I felt there was a slight boost from using Windows 2015. It does show me some acpi errors at startup though, which generally takes a bit longer. Also the same behaviour of occasional freezes is still present.

Installation wasn' t flawless due to two errors. Had to comment out two performance patches that could not be installed thus. One of them being related to window dragging, which sometimes makes my system slow down/freeze. Generally couldn' t notice any difference from it.
Seems though that they updated it 2 days ago, so gonna retry.

Did that, didn' t notice any change. Could you elaborate more on what this does? I googled a bit but only found out that it is related to the intel card.

Noticed no difference

I switched to the quoted linux-kernel. My system runs a bit smoother since then. The behavior I was referring to earlier still occurs though. Yesterday I was watching a video on vlc and had the mouse freeze on me 5 seconds each time I would skip to another piece on the timeline.

Gonna look into other graphics driver options, eventually installing nvidia-390. Again thanks for the support and if you have more directions I'm happy to hear so.

doing this, the parameter is just ignored. you need the quotes otherwise the parameter is seen as 2 separate and also invalid parameters. acpi_osi=Windows and 20xx , invalid parameters are ignored so they change nothing.

your welcome, if you have a gnome manjaro usb, boot it and see if this behavior happens on the live environment

If I put it in quotes I get an error from update-grub saying /etc/default/grub: line 5: 2015 resume=UUID=a5fbc9e4-be2c-403e-9793-09e6acb8d4d1: command not found . So it sounds like precisely that effect is happening if put in quotes?

then use ' instead of " for the parameter

GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=! acpi_osi='Windows 2015' resume=UUID=a5fbc9e4-be2c-403e-9793-09e6acb8d4d1"

post your current grub config
cat /etc/default/grub | grep CMDLINE

something is formatted incorrectly to be getting this error

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by