New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laptop freezes when starting X11 and discrete graphics are OFF #764

Open
jgkamat opened this Issue May 6, 2016 · 295 comments

Comments

Projects
None yet
@jgkamat

jgkamat commented May 6, 2016

[edit by @Lekensteyn]
This issue affects newer laptops (from about 2015-2016) with Skylake and GTX 9xxM/10xx cards/
A workaround exists for some laptops, see #764 (comment)
[/edit]


I'm having a weird issue, and I'm not sure what kind of debug information is neccesary, but let me know what to give and I'll supply anything you need.

When I start my graphics (lxdm), I get a freeze (keyboard stops working, no response on monitor at all, even log files stop working), but I can work around this by enabling the graphics card before starting graphics.

System (installed with bumblebee-nvidia in debian testing repos):

Debian Testing
GTX 965M
Nvidia Proprietary Driver: 352.79 
Laptop: SAGER NP7258

Optirun --version:

optirun (Bumblebee) 3.2.1
Copyright (C) 2011 The Bumblebee Project
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

My laptop seems to not work without optimus, the intel drivers work fine, but trying to run w/o the intel drivers (nvidia only) seems to result in a frozen screen. Using the workaround works perfectly for me, however.

Steps to Reproduce:

  1. systemctl start bumblebeed
  2. systemctl start lxdm
  3. Freeze occurs

Workaround:

  1. systemctl start bumblebeed
  2. echo "ON" >/proc/acpi/bbswitch
  3. systemctl start lxdm

Unfortunately, any X11 log files don't seem to survive after my system freezes (they show everything completed successfully, probably from the previous successfull boot). If you know any way of retreiving them I'd be happy to supply them though! (When the system freezes, even my shell history file gets corrupted).

I did have to make some changes to my config files to get things to work in my situation though, I'll post anything I remember changing below. Let me know if you need any more information, I am happy to supply it! Without bumblebee, my laptop would be unusuable 👍

bumblebee.conf

# Configuration file for Bumblebee. Values should **not** be put between quotes

## Server options. Any change made in this section will need a server restart
# to take effect.
[bumblebeed]
# The secondary Xorg server DISPLAY number
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=false
# The name of the Bumbleblee server group name (GID name)
ServerGroup=bumblebee
# Card power state at exit. Set to false if the card shoud be ON when Bumblebee
# server exits.
TurnCardOffAtExit=false
# The default behavior of '-f' option on optirun. If set to "true", '-f' will
# be ignored.
NoEcoModeOverride=false
# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=nvidia
# Directory with a dummy config file to pass as a -configdir to secondary X
XorgConfDir=/etc/bumblebee/xorg.conf.d

## Client options. Will take effect on the next optirun executed.
[optirun]
# Acceleration/ rendering bridge, possible values are auto, virtualgl and
# primus.
Bridge=auto
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy
# List of paths which are searched for the primus libGL.so.1 when using
# the primus bridge
PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus:/usr/lib/primus:/usr/lib32/primus
# Should the program run under optirun even if Bumblebee server or nvidia card
# is not available?
AllowFallbackToIGC=false


# Driver-specific settings are grouped under [driver-NAME]. The sections are
# parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
# detection resolves to NAME).
# PMMethod: method to use for saving power by disabling the nvidia card, valid
# values are: auto - automatically detect which PM method to use
#         bbswitch - new in BB 3, recommended if available
#       switcheroo - vga_switcheroo method, use at your own risk
#             none - disable PM completely
# https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods

## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia-current
PMMethod=bbswitch
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/nvidia
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

## Section with nouveau driver specific options, only parsed if Driver=nouveau
[driver-nouveau]
KernelDriver=nouveau
PMMethod=auto
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau

xorg.conf.nvidia

Section "ServerLayout"
Identifier  "Layout0"
Option      "AutoAddDevices" "false"
Option      "AutoAddGPU" "false"
EndSection

Section "Device"
Identifier  "DiscreteNvidiaj"
Driver      "nvidia"
VendorName  "NVIDIA Corporation"

#   If the X server does not automatically detect your VGA device,
#   you can manually set it here.
#   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
#   as you see in the commented example.
#   This Setting may be needed in some platforms with more than one
#   nvidia card, which may confuse the proprietary driver (e.g.,
#   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
BusID "PCI:01:00:0"

#   Setting ProbeAllGpus to false prevents the new proprietary driver
#   instance spawned to try to control the integrated graphics card,
#   which is already being managed outside bumblebee.
#   This option doesn't hurt and it is required on platforms running
#   more than one nvidia graphics card with the proprietary driver.
#   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
#   If this option is not set, the new Xorg may blacken the screen and
#   render it unusable (unless you have some way to run killall Xorg).
Option "ProbeAllGpus" "false"

Option "NoLogo" "true"
Option "UseEDID" "false"
Option "UseDisplayDevice" "none"
EndSection

# Section "Screen"
#     Identifier "Default Screen"
#   Device "DiscreteNvidia"
# EndSection

@bluca

This comment has been minimized.

Show comment
Hide comment
@bluca

bluca May 6, 2016

Member

If you run:

sudo update-glx --config glx

What is the selected config? It should be /usr/lib/nvidia/bumblebee.

Does the same problem happen if you choose /usr/lib/mesa-diverted instead?

Finally, do you have another DE to try (Gnome would be best) to help narrow it down?

Member

bluca commented May 6, 2016

If you run:

sudo update-glx --config glx

What is the selected config? It should be /usr/lib/nvidia/bumblebee.

Does the same problem happen if you choose /usr/lib/mesa-diverted instead?

Finally, do you have another DE to try (Gnome would be best) to help narrow it down?

@jgkamat

This comment has been minimized.

Show comment
Hide comment
@jgkamat

jgkamat May 6, 2016

I've been using /usr/lib/nvidia/bumblebee so far, I tried out mesa-diverted and I have the same result. I've tried this with starting lxdm, manually runing startx to start xfce, and sddm (kde), and all have the same behavior. If you think gdm would help I'll try that out but I would rather not install all of gnome.

jgkamat commented May 6, 2016

I've been using /usr/lib/nvidia/bumblebee so far, I tried out mesa-diverted and I have the same result. I've tried this with starting lxdm, manually runing startx to start xfce, and sddm (kde), and all have the same behavior. If you think gdm would help I'll try that out but I would rather not install all of gnome.

@bluca

This comment has been minimized.

Show comment
Hide comment
@bluca

bluca May 6, 2016

Member

/usr/lib/nvidia/bumblebee is the right one (default) when having bumblebee, I wanted to see if removing all traces of nvidia from the path helped.

It is really strange that X is affected by bumblebee when not running through it. Can you get to another TTY when the screen is frozen?

Don't bother with GDM for now if it's a hassle, was just trying to narrow it down. I'll install xfce on my sid partition and see what happens.

Member

bluca commented May 6, 2016

/usr/lib/nvidia/bumblebee is the right one (default) when having bumblebee, I wanted to see if removing all traces of nvidia from the path helped.

It is really strange that X is affected by bumblebee when not running through it. Can you get to another TTY when the screen is frozen?

Don't bother with GDM for now if it's a hassle, was just trying to narrow it down. I'll install xfce on my sid partition and see what happens.

@jgkamat

This comment has been minimized.

Show comment
Hide comment
@jgkamat

jgkamat May 6, 2016

I think this is an issue specific to my hardware setup (as descrete graphics cannot be forced on, optimus must be used). When I say 'the screen is frozen', the TTY I am in (I'm manually starting a display manager) stops responding (the cursor stops blinking). I can't switch to another TTY. Even the keyboard caps lock/numlock lights no longer change when I press them, and the SysReq keys no longer work either. The system has to be force powered off.

jgkamat commented May 6, 2016

I think this is an issue specific to my hardware setup (as descrete graphics cannot be forced on, optimus must be used). When I say 'the screen is frozen', the TTY I am in (I'm manually starting a display manager) stops responding (the cursor stops blinking). I can't switch to another TTY. Even the keyboard caps lock/numlock lights no longer change when I press them, and the SysReq keys no longer work either. The system has to be force powered off.

@jgkamat

This comment has been minimized.

Show comment
Hide comment
@jgkamat

jgkamat May 6, 2016

I just double checked, but ssh sessions freeze too when this occurs.

jgkamat commented May 6, 2016

I just double checked, but ssh sessions freeze too when this occurs.

@bluca

This comment has been minimized.

Show comment
Hide comment
@bluca

bluca May 6, 2016

Member

A kernel hard-lock then, that's a pain. Have you tried nouveau?

Member

bluca commented May 6, 2016

A kernel hard-lock then, that's a pain. Have you tried nouveau?

@karolherbst

This comment has been minimized.

Show comment
Hide comment
@karolherbst

karolherbst May 6, 2016

maybe nouveau is already loaded and causes tha hang because something doesn't work and Xorg freezes due to messed up modesetting DDX?

karolherbst commented May 6, 2016

maybe nouveau is already loaded and causes tha hang because something doesn't work and Xorg freezes due to messed up modesetting DDX?

@bluca

This comment has been minimized.

Show comment
Hide comment
@bluca

bluca May 6, 2016

Member

With the bumblebee-nvidia package nouveau is blacklisted, so it can't be loaded.

Member

bluca commented May 6, 2016

With the bumblebee-nvidia package nouveau is blacklisted, so it can't be loaded.

@karolherbst

This comment has been minimized.

Show comment
Hide comment
@karolherbst

karolherbst May 7, 2016

and I hope nvidia is also blacklisted, but Xorg freezes and that usually happens for a bad reason.

My guess is: X loads the nvidia DDX, which autoloads the nvidia kernel driver.

karolherbst commented May 7, 2016

and I hope nvidia is also blacklisted, but Xorg freezes and that usually happens for a bad reason.

My guess is: X loads the nvidia DDX, which autoloads the nvidia kernel driver.

@bluca

This comment has been minimized.

Show comment
Hide comment
@bluca

bluca May 7, 2016

Member

Yes, all the kernel modules are blacklisted. And the nvidia libraries are out of the path (hence my question earlier about update-alternatives).

Member

bluca commented May 7, 2016

Yes, all the kernel modules are blacklisted. And the nvidia libraries are out of the path (hence my question earlier about update-alternatives).

@karolherbst

This comment has been minimized.

Show comment
Hide comment
@karolherbst

karolherbst May 7, 2016

I dealt with so many users where something was messed up, that I wouldn't rely on anything here. And that nvidia gets loaded also explains why turning the GPU off helps.

In fact for that the nvidia libraries doesn'T need to be in the Path, because the nvidia ddx already is enough and for that different paths are used.

Anyhow, without logs it will be painfull to debug this.

karolherbst commented May 7, 2016

I dealt with so many users where something was messed up, that I wouldn't rely on anything here. And that nvidia gets loaded also explains why turning the GPU off helps.

In fact for that the nvidia libraries doesn'T need to be in the Path, because the nvidia ddx already is enough and for that different paths are used.

Anyhow, without logs it will be painfull to debug this.

@jgkamat

This comment has been minimized.

Show comment
Hide comment
@jgkamat

jgkamat May 7, 2016

I've tried w/ nouveau and I still see the same issue (but with the workaround (which worked under nouveau) I started to see some weird behavior like some CPU cores sticking at 100%). Also when running optirun I got some permission denied errors with nouveau. I'm not sure if this will help though.

Just to clarify, simply turning the discrete video card ON with bbswitch before starting X11 fixes my issue (but it is a hassle to deal with every time). I'm not sure if there are any ways for me to get logs with this situation, but if there are let me know. When I run startx, the screen freezes before any errors come up, so I'm not sure if there is much I can do.

bumblebee blacklists all the nvidia/nouveau modules by default, and I have nvidia set under the bumblebee.conf, so I think nouvau isn't conflicting? If there is any way to test this I would be happy to do so!

jgkamat commented May 7, 2016

I've tried w/ nouveau and I still see the same issue (but with the workaround (which worked under nouveau) I started to see some weird behavior like some CPU cores sticking at 100%). Also when running optirun I got some permission denied errors with nouveau. I'm not sure if this will help though.

Just to clarify, simply turning the discrete video card ON with bbswitch before starting X11 fixes my issue (but it is a hassle to deal with every time). I'm not sure if there are any ways for me to get logs with this situation, but if there are let me know. When I run startx, the screen freezes before any errors come up, so I'm not sure if there is much I can do.

bumblebee blacklists all the nvidia/nouveau modules by default, and I have nvidia set under the bumblebee.conf, so I think nouvau isn't conflicting? If there is any way to test this I would be happy to do so!

@karolherbst

This comment has been minimized.

Show comment
Hide comment
@karolherbst

karolherbst May 7, 2016

well you don't use bumblee with nouveau, and that support should be removed in bumblebee

karolherbst commented May 7, 2016

well you don't use bumblee with nouveau, and that support should be removed in bumblebee

@karolherbst

This comment has been minimized.

Show comment
Hide comment
@karolherbst

karolherbst May 7, 2016

@jgkamat what really would help would be the dmesg output. Maybe you can do "dmesg -w" through ssh while you start X and see if you get enough useful output this way.

karolherbst commented May 7, 2016

@jgkamat what really would help would be the dmesg output. Maybe you can do "dmesg -w" through ssh while you start X and see if you get enough useful output this way.

@bluca

This comment has been minimized.

Show comment
Hide comment
@bluca

bluca May 7, 2016

Member

If dmesg can write it, so will journalctl. If you haven't, enable persistent journal (create /var/log/journal) and then after the freeze reboot and check the previous boot journal with journalctl -b -1

Member

bluca commented May 7, 2016

If dmesg can write it, so will journalctl. If you haven't, enable persistent journal (create /var/log/journal) and then after the freeze reboot and check the previous boot journal with journalctl -b -1

@karolherbst

This comment has been minimized.

Show comment
Hide comment
@karolherbst

karolherbst May 7, 2016

@bluca His machine crashes completly. And on a crash usually error logs can't be written anymore, because the kernel stoped doing anything. Dmesg -w could help us because it immediatly displays messages (even before they get written to disc), but if the network dies too fast, he wouldn't either get this and need to setup netconsole, allthough this also requires a working network.

@jgkamat maybe you have something inside pstore (/sys/fs/pstore)

check here for pstore information:

https://lwn.net/Articles/434821/
https://www.kernel.org/doc/Documentation/ABI/testing/pstore
https://www.kernel.org/doc/Documentation/ramoops.txt

karolherbst commented May 7, 2016

@bluca His machine crashes completly. And on a crash usually error logs can't be written anymore, because the kernel stoped doing anything. Dmesg -w could help us because it immediatly displays messages (even before they get written to disc), but if the network dies too fast, he wouldn't either get this and need to setup netconsole, allthough this also requires a working network.

@jgkamat maybe you have something inside pstore (/sys/fs/pstore)

check here for pstore information:

https://lwn.net/Articles/434821/
https://www.kernel.org/doc/Documentation/ABI/testing/pstore
https://www.kernel.org/doc/Documentation/ramoops.txt

@jgkamat

This comment has been minimized.

Show comment
Hide comment
@jgkamat

jgkamat May 7, 2016

I tried setting up a netconsole (and dmesg -w over ssh) and that dosen't seem to give me any logs either before the freeze. I don't have anything currently inside pstore as far as I can tell. I'm starting to think that this is some sort of race condition where bumblebee tries to turn on the nvidia driver before X starts, but X manages to start before the nvidia card comes online, leading to a lockout (or maybe my hardware can't deal with xorg starting without the nvidia card being on). (running modprobe nvidia before X also makes X start properly, as it also forces the nvidia card on).

jgkamat commented May 7, 2016

I tried setting up a netconsole (and dmesg -w over ssh) and that dosen't seem to give me any logs either before the freeze. I don't have anything currently inside pstore as far as I can tell. I'm starting to think that this is some sort of race condition where bumblebee tries to turn on the nvidia driver before X starts, but X manages to start before the nvidia card comes online, leading to a lockout (or maybe my hardware can't deal with xorg starting without the nvidia card being on). (running modprobe nvidia before X also makes X start properly, as it also forces the nvidia card on).

@karolherbst

This comment has been minimized.

Show comment
Hide comment
@karolherbst

karolherbst May 7, 2016

@jgkamat could you add a xorg.conf file in /etc/X11 with this content and start X while the gpu is off? https://gist.github.com/karolherbst/1f1bdd1a3822df74097f

and check if your nvidia card also has the 01:00.0 address in lspci. If this works, that means something is loaded which makes your kernel unhappy.

karolherbst commented May 7, 2016

@jgkamat could you add a xorg.conf file in /etc/X11 with this content and start X while the gpu is off? https://gist.github.com/karolherbst/1f1bdd1a3822df74097f

and check if your nvidia card also has the 01:00.0 address in lspci. If this works, that means something is loaded which makes your kernel unhappy.

@jgkamat

This comment has been minimized.

Show comment
Hide comment
@jgkamat

jgkamat May 7, 2016

Unfortunately, I'm still seeing the same issue with this config. Just to be sure, I created a new xorg.conf file (as the docs say that none should be present) with that config. My Nvidia card is on that bus. Here's the ouptut of lspci. if that helps:

00:00.0 Host bridge: Intel Corporation Sky Lake Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Sky Lake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Skylake Integrated Graphics (rev 06)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA Controller [AHCI mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #3 (rev f1)
00:1c.3 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #4 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
01:00.0 VGA compatible controller: NVIDIA Corporation GM206M [GeForce GTX 965M] (rev a1)
02:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5287 (rev 01)
03:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)

Should that file have gone in /etc/bumblebee/xorg.conf.d instead?

jgkamat commented May 7, 2016

Unfortunately, I'm still seeing the same issue with this config. Just to be sure, I created a new xorg.conf file (as the docs say that none should be present) with that config. My Nvidia card is on that bus. Here's the ouptut of lspci. if that helps:

00:00.0 Host bridge: Intel Corporation Sky Lake Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Sky Lake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Skylake Integrated Graphics (rev 06)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA Controller [AHCI mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #3 (rev f1)
00:1c.3 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #4 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
01:00.0 VGA compatible controller: NVIDIA Corporation GM206M [GeForce GTX 965M] (rev a1)
02:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5287 (rev 01)
03:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)

Should that file have gone in /etc/bumblebee/xorg.conf.d instead?

@Lekensteyn

This comment has been minimized.

Show comment
Hide comment
@Lekensteyn

Lekensteyn May 11, 2016

Member

I have a Clevo P650RA/P651RA (and also access to a Clevo P670RA/P671RA) which both have GTX 965M cards as well. This issue could be related to Bumblebee-Project/bbswitch#115

In my case an infinite loop would occur in ACPI. See Bumblebee-Project/bbswitch#115 (comment) for more details if you are interested.

Member

Lekensteyn commented May 11, 2016

I have a Clevo P650RA/P651RA (and also access to a Clevo P670RA/P671RA) which both have GTX 965M cards as well. This issue could be related to Bumblebee-Project/bbswitch#115

In my case an infinite loop would occur in ACPI. See Bumblebee-Project/bbswitch#115 (comment) for more details if you are interested.

@jgkamat

This comment has been minimized.

Show comment
Hide comment
@jgkamat

jgkamat May 11, 2016

I'm not seeing any issues with suspend to the best of my knowlege (the video card is off before/after a sleep, according to bbswitch, and that works fine for me). These issues could be related though.

I'm honestly pretty stoked at how well this performs (with this workaround in place). but I'm worried that a slight change could break it more. I'm happy to provide any more information if that would help!

EDIT: My laptop is a CLEVO N155RF (sager just rebrands them?)

jgkamat commented May 11, 2016

I'm not seeing any issues with suspend to the best of my knowlege (the video card is off before/after a sleep, according to bbswitch, and that works fine for me). These issues could be related though.

I'm honestly pretty stoked at how well this performs (with this workaround in place). but I'm worried that a slight change could break it more. I'm happy to provide any more information if that would help!

EDIT: My laptop is a CLEVO N155RF (sager just rebrands them?)

@jkehler

This comment has been minimized.

Show comment
Hide comment
@jkehler

jkehler May 20, 2016

I've been having the exact same issue with my MSI GE62. If i start X11 with the 960M turned off it will do a hard lock. But if i turn it on first then start X11 it works fine.

I should also note that with Gnome GDM will start fine with the 960M turned off. But once I enter my password to log in to Gnome then it will do a hard lock. I presume this is because GDM is using Wayland?

jkehler commented May 20, 2016

I've been having the exact same issue with my MSI GE62. If i start X11 with the 960M turned off it will do a hard lock. But if i turn it on first then start X11 it works fine.

I should also note that with Gnome GDM will start fine with the 960M turned off. But once I enter my password to log in to Gnome then it will do a hard lock. I presume this is because GDM is using Wayland?

@Warpgamer

This comment has been minimized.

Show comment
Hide comment
@Warpgamer

Warpgamer May 20, 2016

@jkehler : I'm having the exact same behavior with the same model, except I have a 970M
Created a script that executes after GDM login that starts bumblebee. However, when manually stopping bumblebee service, half of the time it'll totally freeze the system, like it does when GDM attempts to login with discrete card off.

Warpgamer commented May 20, 2016

@jkehler : I'm having the exact same behavior with the same model, except I have a 970M
Created a script that executes after GDM login that starts bumblebee. However, when manually stopping bumblebee service, half of the time it'll totally freeze the system, like it does when GDM attempts to login with discrete card off.

@jkehler

This comment has been minimized.

Show comment
Hide comment
@jkehler

jkehler May 20, 2016

Actually I had just realized I had never actually tried starting Gnome with Wayland instead of X11 to see if it hard freezes. I just tried it now and when using Wayland it worked fine with the 960M turned off. So it definitely appears to just be an issue with X11.

jkehler commented May 20, 2016

Actually I had just realized I had never actually tried starting Gnome with Wayland instead of X11 to see if it hard freezes. I just tried it now and when using Wayland it worked fine with the 960M turned off. So it definitely appears to just be an issue with X11.

@jgkamat

This comment has been minimized.

Show comment
Hide comment
@jgkamat

jgkamat May 20, 2016

I've had a couple random freezes too. Most of the time, they are triggered by some 'low level' operations, or things involving the graphics card (eg: starting steam, modprobes, even lspci once). This is usually accompanied by some audio garbling for some reason (before hard faulting). If I enable the descrete graphics card via bbswitch then I never have this issue, however.

This is my xorg version, if that helps. I've never tried out wayland, and I don't have the time to test this right now, but If I ever do, I'll post an update here. Isn't wayland supposed to illiminate the need for bumblebee? I'm still fuzzy on that topic though...

X.Org X Server 1.18.3
Release Date: 2016-04-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian
Current Operating System: Linux laythe 4.5.0-2-amd64 #1 SMP Debian 4.5.3-2 (2016-05-08) x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.5.0-2-amd64 root=UUID=50a03efa-01f3-4e94-92a9-d4ad458845f0 ro acpi_enforce_resources=lax
Build Date: 05 April 2016  07:00:43AM
xorg-server 2:1.18.3-1 (http://www.debian.org/support) 
Current version of pixman: 0.33.6
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.

jgkamat commented May 20, 2016

I've had a couple random freezes too. Most of the time, they are triggered by some 'low level' operations, or things involving the graphics card (eg: starting steam, modprobes, even lspci once). This is usually accompanied by some audio garbling for some reason (before hard faulting). If I enable the descrete graphics card via bbswitch then I never have this issue, however.

This is my xorg version, if that helps. I've never tried out wayland, and I don't have the time to test this right now, but If I ever do, I'll post an update here. Isn't wayland supposed to illiminate the need for bumblebee? I'm still fuzzy on that topic though...

X.Org X Server 1.18.3
Release Date: 2016-04-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.16.0-4-amd64 x86_64 Debian
Current Operating System: Linux laythe 4.5.0-2-amd64 #1 SMP Debian 4.5.3-2 (2016-05-08) x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.5.0-2-amd64 root=UUID=50a03efa-01f3-4e94-92a9-d4ad458845f0 ro acpi_enforce_resources=lax
Build Date: 05 April 2016  07:00:43AM
xorg-server 2:1.18.3-1 (http://www.debian.org/support) 
Current version of pixman: 0.33.6
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
@Lekensteyn

This comment has been minimized.

Show comment
Hide comment
@Lekensteyn

Lekensteyn May 20, 2016

Member

I think X is not much of an issue, but a trigger.

Can you switch to a TTY (Ctrl-Alt-F2), log in and try to power off/on the card manually using bbswitch? Repeat this twice to see if it makes a difference.

sudo tee /proc/acpi/bbswitch <<<OFF
sudo tee /proc/acpi/bbswitch <<<ON
sudo tee /proc/acpi/bbswitch <<<OFF
sudo tee /proc/acpi/bbswitch <<<ON

If that still does not hang, try this (exact output does not matter, only whether it hangs or not):

sudo lspci -vvvs 00:01:0
sudo lspci -vvvs 01:00:0

My guess is that trying to access some PCI configuration registers too fast results in failure. Why exactly this happens is something I have been trying for a week to figure out on a Clevo P651RA/GTX965M. Current key words: PCIe link training failure.

Member

Lekensteyn commented May 20, 2016

I think X is not much of an issue, but a trigger.

Can you switch to a TTY (Ctrl-Alt-F2), log in and try to power off/on the card manually using bbswitch? Repeat this twice to see if it makes a difference.

sudo tee /proc/acpi/bbswitch <<<OFF
sudo tee /proc/acpi/bbswitch <<<ON
sudo tee /proc/acpi/bbswitch <<<OFF
sudo tee /proc/acpi/bbswitch <<<ON

If that still does not hang, try this (exact output does not matter, only whether it hangs or not):

sudo lspci -vvvs 00:01:0
sudo lspci -vvvs 01:00:0

My guess is that trying to access some PCI configuration registers too fast results in failure. Why exactly this happens is something I have been trying for a week to figure out on a Clevo P651RA/GTX965M. Current key words: PCIe link training failure.

@Warpgamer

This comment has been minimized.

Show comment
Hide comment
@Warpgamer

Warpgamer May 20, 2016

Hello @Lekensteyn
switching gpus manually causes no issue.
Both commands below do not hang either, though second one produces no output at all.

However, I've found that if I disable discrete card at boot with bbswitch, the system won't properly boot; on loading gnome, in freezes; visual artifacts in the console may appear at freeze instant, and nothing but power button answers. All this while being on the integrated intel card.

Warp

Warpgamer commented May 20, 2016

Hello @Lekensteyn
switching gpus manually causes no issue.
Both commands below do not hang either, though second one produces no output at all.

However, I've found that if I disable discrete card at boot with bbswitch, the system won't properly boot; on loading gnome, in freezes; visual artifacts in the console may appear at freeze instant, and nothing but power button answers. All this while being on the integrated intel card.

Warp

@jkehler

This comment has been minimized.

Show comment
Hide comment
@jkehler

jkehler Jun 11, 2016

@Lekensteyn I finally got around to trying what you had suggested above. Switching to a TTY and repeatedly turning the GPU on and off did not result in any sort of hard lock for me.

But when I ran your second set of commands the first one outputted the following.

01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev ff) (prog-if ff)
    !!! Unknown header type 7f
    Kernel modules: nouveau, nvidia_drm, nvidia

The 2nd command didn't output anything. But then I ran the first command a 2nd time and it resulted in a hard-lock for me.

jkehler commented Jun 11, 2016

@Lekensteyn I finally got around to trying what you had suggested above. Switching to a TTY and repeatedly turning the GPU on and off did not result in any sort of hard lock for me.

But when I ran your second set of commands the first one outputted the following.

01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev ff) (prog-if ff)
    !!! Unknown header type 7f
    Kernel modules: nouveau, nvidia_drm, nvidia

The 2nd command didn't output anything. But then I ran the first command a 2nd time and it resulted in a hard-lock for me.

@denijane

This comment has been minimized.

Show comment
Hide comment
@denijane

denijane Jun 3, 2018

@livnilth
Nope, still no touchpad. Is your touchpad Elantech 1200? If it is, then maybe the kernel Sabayon and Gentoo have compiled might be lacking something with respect to acpi. I'm so sick of this. I miss my touchpad.
But, thanks for writing. I'll keep you kernel options and just update kernels until something works.

denijane commented Jun 3, 2018

@livnilth
Nope, still no touchpad. Is your touchpad Elantech 1200? If it is, then maybe the kernel Sabayon and Gentoo have compiled might be lacking something with respect to acpi. I'm so sick of this. I miss my touchpad.
But, thanks for writing. I'll keep you kernel options and just update kernels until something works.

@livnilth

This comment has been minimized.

Show comment
Hide comment
@livnilth

livnilth Jun 4, 2018

@denijane mine is synaptic ,maybe you should search Elantech i8042 or something else with i8042 yourself

livnilth commented Jun 4, 2018

@denijane mine is synaptic ,maybe you should search Elantech i8042 or something else with i8042 yourself

@curlywu

This comment has been minimized.

Show comment
Hide comment
@curlywu

curlywu Jun 7, 2018

Hi maybe as hint ... until Kernel Version 4.8.0.58 I was able to use current kernels without a problem.
For later kernels I have to use the workaround mentioned in a previous post (Razer Blade 14" (2016) (i7-6700HQ/GTX 970M) (BIOS 5.11, 04/07/2016). Workaround: acpi_osi=! acpi_osi="Windows 2009")

Hope this helps fixing the problem.
Thanks in advance

curlywu commented Jun 7, 2018

Hi maybe as hint ... until Kernel Version 4.8.0.58 I was able to use current kernels without a problem.
For later kernels I have to use the workaround mentioned in a previous post (Razer Blade 14" (2016) (i7-6700HQ/GTX 970M) (BIOS 5.11, 04/07/2016). Workaround: acpi_osi=! acpi_osi="Windows 2009")

Hope this helps fixing the problem.
Thanks in advance

@slashbeast

This comment has been minimized.

Show comment
Hide comment
@slashbeast

slashbeast Jun 8, 2018

Few bits from my end. Altering acpi_osi param makes the touchpad on Dell Latitude 5580 not working, it's seems to be some designware i2c synaptic or alps device. However setting acpi_rev_override=5 fixes both booting with dGPU off and the fact that 2nd resume from s2ram freeze. The fix taken from @Archcry comment.

slashbeast commented Jun 8, 2018

Few bits from my end. Altering acpi_osi param makes the touchpad on Dell Latitude 5580 not working, it's seems to be some designware i2c synaptic or alps device. However setting acpi_rev_override=5 fixes both booting with dGPU off and the fact that 2nd resume from s2ram freeze. The fix taken from @Archcry comment.

@michelesr

This comment has been minimized.

Show comment
Hide comment
@michelesr

michelesr Jun 10, 2018

Same issue on Dell XPS 9570, with i7-8750H Coffe Lake and Nvidia GeForce GTX 1050 Ti Mobile: either acpi_rev_override=5 and acpi_rev_override=1 (from Arch Linux troubleshooting page for dell XPS 9560) don't work.

Also tried the workarounds acpi_osi=! acpi_osi="Windows 2009" and acpi_osi="!Windows 2015" and they don't work for me

michelesr commented Jun 10, 2018

Same issue on Dell XPS 9570, with i7-8750H Coffe Lake and Nvidia GeForce GTX 1050 Ti Mobile: either acpi_rev_override=5 and acpi_rev_override=1 (from Arch Linux troubleshooting page for dell XPS 9560) don't work.

Also tried the workarounds acpi_osi=! acpi_osi="Windows 2009" and acpi_osi="!Windows 2015" and they don't work for me

@denijane

This comment has been minimized.

Show comment
Hide comment
@denijane

denijane Jun 11, 2018

Some positive news - on kernel 4.16-r13 without the acpi_osi option I have touchpad. Works bad (like really bad), but works. Yay.
That however comes with some very random CPU usage which decreases the speed of a task I do (floating point Maple calculation) from ~270s to ~636s consistent with what happen when it doesn't have access to GPU.
Oddly enough optirun finds the NVIDIA and is able to use it once, so obviously that's ok too. From wat I can see bbswitch fail to turn off the NVIDIA thus maple has no access to intel video card. Double Yay.

P.S. For some unknown reasons I can see irq/129-ELAN120 in my task manager. Very creepy. It also takes 1% CPU.

denijane commented Jun 11, 2018

Some positive news - on kernel 4.16-r13 without the acpi_osi option I have touchpad. Works bad (like really bad), but works. Yay.
That however comes with some very random CPU usage which decreases the speed of a task I do (floating point Maple calculation) from ~270s to ~636s consistent with what happen when it doesn't have access to GPU.
Oddly enough optirun finds the NVIDIA and is able to use it once, so obviously that's ok too. From wat I can see bbswitch fail to turn off the NVIDIA thus maple has no access to intel video card. Double Yay.

P.S. For some unknown reasons I can see irq/129-ELAN120 in my task manager. Very creepy. It also takes 1% CPU.

@Brainiarc7

This comment has been minimized.

Show comment
Hide comment
@Brainiarc7

Brainiarc7 Jun 13, 2018

@denijane ,

Why are you on Linux 4.16-r13?

Is that packaged by your distribution, or did you build it from source?

Brainiarc7 commented Jun 13, 2018

@denijane ,

Why are you on Linux 4.16-r13?

Is that packaged by your distribution, or did you build it from source?

@ikcalB

This comment has been minimized.

Show comment
Hide comment
@ikcalB

ikcalB Jun 21, 2018

from @curlywu

Hi maybe as hint ... until Kernel Version 4.8.0.58 I was able to use current kernels without a problem.
For later kernels I have to use the workaround mentioned in a previous post (Razer Blade 14" (2016) (i7-6700HQ/GTX 970M) (BIOS 5.11, 04/07/2016). Workaround: acpi_osi=! acpi_osi="Windows 2009")

@Lekensteyn this sounds like a possible regression in the kernel? Or at least like a "make it different but not better" kind of situation. Is anyone willing to have a look into this?

ikcalB commented Jun 21, 2018

from @curlywu

Hi maybe as hint ... until Kernel Version 4.8.0.58 I was able to use current kernels without a problem.
For later kernels I have to use the workaround mentioned in a previous post (Razer Blade 14" (2016) (i7-6700HQ/GTX 970M) (BIOS 5.11, 04/07/2016). Workaround: acpi_osi=! acpi_osi="Windows 2009")

@Lekensteyn this sounds like a possible regression in the kernel? Or at least like a "make it different but not better" kind of situation. Is anyone willing to have a look into this?

@denijane

This comment has been minimized.

Show comment
Hide comment
@denijane

denijane Jun 21, 2018

@Brainiarc7
Hi, I was with 4.16-r13 because that was the last kernel in my distro repository. Right now I'm with 4.16-r16 and the situation is the same. I don't know when they'll add 4.17 and I don't have time right now to download it and compile it on my own. Also I'm not sure how to do it in Gentoo, cuz the manual wasn't very clear.
Anyway, in 4.16-r16 the situation with the touchpad is still the same. System loads fine without acpi kernel parameters, I just had to remove 10-nvidia.conf from /etc/X11/xorg.conf.d to avoid black screens. touchpad "works", nvidia is constantly on and I'm not sure, but seems that it becomes inaccessible after suspend.

denijane commented Jun 21, 2018

@Brainiarc7
Hi, I was with 4.16-r13 because that was the last kernel in my distro repository. Right now I'm with 4.16-r16 and the situation is the same. I don't know when they'll add 4.17 and I don't have time right now to download it and compile it on my own. Also I'm not sure how to do it in Gentoo, cuz the manual wasn't very clear.
Anyway, in 4.16-r16 the situation with the touchpad is still the same. System loads fine without acpi kernel parameters, I just had to remove 10-nvidia.conf from /etc/X11/xorg.conf.d to avoid black screens. touchpad "works", nvidia is constantly on and I'm not sure, but seems that it becomes inaccessible after suspend.

@zara86

This comment has been minimized.

Show comment
Hide comment
@zara86

zara86 Jun 25, 2018

I share my experience since i think i found a solution for myself (and maybe for someone else).
[Laptop Asus N580 + GeForce GTX 1050, Arch Linux]

Using acpi_osi=! acpi_osi="Windows 2009" allow me to use discrete card BUT I can't power it off, so bumblebee is usless, like many here...
I think that the issue was related to power management of PCIe devices so i found that i have put ( a long time ago..) a configuration under /etc/udev/rules.d to enable AUTO power mangement for that devices as described on Arch Linux Forum (URL: https://wiki.archlinux.org/index.php/Power_management#PCI_Runtime_Power_Management )... that is what cause me troubles!

Removing this configuration allow me to boot PC without acpi_osi=! acpi_osi="Windows 2009" kernel parameter (without any downside effect) and power on/off discrete card with bumblebee/optirun as well; funny things was that even the power consume of my laptop was lower when i remove that configuration: i could only guess that recent kernel change the way that pcie power management works.

Hope that could help someone...cheers!

zara86 commented Jun 25, 2018

I share my experience since i think i found a solution for myself (and maybe for someone else).
[Laptop Asus N580 + GeForce GTX 1050, Arch Linux]

Using acpi_osi=! acpi_osi="Windows 2009" allow me to use discrete card BUT I can't power it off, so bumblebee is usless, like many here...
I think that the issue was related to power management of PCIe devices so i found that i have put ( a long time ago..) a configuration under /etc/udev/rules.d to enable AUTO power mangement for that devices as described on Arch Linux Forum (URL: https://wiki.archlinux.org/index.php/Power_management#PCI_Runtime_Power_Management )... that is what cause me troubles!

Removing this configuration allow me to boot PC without acpi_osi=! acpi_osi="Windows 2009" kernel parameter (without any downside effect) and power on/off discrete card with bumblebee/optirun as well; funny things was that even the power consume of my laptop was lower when i remove that configuration: i could only guess that recent kernel change the way that pcie power management works.

Hope that could help someone...cheers!

@curlywu

This comment has been minimized.

Show comment
Hide comment
@curlywu

curlywu Jun 25, 2018

from "Zipristin commented on Jul 14, 2016"
nouveau.modeset=0 works for me because I don't need or want that Nvidia-sh.t active
As a result I can update to the latest kernel from my Mint 18.3 installation and my Razer Blade 14'' (2016) is very silent and also the trackpad works.

Added this to my /etc/default/grub:
GRUB_CMDLINE_LINUX="nouveau.modeset=0"

so future kernels hopefully will further work for me :-)

curlywu commented Jun 25, 2018

from "Zipristin commented on Jul 14, 2016"
nouveau.modeset=0 works for me because I don't need or want that Nvidia-sh.t active
As a result I can update to the latest kernel from my Mint 18.3 installation and my Razer Blade 14'' (2016) is very silent and also the trackpad works.

Added this to my /etc/default/grub:
GRUB_CMDLINE_LINUX="nouveau.modeset=0"

so future kernels hopefully will further work for me :-)

@slashbeast

This comment has been minimized.

Show comment
Hide comment
@slashbeast

slashbeast Jun 25, 2018

I think you're mixing issues. nouveau.modeset=0 will prevent Nvidia GPu from attempting to take over framebuffer,, which is already used by intel, and in process deadlocking usually on booting the system, when all modes are being loaded. It has nothing to do with the fact that if you disable Nvidia GPU before starting Xorg, screen will freeze.

slashbeast commented Jun 25, 2018

I think you're mixing issues. nouveau.modeset=0 will prevent Nvidia GPu from attempting to take over framebuffer,, which is already used by intel, and in process deadlocking usually on booting the system, when all modes are being loaded. It has nothing to do with the fact that if you disable Nvidia GPU before starting Xorg, screen will freeze.

@curlywu

This comment has been minimized.

Show comment
Hide comment
@curlywu

curlywu Jun 26, 2018

@slashbeast
I don't know anything about the internals of booting the system ... framebuffers etc.
I got stuck into a none bootable system after 4.8.0.58 (Linux Mint 18.3) or 4.8.9??? (Fedora 25)
With the above mentioned solution (nouveau.modeset=0) I am even able to boot into a Fedora 28 life system

curlywu commented Jun 26, 2018

@slashbeast
I don't know anything about the internals of booting the system ... framebuffers etc.
I got stuck into a none bootable system after 4.8.0.58 (Linux Mint 18.3) or 4.8.9??? (Fedora 25)
With the above mentioned solution (nouveau.modeset=0) I am even able to boot into a Fedora 28 life system

@dosyoyas

This comment has been minimized.

Show comment
Hide comment
@dosyoyas

dosyoyas Jul 6, 2018

@michelesr I've finally been able to use bumblebee in that same model after the following changes

  • /etc/bumblebee/bumblebee.conf:
    [driver-nvidia]
    LibraryPath=/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu
    XorgModulePath=/usr/lib/x86_64-linux-gnu/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules/input

  • /etc/modprobe.d/blacklist-nvidia.conf
    blacklist nvidia
    blacklist nvidia-drm
    blacklist nvidia-modeset

  • /etc/default/grub
    GRUB_CMDLINE_LINUX_DEFAULT="quiet nouveau.runpm=0"
    GRUB_CMDLINE_LINUX="acpi_osi=! acpi_osi='Windows 2009'"

  • /etc/environment
    __GLVND_DISALLOW_PATCHING=1

  • /lib/systemd/system/nvidia-prime-boot.service
    [Service]
    Type=oneshot
    ExecStart=/bin/sh -c "echo OFF > /proc/acpi/bbswitch

With this I can boot using the intel card, /proc/acpi/bbswitch says the dGPU is off and I can run glxgears or nvidia-smi with optirun:

~$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

~$ optirun nvidia-smi
Fri Jul 6 14:34:45 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 396.24.02 Driver Version: 396.24.02 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1050 Off | 00000000:01:00.0 Off | N/A |
| N/A 32C P3 N/A / N/A | 5MiB / 4042MiB | 2% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 5124 G /usr/lib/xorg/Xorg 5MiB |
+-----------------------------------------------------------------------------+

dosyoyas commented Jul 6, 2018

@michelesr I've finally been able to use bumblebee in that same model after the following changes

  • /etc/bumblebee/bumblebee.conf:
    [driver-nvidia]
    LibraryPath=/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu
    XorgModulePath=/usr/lib/x86_64-linux-gnu/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules/input

  • /etc/modprobe.d/blacklist-nvidia.conf
    blacklist nvidia
    blacklist nvidia-drm
    blacklist nvidia-modeset

  • /etc/default/grub
    GRUB_CMDLINE_LINUX_DEFAULT="quiet nouveau.runpm=0"
    GRUB_CMDLINE_LINUX="acpi_osi=! acpi_osi='Windows 2009'"

  • /etc/environment
    __GLVND_DISALLOW_PATCHING=1

  • /lib/systemd/system/nvidia-prime-boot.service
    [Service]
    Type=oneshot
    ExecStart=/bin/sh -c "echo OFF > /proc/acpi/bbswitch

With this I can boot using the intel card, /proc/acpi/bbswitch says the dGPU is off and I can run glxgears or nvidia-smi with optirun:

~$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

~$ optirun nvidia-smi
Fri Jul 6 14:34:45 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 396.24.02 Driver Version: 396.24.02 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1050 Off | 00000000:01:00.0 Off | N/A |
| N/A 32C P3 N/A / N/A | 5MiB / 4042MiB | 2% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 5124 G /usr/lib/xorg/Xorg 5MiB |
+-----------------------------------------------------------------------------+

@michelesr

This comment has been minimized.

Show comment
Hide comment
@michelesr

michelesr Jul 6, 2018

@dosyoyas it sounds a little bit hacky: are you able to run lspci and lshw without freezing everything while the discrete card is turned off?

michelesr commented Jul 6, 2018

@dosyoyas it sounds a little bit hacky: are you able to run lspci and lshw without freezing everything while the discrete card is turned off?

@IngeniousDox

This comment has been minimized.

Show comment
Hide comment
@IngeniousDox

IngeniousDox Jul 6, 2018

@dosyoyas Could you elaborate what your setup is? What distro / kernel? Are you using bbswitch 0.8 standard? or using the pm-rework branch?

IngeniousDox commented Jul 6, 2018

@dosyoyas Could you elaborate what your setup is? What distro / kernel? Are you using bbswitch 0.8 standard? or using the pm-rework branch?

@dosyoyas

This comment has been minimized.

Show comment
Hide comment
@dosyoyas

dosyoyas Jul 9, 2018

Sure. Ubuntu 18.04 (kernel 4.15.0-23-generic) + Nvidia 396 from graphic drivers ppa + bbswitch 0.8:
ii nvidia-driver-396 396.24.02-0ubuntu0~gpu18.04.1 amd64 NVIDIA driver metapackage
ii bbswitch-dkms 0.8-4ubuntu1 amd64 Interface for toggling the power on NVIDIA Optimus video cards
ii bumblebee 3.2.1-17 amd64 NVIDIA Optimus support for Linux
ii bumblebee-nvidia 3.2.1-17 amd64 NVIDIA Optimus support using the proprietary NVIDIA driver

Both lspci and lshw work with the discrete board off and on.
Powertop reports a discharge rate of 12W with the dGPU off, which is not spectacular but much better than the previous ~40W+ that I had before getting this to work.

The remaining issues are some tearing when scrolling on large websites and the inability to use two monitors with displayport daisy chain to work properly but I've settled on using a usbc to DP on one and the hdmi on the other.

dosyoyas commented Jul 9, 2018

Sure. Ubuntu 18.04 (kernel 4.15.0-23-generic) + Nvidia 396 from graphic drivers ppa + bbswitch 0.8:
ii nvidia-driver-396 396.24.02-0ubuntu0~gpu18.04.1 amd64 NVIDIA driver metapackage
ii bbswitch-dkms 0.8-4ubuntu1 amd64 Interface for toggling the power on NVIDIA Optimus video cards
ii bumblebee 3.2.1-17 amd64 NVIDIA Optimus support for Linux
ii bumblebee-nvidia 3.2.1-17 amd64 NVIDIA Optimus support using the proprietary NVIDIA driver

Both lspci and lshw work with the discrete board off and on.
Powertop reports a discharge rate of 12W with the dGPU off, which is not spectacular but much better than the previous ~40W+ that I had before getting this to work.

The remaining issues are some tearing when scrolling on large websites and the inability to use two monitors with displayport daisy chain to work properly but I've settled on using a usbc to DP on one and the hdmi on the other.

@RenatusLuzifer

This comment has been minimized.

Show comment
Hide comment
@RenatusLuzifer

RenatusLuzifer Jul 12, 2018

Hi, there!

I did not expect that the "nvidia, f*ck you" video is still up to date after 6 years...

I could not prevent the freeze on boot completely. Maybe I still have to try other grub command params. But I got it to a stable state for me.

Very new Model of Dell G3 3779 running debian 9 stretch. Had troubles with bumblebee so I upgraded to testing (buster) which is more stable for me now.

8th Generation Intel® Core™ i7-8750H Processor (6-Core, 9MB Cache, up to 4.1GHz w/ Turbo Boost)
NVIDIA® GeForce® GTX 1060 with NVIDIA® Max Q Design technology, 6GB GDDR5 video memory
nvidia-driver (390.67-2) from debian package bumblebee-nvidia
Debian 9(10) buster (testing) / kernel 4.16.0-2

After installing bumblebee-nvidia primus I did the following changes

/etc/bumblebee/bumblebee.conf:
	[driver-nvidia]
	KernelDriver=nvidia
	LibraryPath=/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu
	XorgModulePath=/usr/lib/x86_64-linux-gnu/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules/input

/etc/modprobe.d/blacklist-nvidia.conf
	blacklist nvidia
	blacklist nvidia-drm
	blacklist nvidia-modeset

/etc/default/grub
	GRUB_CMDLINE_LINUX_DEFAULT="quiet nouveau.runpm=0"
	GRUB_CMDLINE_LINUX="acpi_osi=! acpi_osi='Windows 2009'"

/lib/systemd/system/nvidia-prime-boot.service
	[Service]
	Type=oneshot
	ExecStart=/bin/sh -c "echo OFF > /proc/acpi/bbswitch

Changes to the bumblebee xorg.conf

 ~ # cat /etc/bumblebee/xorg.conf.nvidia 
	Section "ServerLayout"
		Identifier  "Layout0"
		Option      "AutoAddDevices" "false"
		Option      "AutoAddGPU" "false"
		Screen      0  "nvidia"
		Inactive       "intel"
	EndSection

	Section "Device"
		Identifier  "nvidia"
		Driver      "nvidia"
		VendorName  "NVIDIA Corporation"

	#   If the X server does not automatically detect your VGA device,
	#   you can manually set it here.
	#   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
	#   as you see in the commented example.
	#   This Setting may be needed in some platforms with more than one
	#   nvidia card, which may confuse the proprietary driver (e.g.,
	#   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
	#   BusID "PCI:01:00:0"

	#   Setting ProbeAllGpus to false prevents the new proprietary driver
	#   instance spawned to try to control the integrated graphics card,
	#   which is already being managed outside bumblebee.
	#   This option doesn't hurt and it is required on platforms running
	#   more than one nvidia graphics card with the proprietary driver.
	#   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
	#   If this option is not set, the new Xorg may blacken the screen and
	#   render it unusable (unless you have some way to run killall Xorg).
		Option "ProbeAllGpus" "false"

		BusID  "PCI:1:0:0"
		Option "AllowEmptyInitialConfiguration"
		Option "NoLogo" "true"
		Option "UseEDID" "true"
	EndSection

	Section "Device"
		Identifier     "intel"
		Driver         "dummy"
		BusID          "PCI:0:2:0"
	EndSection

	Section "Screen"
		Identifier     "nvidia"
		Device         "nvidia"
	EndSection

Changes to default xorg.conf

 ~ # cat /etc/X11/xorg.conf 
	Section "ServerLayout"
		Identifier     "Layout0"
		Screen      0  "intel"
		Inactive       "nvidia"
	EndSection
	 
	Section "Monitor"
		Identifier     "Monitor0"
		Option         "DPMS"
	EndSection
	 
	Section "Device"
		Identifier     "nvidia"
	#    Driver         "nvidia"
	#    Driver         "nouveau"
		Driver         "dummy"
		BusID          "PCI:1:0:0"
	EndSection
	 
	Section "Device"
		Identifier     "intel"

	#    Driver         "modesetting"

		Driver         "intel"
	#    Option         "AccelMethod" "SNA"
	#    Option         "AccelMethod" "UXA"
		Option         "TearFree"    "true"
		Option         "DRI" "3"

		BusID          "PCI:0:2:0"
	EndSection
	 
	Section "Screen"
		Identifier     "nvidia"
		Device         "nvidia"
	#    Monitor        "Monitor0"
	#    DefaultDepth    24
	#    SubSection     "Display"
	#        Depth       24
	#        Modes      "nvidia-auto-select"
	#        Virtual     1920 1080
	#    EndSubSection
	EndSection
	 
	Section "Screen"
		Identifier     "intel"
		Device         "intel"
		Monitor        "Monitor0"
	EndSection

Unfortunately there was still a freeze when ligthdm is started.
I changed systemd target

	systemctl set-default multi-user.target

Interestingly, login in tty and then starting lightdm

	systemctl start lightdm.service

works fine. There must be something in the boot procedure.

To get access to my second screen over HDMI I use

systemctl start bumblebeed.service
modprobe bbswitch load_state=1
optirun true
intel-virtual-output -f

That's fine for me so far. Did a recovery with Clonezilla so I can restart from this point at any time if I try something new or mess it up.

RenatusLuzifer commented Jul 12, 2018

Hi, there!

I did not expect that the "nvidia, f*ck you" video is still up to date after 6 years...

I could not prevent the freeze on boot completely. Maybe I still have to try other grub command params. But I got it to a stable state for me.

Very new Model of Dell G3 3779 running debian 9 stretch. Had troubles with bumblebee so I upgraded to testing (buster) which is more stable for me now.

8th Generation Intel® Core™ i7-8750H Processor (6-Core, 9MB Cache, up to 4.1GHz w/ Turbo Boost)
NVIDIA® GeForce® GTX 1060 with NVIDIA® Max Q Design technology, 6GB GDDR5 video memory
nvidia-driver (390.67-2) from debian package bumblebee-nvidia
Debian 9(10) buster (testing) / kernel 4.16.0-2

After installing bumblebee-nvidia primus I did the following changes

/etc/bumblebee/bumblebee.conf:
	[driver-nvidia]
	KernelDriver=nvidia
	LibraryPath=/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu
	XorgModulePath=/usr/lib/x86_64-linux-gnu/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules/input

/etc/modprobe.d/blacklist-nvidia.conf
	blacklist nvidia
	blacklist nvidia-drm
	blacklist nvidia-modeset

/etc/default/grub
	GRUB_CMDLINE_LINUX_DEFAULT="quiet nouveau.runpm=0"
	GRUB_CMDLINE_LINUX="acpi_osi=! acpi_osi='Windows 2009'"

/lib/systemd/system/nvidia-prime-boot.service
	[Service]
	Type=oneshot
	ExecStart=/bin/sh -c "echo OFF > /proc/acpi/bbswitch

Changes to the bumblebee xorg.conf

 ~ # cat /etc/bumblebee/xorg.conf.nvidia 
	Section "ServerLayout"
		Identifier  "Layout0"
		Option      "AutoAddDevices" "false"
		Option      "AutoAddGPU" "false"
		Screen      0  "nvidia"
		Inactive       "intel"
	EndSection

	Section "Device"
		Identifier  "nvidia"
		Driver      "nvidia"
		VendorName  "NVIDIA Corporation"

	#   If the X server does not automatically detect your VGA device,
	#   you can manually set it here.
	#   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
	#   as you see in the commented example.
	#   This Setting may be needed in some platforms with more than one
	#   nvidia card, which may confuse the proprietary driver (e.g.,
	#   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
	#   BusID "PCI:01:00:0"

	#   Setting ProbeAllGpus to false prevents the new proprietary driver
	#   instance spawned to try to control the integrated graphics card,
	#   which is already being managed outside bumblebee.
	#   This option doesn't hurt and it is required on platforms running
	#   more than one nvidia graphics card with the proprietary driver.
	#   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
	#   If this option is not set, the new Xorg may blacken the screen and
	#   render it unusable (unless you have some way to run killall Xorg).
		Option "ProbeAllGpus" "false"

		BusID  "PCI:1:0:0"
		Option "AllowEmptyInitialConfiguration"
		Option "NoLogo" "true"
		Option "UseEDID" "true"
	EndSection

	Section "Device"
		Identifier     "intel"
		Driver         "dummy"
		BusID          "PCI:0:2:0"
	EndSection

	Section "Screen"
		Identifier     "nvidia"
		Device         "nvidia"
	EndSection

Changes to default xorg.conf

 ~ # cat /etc/X11/xorg.conf 
	Section "ServerLayout"
		Identifier     "Layout0"
		Screen      0  "intel"
		Inactive       "nvidia"
	EndSection
	 
	Section "Monitor"
		Identifier     "Monitor0"
		Option         "DPMS"
	EndSection
	 
	Section "Device"
		Identifier     "nvidia"
	#    Driver         "nvidia"
	#    Driver         "nouveau"
		Driver         "dummy"
		BusID          "PCI:1:0:0"
	EndSection
	 
	Section "Device"
		Identifier     "intel"

	#    Driver         "modesetting"

		Driver         "intel"
	#    Option         "AccelMethod" "SNA"
	#    Option         "AccelMethod" "UXA"
		Option         "TearFree"    "true"
		Option         "DRI" "3"

		BusID          "PCI:0:2:0"
	EndSection
	 
	Section "Screen"
		Identifier     "nvidia"
		Device         "nvidia"
	#    Monitor        "Monitor0"
	#    DefaultDepth    24
	#    SubSection     "Display"
	#        Depth       24
	#        Modes      "nvidia-auto-select"
	#        Virtual     1920 1080
	#    EndSubSection
	EndSection
	 
	Section "Screen"
		Identifier     "intel"
		Device         "intel"
		Monitor        "Monitor0"
	EndSection

Unfortunately there was still a freeze when ligthdm is started.
I changed systemd target

	systemctl set-default multi-user.target

Interestingly, login in tty and then starting lightdm

	systemctl start lightdm.service

works fine. There must be something in the boot procedure.

To get access to my second screen over HDMI I use

systemctl start bumblebeed.service
modprobe bbswitch load_state=1
optirun true
intel-virtual-output -f

That's fine for me so far. Did a recovery with Clonezilla so I can restart from this point at any time if I try something new or mess it up.

@berglh

This comment has been minimized.

Show comment
Hide comment
@berglh

berglh Jul 21, 2018

@michelesr I'm running Ubuntu 18.04 on my XPS 15 9570 with the generic (4.15.0-29-generic) kernel and your suggested changes, but still not having any luck. I'm going to purge all packages and try again later.

At one point in time I had the nvidia driver working and the prime switch in the nvidia control panel actuating between reboots. The last thing I may of done before installing bumblebee/bbswitch was to switch it to Intel only.

It does seem a little strange in my lscpi output for the nvidia device that it has the following string !!! Unknown header type 7f

@michelesr I've finally been able to use bumblebee in that same model after the following changes

~$ cat /proc/acpi/bbswitch
0000:01:00.0 OFF
~$ cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status
active
~$ optirun nvidia-smi
[  105.909136] [ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card
[  105.909199] [ERROR]Aborting because fallback start is disabled.
~$ dmesg
[  106.297751] bbswitch: enabling discrete graphics
[  106.297800] pci 0000:01:00.0: Refused to change power state, currently in D3
[  109.616475] bbswitch: enabling discrete graphics
[  109.616495] pci 0000:01:00.0: Refused to change power state, currently in D3
~$ sudo lspci -v -s 01:00.0
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev ff) (prog-if ff)
	!!! Unknown header type 7f
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
~$ sudo lshw -C video
  *-display                 
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:131 memory:eb000000-ebffffff memory:80000000-8fffffff ioport:4000(size=64) memory:c0000-dffff

berglh commented Jul 21, 2018

@michelesr I'm running Ubuntu 18.04 on my XPS 15 9570 with the generic (4.15.0-29-generic) kernel and your suggested changes, but still not having any luck. I'm going to purge all packages and try again later.

At one point in time I had the nvidia driver working and the prime switch in the nvidia control panel actuating between reboots. The last thing I may of done before installing bumblebee/bbswitch was to switch it to Intel only.

It does seem a little strange in my lscpi output for the nvidia device that it has the following string !!! Unknown header type 7f

@michelesr I've finally been able to use bumblebee in that same model after the following changes

~$ cat /proc/acpi/bbswitch
0000:01:00.0 OFF
~$ cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_status
active
~$ optirun nvidia-smi
[  105.909136] [ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card
[  105.909199] [ERROR]Aborting because fallback start is disabled.
~$ dmesg
[  106.297751] bbswitch: enabling discrete graphics
[  106.297800] pci 0000:01:00.0: Refused to change power state, currently in D3
[  109.616475] bbswitch: enabling discrete graphics
[  109.616495] pci 0000:01:00.0: Refused to change power state, currently in D3
~$ sudo lspci -v -s 01:00.0
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev ff) (prog-if ff)
	!!! Unknown header type 7f
	Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
~$ sudo lshw -C video
  *-display                 
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:131 memory:eb000000-ebffffff memory:80000000-8fffffff ioport:4000(size=64) memory:c0000-dffff
@ekultails

This comment has been minimized.

Show comment
Hide comment
@ekultails

ekultails Aug 7, 2018

I have the same exact problem that @berglh described also on a Dell XPS 15 9570. I am running Fedora 28 x86_64 as my operating system and tested out the 4.16 and 4.17 kernels. None of the suggested workarounds from this thread worked on the laptop. This seems like either a Linux kernel and/or Bumblebee problem.

As a side note, I dual-boot with Windows 10 and on there I tried replacing the Dell provided Nvidia driver with the official upstream laptop driver straight from Nvidia. It did not work. I had to revert back to Dell's driver.

ekultails commented Aug 7, 2018

I have the same exact problem that @berglh described also on a Dell XPS 15 9570. I am running Fedora 28 x86_64 as my operating system and tested out the 4.16 and 4.17 kernels. None of the suggested workarounds from this thread worked on the laptop. This seems like either a Linux kernel and/or Bumblebee problem.

As a side note, I dual-boot with Windows 10 and on there I tried replacing the Dell provided Nvidia driver with the official upstream laptop driver straight from Nvidia. It did not work. I had to revert back to Dell's driver.

@ekultails

This comment has been minimized.

Show comment
Hide comment
@ekultails

ekultails Aug 9, 2018

UPDATE: @berglh After a month of playing around with different settings, I finally got Bumblebee working on my Dell XPS 9570 laptop! I followed the instructions from this Reddit post. The summary is to completely disable Nouveau, configure Bumblebee to auto-load the "nvidia" driver, and set the ACPI rev[ision?] number to 5. I verified with glxgears -info that the integrated Intel graphics were being used by default and now optirun and optirun -b primus both work for executing applications with the Nvidia graphics card.

I am currently getting 6-8 hours of battery in Linux and 10-12 in Windows. However, that is likely another unrelated issue.

ekultails commented Aug 9, 2018

UPDATE: @berglh After a month of playing around with different settings, I finally got Bumblebee working on my Dell XPS 9570 laptop! I followed the instructions from this Reddit post. The summary is to completely disable Nouveau, configure Bumblebee to auto-load the "nvidia" driver, and set the ACPI rev[ision?] number to 5. I verified with glxgears -info that the integrated Intel graphics were being used by default and now optirun and optirun -b primus both work for executing applications with the Nvidia graphics card.

I am currently getting 6-8 hours of battery in Linux and 10-12 in Windows. However, that is likely another unrelated issue.

@karora

This comment has been minimized.

Show comment
Hide comment
@karora

karora Aug 15, 2018

I have a Dell XPS 15 9560 running Debian Unstable and found that after applying the standard workaround (i.e. acpi_osi=! acpi_osi="Windows 2009") my touchpad stopped working. It took me a while to notice since I mostly use an external mouse, so then of course it took me a while to track down the exact issue.

As a result I've now added the echo ON >/proc/acpi/bbswitch before starting my display manager and echo OFF >/proc/acpi/bbswitch to my .xsessionrc.

Is that a good approach? Does it mean that the Nvidia GPU is powered down, or does the fact that Xorg detected it during startup mean it's permanently enbled?

karora commented Aug 15, 2018

I have a Dell XPS 15 9560 running Debian Unstable and found that after applying the standard workaround (i.e. acpi_osi=! acpi_osi="Windows 2009") my touchpad stopped working. It took me a while to notice since I mostly use an external mouse, so then of course it took me a while to track down the exact issue.

As a result I've now added the echo ON >/proc/acpi/bbswitch before starting my display manager and echo OFF >/proc/acpi/bbswitch to my .xsessionrc.

Is that a good approach? Does it mean that the Nvidia GPU is powered down, or does the fact that Xorg detected it during startup mean it's permanently enbled?

@Lekensteyn

This comment has been minimized.

Show comment
Hide comment
@Lekensteyn

Lekensteyn Aug 16, 2018

Member

does the fact that Xorg detected it during startup mean it's permanently enbled?

If you have no Xorg driver loaded for it (check your /var/log/Xorg.0.log), it'll probably remain off. However with newer kernels this might not always be true (Xorg is just one thing that reads the PCI config space, but whener you run lspci on newer kernels you run into the same issue).

Member

Lekensteyn commented Aug 16, 2018

does the fact that Xorg detected it during startup mean it's permanently enbled?

If you have no Xorg driver loaded for it (check your /var/log/Xorg.0.log), it'll probably remain off. However with newer kernels this might not always be true (Xorg is just one thing that reads the PCI config space, but whener you run lspci on newer kernels you run into the same issue).

@karora

This comment has been minimized.

Show comment
Hide comment
@karora

karora Aug 16, 2018

Thanks @Lekensteyn, I can now see that Xorg is only loading the intel driver, so that's good.

I'm on kernel 4.17 since Debian hasn't published a 4.18 yet and when I run lspci as root the laptop does indeed lock up and require a hard poweroff so now I just have to remember not to run lspci as root - or at least remember what to do beforehand.

Is there anything that the Bumblebee project can actually do to resolve this issue, or is it something that needs to be fixed in the kernel?

karora commented Aug 16, 2018

Thanks @Lekensteyn, I can now see that Xorg is only loading the intel driver, so that's good.

I'm on kernel 4.17 since Debian hasn't published a 4.18 yet and when I run lspci as root the laptop does indeed lock up and require a hard poweroff so now I just have to remember not to run lspci as root - or at least remember what to do beforehand.

Is there anything that the Bumblebee project can actually do to resolve this issue, or is it something that needs to be fixed in the kernel?

@Lekensteyn

This comment has been minimized.

Show comment
Hide comment
@Lekensteyn

Lekensteyn Aug 17, 2018

Member

Is there anything that the Bumblebee project can actually do to resolve this issue, or is it something that needs to be fixed in the kernel?

It needs to be fixed in the kernel. If you would prefer not locking up at the cost of increased battery usage, set PMMethod=none and ensure that no other tool enables runtime PM (/sys/class/pci/devices/0000:01:00.0/power/control should say "on" instead of "auto", adjust 01:00.0 to match your nvidia GPU device).

Member

Lekensteyn commented Aug 17, 2018

Is there anything that the Bumblebee project can actually do to resolve this issue, or is it something that needs to be fixed in the kernel?

It needs to be fixed in the kernel. If you would prefer not locking up at the cost of increased battery usage, set PMMethod=none and ensure that no other tool enables runtime PM (/sys/class/pci/devices/0000:01:00.0/power/control should say "on" instead of "auto", adjust 01:00.0 to match your nvidia GPU device).

@karora

This comment has been minimized.

Show comment
Hide comment
@karora

karora Aug 17, 2018

The best solution for the Dell XPS 9560 and later (at least with recent kernels) appears to be adding acpi_rev_override=5 to the kernel command line. With this setting everything appears to work - including the touchpad and lspci, lshw, etc - and there's no need to switch the discrete graphics on/off around starting the Xorg server.

Thanks for all your help - hopefully some kind of kernel change will eventually automatically detect this value. At this point I can't see any downsides to setting it this way.

karora commented Aug 17, 2018

The best solution for the Dell XPS 9560 and later (at least with recent kernels) appears to be adding acpi_rev_override=5 to the kernel command line. With this setting everything appears to work - including the touchpad and lspci, lshw, etc - and there's no need to switch the discrete graphics on/off around starting the Xorg server.

Thanks for all your help - hopefully some kind of kernel change will eventually automatically detect this value. At this point I can't see any downsides to setting it this way.

@cerg2010cerg2010

This comment has been minimized.

Show comment
Hide comment
@cerg2010cerg2010

cerg2010cerg2010 Sep 22, 2018

I had the same issue, but nothing really helped me from this thread... I have HP 15-bc404ur
The issue is that Xorg freezes the laptop completely (caps lock light doesn't work) when running it with bbswitch set to OFF. I think the reason for this is that Xorg tries to interact with card while it is disabled. So I created xorg.conf with only intel card specified and this fixed the issue partially: startx with xfce4 began to work, but DM's (lightdm and lxdm tested) freezed anyway. Also I tried to remove the PCI device via /sys/bus/pci/.../remove and lightdm began to work, but card can't be enumerated again for some reason. Searching for a solution took a day for me until I opened a man page for xorg.conf and saw a SingleCard option. Setting it to true in ServerLayout section made everything work OK. Here is my final xorg.conf:

Section "ServerLayout"
	Identifier  "Layout0"
	Screen      0 "intel"
	Option      "SingleCard" "true"
EndSection

Section "Monitor"
	Identifier  "Monitor0"
	Option      "DPMS" "true"
EndSection

Section "Device"
	Identifier  "intel"
	Driver      "intel"
	BusID       "PCI:0:2:0"
	Option      "TearFree" "true"
EndSection

Section "Screen"
	Identifier  "intel"
	Device      "intel"
	Monitor     "Monitor0"
EndSection

Hope this helps!

cerg2010cerg2010 commented Sep 22, 2018

I had the same issue, but nothing really helped me from this thread... I have HP 15-bc404ur
The issue is that Xorg freezes the laptop completely (caps lock light doesn't work) when running it with bbswitch set to OFF. I think the reason for this is that Xorg tries to interact with card while it is disabled. So I created xorg.conf with only intel card specified and this fixed the issue partially: startx with xfce4 began to work, but DM's (lightdm and lxdm tested) freezed anyway. Also I tried to remove the PCI device via /sys/bus/pci/.../remove and lightdm began to work, but card can't be enumerated again for some reason. Searching for a solution took a day for me until I opened a man page for xorg.conf and saw a SingleCard option. Setting it to true in ServerLayout section made everything work OK. Here is my final xorg.conf:

Section "ServerLayout"
	Identifier  "Layout0"
	Screen      0 "intel"
	Option      "SingleCard" "true"
EndSection

Section "Monitor"
	Identifier  "Monitor0"
	Option      "DPMS" "true"
EndSection

Section "Device"
	Identifier  "intel"
	Driver      "intel"
	BusID       "PCI:0:2:0"
	Option      "TearFree" "true"
EndSection

Section "Screen"
	Identifier  "intel"
	Device      "intel"
	Monitor     "Monitor0"
EndSection

Hope this helps!

@t-cst

This comment has been minimized.

Show comment
Hide comment
@t-cst

t-cst Sep 30, 2018

I experienced this issue with a MSI GL72 7RD laptop. It has a NVIDIA GeForce GTX 1050 that is currently not supported by nouveau. So I use the nvidia-driver 384.130 from debian stretch non-free repository.

Linux version: Debian 9 Stretch

$ uname -a
Linux msi 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux

The option that works for this laptop is acpi_osi=! acpi_osi="Windows 2009" (I've tried with other commented options acpi_osi="Windows 20??" without success).

So far, all seems to work fine including touchpad and lspci.

t-cst commented Sep 30, 2018

I experienced this issue with a MSI GL72 7RD laptop. It has a NVIDIA GeForce GTX 1050 that is currently not supported by nouveau. So I use the nvidia-driver 384.130 from debian stretch non-free repository.

Linux version: Debian 9 Stretch

$ uname -a
Linux msi 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux

The option that works for this laptop is acpi_osi=! acpi_osi="Windows 2009" (I've tried with other commented options acpi_osi="Windows 20??" without success).

So far, all seems to work fine including touchpad and lspci.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment