Skip to content
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 hangs upon trying to launch X with bumblebee running #808

Open
bi0shacker001 opened this issue Oct 3, 2016 · 13 comments
Open

Laptop hangs upon trying to launch X with bumblebee running #808

bi0shacker001 opened this issue Oct 3, 2016 · 13 comments

Comments

@bi0shacker001
Copy link

bi0shacker001 commented Oct 3, 2016

Tested on: Archlinux, Ubuntu 16.04, Opensuse Tumbleweed, and Archlinux (again)

Bumblebee works fine when starting it after the system boots up. Setting it to start at boot causes the entire system to hang (kernel hard lock, not just graphics.)
Uses bbswitch for powersaving, and proprietary NVidia drivers.

system: MSI gl62-6qf
i7-6700HQ
12GB DDR4
NVidia GTX 960m graphics
3 drives (128GB generic M2 SSD, 2TB Seagate M007 Hard drive, and 500GB Evo 850 SSD)

@Lekensteyn
Copy link
Member

You need to boot with acpi_osi=! acpi_osi="Windows 2009" as workaround. See #764 (comment)

@bi0shacker001
Copy link
Author

I tried that before posting this. It is also not affected by turning the card on with Bumblebee before launching X.

@bi0shacker001
Copy link
Author

New issue made, as this one was closed without resolution, with an incorrect response.

@Lekensteyn
Copy link
Member

Issues can be re-opened, please do not create duplicates.

What have you tried to analyze the problem? Does the hang happen when bbswitch and nvidia are not in use? What about just having bbswitch without nvidia?

@bi0shacker001
Copy link
Author

I haven't attempted to use Nouveau with bbswitch, but the issue only occurs when Bumblebee starts BEFORE X. Starting bumblebee after X yields no issues. Starting X with bbswitch but no bumblebee yields no issues. Starting the laptop with Bumblebee and nouveau has the same issue. Starting laptop with Nouveau but no Bumblebee has no issues.

@bi0shacker001
Copy link
Author

Sorry about the duplicate, also. It has been my experience that most projects don't read issue comments after they close them.

@bi0shacker001
Copy link
Author

I didn't test actual Nouveau application usage, however. Nouveau leads to some flickering on X, which gives me massive headaches.

@Lekensteyn
Copy link
Member

If you enable nouveau (and disable bbswitch and nvidia, do NOT use Bumblebee with nouveau), then you will have power savings advantages. It is unlikely that flickering starts when nouveau (the kernel driver, not xf86-video-nouveau) since the Intel (i915) driver handles your primary display.

Please provide more details about your hardware configuration (lspci -nn | grep 'VGA\|3D') and be more specific about what you have tried.

@bi0shacker001
Copy link
Author

bi0shacker001 commented Oct 6, 2016

My graphics configuration is:
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:191b] (rev 06) 01:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 960M] [10de:139b] (rev ff)
I've tried booting with Bumblebee and Nouveau (with and without bbswitch), as well as Bumblebee with Nvidia (with and without bbswitch), and just Nouveau without Bumblebee. The Nouveau drivers were just to test, but the flickering occurs whenever the Nouveau kernel driver is loaded. This issue does not occur when the Nvidia driver is loaded.
I've attempted all of the kernel commandline acpi switches listed in the other thread, to no effect.
In order, my attempts have been

  1. intel, nvidia, and bumblebee, starting after boot.
  2. intel, nvidia, and bumblebee, with bbswitch enabled at boot, but bumblebee loaded after X starts up (as this is an issue I have been having for a while)
  3. intel, nvidia, and bumblebee, with bbswitch and bumblebee enabled and starting prior to X. (This has been my test on all other distros as well. The following was only performed on my current Archlinux install)
  4. intel, nouveau, and bbswitch (as I've never used Nouveau first, and wanted to attempt these one at a time). This functioned fine, but flickering was encountered.
  5. intel, nouveau, and bumblebee, with bbswitch and bumblebee launching before X. This encountered the same error.
  6. intel, nouveau, and bumblebee, with bbswitch starting at boot, and bumblebee starting after. This functioned, but I did not test it with any 3D applications. This was just so I could report whether or not this functioned. X booted fine with this.

Additionally: out of all of these, only when bbswitch is installed and keeping the graphics card on does my HDMI port function as an output. I cannot enable it for output under any other circumstances.

@Lekensteyn
Copy link
Member

Ok, let's try to get nouveau working without Bumblebee, bbswitch or nvidia. The following should help you get a working nouveau setup that also supported external monitors.

Ensure that bumblebee and bbswitch (and definitely nvidia) are removed or otherwise disabled. If you want to keep the bumblebee package on Arch Linux, disable the blacklist nouveau line with:

ln -s /dev/null /etc/modprobe.d/bumblebee.conf

My current hardware and software configuration:

  • Clevo P651RA laptop with GTX 965M

    00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:191b] (rev 06)
    01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204M [GeForce GTX 965M] [10de:13d9] (rev a1)
    
  • Dell U2515H connected over HDMI-1

  • /proc/cmdline contains: "acpi_osi=!Windows 2015" to prevent https://bugzilla.kernel.org/show_bug.cgi?id=156341

  • Arch Linux with testing repo enabled

  • Linux v4.8 (mainline kernel, git tag v4.8)

  • xorg-server 1.18.4-1 using the modesetting driver for both intel and nouveau.

  • KDE Plasma 5.8 as desktop environment

The xf86-video-intel driver gave me a terrible experience, replacing it by modesetting was much better, but note the "1fps" issue below.

Kernel

Check your dmesg that nouveau was successfully loaded. You should also see the detected PR support line in Linux 4.8 (see below). Note that power management is completely handled by nouveau.

If you changed your udev configuration to write auto to power/control, be sure to disable that for at least the NVIDIA GPU. Otherwise you could get the unknown chipset issue:

pci 0000:01:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG0.PEGP handle
nouveau: detected PR support, will not use DSM
nouveau 0000:01:00.0: enabling device (0000 -> 0003)
nouveau 0000:01:00.0: unknown chipset (ffffffff)
nouveau: probe of 0000:01:00.0 failed with error -12

If you have this, fix your udev config and reboot. Alternatively, a workaround involves disabling RPM for the PCIe port, then remove the nvidia GPU and rescan the PCI bus.

Xorg

No special xorg.conf is necessary, but if you have xf86-video-intel enabled you might want to replace it, create /etc/X11/xorg.conf.d/21-intel.conf with:

# Added 2016-06-05 by Peter, should still work on B7130 and avoid display corruption on P651RA
Section "Device"
    Identifier  "Intel Graphics"
    Driver      "modesetting"
EndSection

Xrandr

Assuming you have the Intel and nouveau drivers loaded, both using the monitor, let's make X aware of it (if nothing else has already activated this):

# Assume first to have 1 or 2 outputs (intel) and the nvidia to have 3
read intel nv <<<"$(xrandr --listproviders |  awk '/outputs:/{print $4}' | tr '\n' ' ')"
#xrandr --setprovideroutputsource modesetting Intel
xrandr --setprovideroutputsource $nv $intel

Verify:

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0xcb cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 1 associated providers: 1 name:modesetting
Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 3 associated providers: 1 name:modesetting

Use your favorite display manager tool or just plain xrandr to configure screens:

xrandr --output HDMI-1 --mode 2560x1440 --right-of eDP-1

During the initial setup I had issues where xrandr was throwing BadRequest errors or something like that. Turning off/on the external monitor seems to help to get things sane: xrandr --output HDMI-1 --off.

KDE Plasma's KScreen tool tried to do some magic which is normally good, but during the initial screen it seems to give issues. Display Configuration (a KCM module using Qt5) logged an error that it refused to create widgets larger than 16777216x16777216. Logging out/in again "fixed" this problem.

1fps issue

Current xorg has an issue that causes 1fps rate, workaround this by starting applications with vblank_mode=0 env var set or create ~/.drirc with:

<!-- 2016-10-07 Temporary hack to avoid 1fps, TODO test Hans patches -->
<driconf>
   <device screen="0">
      <application name="all">
         <option name="vblank_mode" value="0"/>
      </application>
   </device>
</driconf>

@bi0shacker001
Copy link
Author

I'll work on that in a little bit (I am on my way home from work), but is there any way we can do something similar using the proprietary drivers? I do a fairly large amount of 3D Animation, which is the entire point of the discrete chip, and I'd prefer to be able to avoid a massive drop in performance if at all possible. That being said, being able to use the nvidia card at all is better than nothing.

@Lekensteyn
Copy link
Member

I have not tried the nvidia blob driver, but for that I guess that you could have a look at https://devtalk.nvidia.com/default/topic/957814/prime-and-prime-synchronization/

@ingmarcosp
Copy link

ingmarcosp commented Dec 8, 2017

bumblebee-bugreport-20171208_013404.tar.gz
I don't know if i can re open this thread...

~ uname -a Linux opensuse.local 4.4.92-31-default #1 SMP Sun Oct 22 06:56:24 UTC 2017 (1d80e8a) x86_64 x86_64 x86_64 GNU/Linux
baseboard-manufacturer: Dell Inc. baseboard-product-name: 05FFDN baseboard-version : A00 system-manufacturer : Dell Inc. system-product-name : XPS 15 9560 system-version : Not Specified bios-vendor : Dell Inc. bios-version : 1.5.0 bios-release-date : 08/30/2017
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.
I have a Dell xps 15 with a I7-7700HQ + nvidia gtx 1050 with Opensuse Leap 42.3 running, have the same problem, after install bumblebee and nvidia drivers I reboot the laptop, and hangs and when is loading, I can boot with the acpi_ois=! acpi_ois="windows 2009" but left me without Power Management, no screen bright control, at all. I'm missing something?

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

No branches or pull requests

3 participants