Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Bumblebee - Core i7-4720HQ - GTX980M - Having trouble

Need help with peripherals or devices?
Post Reply
Message
Author
c-tz
Posts: 5
Joined: 2018-02-11 20:19

Bumblebee - Core i7-4720HQ - GTX980M - Having trouble

#1 Post by c-tz »

Hi guys,

Short intro: I was a long time Gentoo user and now returning to Linux. I use Debian on some servers at the company I work at and since Debian 9 went stable I've been using it on my laptop as well, with KDE Plasma 5.8.6. Everything works splendid. No tearing, no freezes, but I can't for the life of me figure out how to get my integrated dedicated Nvidia 980M working. It's a clean install with some software like Firefox Quantum, Tor, some games like Dink Smallwood and Endless Skies.

This is my first time trying to setup a system with two GPU's, one dedicated and one "standard". :)

Code: Select all

uname -a
Linux BTO 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux
Machine info:

Code: Select all

# inxi -F         
System:    Host: BTO Kernel: 4.9.0-5-amd64 x86_64 (64 bit) Desktop: N/A Distro: Debian GNU/Linux 9 (stretch)
Machine:   Device: laptop System: Notebook product: P65_P67SG                                                                                         
           Mobo: Notebook model: P65_P67SG UEFI: American Megatrends v: 1.03.07 date: 03/05/2015                                                      
Battery    BAT0: charge: 38.0 Wh 100.0% condition: 38.0/40.7 Wh (94%)                                                                                 
CPU:       Quad core Intel Core i7-4720HQ (-HT-MCP-) cache: 6144 KB                                                                                   
           clock speeds: max: 3600 MHz 1: 2637 MHz 2: 2600 MHz 3: 2641 MHz 4: 2600 MHz 5: 2616 MHz 6: 2600 MHz                                        
           7: 2630 MHz 8: 2608 MHz                                                                                                                    
Graphics:  Card-1: Intel 4th Gen Core Processor Integrated Graphics Controller                                                                        
           Card-2: NVIDIA GM204M [GeForce GTX 980M]                                                                                                   
           Display Server: X.org 1.19.2 drivers: (unloaded: fbdev,vesa) FAILED: modesetting                                                           
           tty size: 150x40 Advanced Data: N/A for root                                                                                               
Audio:     Card-1 Intel 8 Series/C220 Series High Definition Audio Controller driver: snd_hda_intel                                                   
           Card-2 Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller driver: snd_hda_intel                                              
           Card-3 Logitech Webcam C270 driver: USB Audio                                                                                              
           Sound: Advanced Linux Sound Architecture v: k4.9.0-5-amd64                                                                                 
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8168                                                    
           IF: enp3s0f1 state: up speed: 1000 Mbps duplex: full mac: 80:fa:5b:15:5a:93                                                                
           Card-2: Intel Wireless 7265                                                                                                                
           IF: N/A state: N/A mac: N/A                                                                                                                
Drives:    HDD Total Size: 2250.5GB (1.0% used)                                                                                                       
           ID-1: /dev/sda model: Samsung_SSD_850 size: 250.1GB                                                                                        
           ID-2: USB /dev/sdb model: M3_Portable size: 2000.4GB                                                                                       
Partition: ID-1: / size: 37G used: 15G (42%) fs: ext4 dev: /dev/sda4                                                                                  
           ID-2: /boot size: 735M used: 79M (12%) fs: ext4 dev: /dev/sda2                                                                             
           ID-3: swap-1 size: 8.00GB used: 0.00GB (0%) fs: swap dev: /dev/sda3                                                                        
Sensors:   System Temperatures: cpu: 44.0C mobo: N/A                                                                                                  
           Fan Speeds (in rpm): cpu: N/A                                                                                                              
Info:      Processes: 238 Uptime: 38 min Memory: 1961.7/15934.9MB Client: Shell (bash) inxi: 2.3.5
I use Refind to manage UEFI boot entries, dual boot with Windows 10.

Code: Select all

Apt tweaks:
/etc/apt/preferences.d/00_all
Package: *
Pin: release a=stable
Pin-Priority: 1000

Package: *
Pin: release a=unstable
Pin-Priority: 2

Code: Select all

/etc/apt/preferences.d/01_Firefox
ackage: firefox
Pin: release a=unstable
Pin-Priority: 1001

Package: libfontconfig1
Pin: release a=unstable
Pin-Priority: 1001

Package: fontconfig-config
Pin: release a=unstable
Pin-Priority: 1001

Package: libnss3
Pin: release a=unstable
Pin-Priority: 1001
I've tried the following to get it to work:

https://wiki.debian.org/Bumblebee

The Bumblebee howto with nvidia drivers (sudo apt-get install bumblebee-nvidia primus)
With the i:386 packages for compatibility with steam etc.
The setup gave me the message which I come across online a lot; that the setup of nvidia warns about nouveau but that a reboot should fix it.

But then after reboot, the screen is black. No keyboard response, no mouse, only a forced shutdown works.


After purging everything nvidia and bumblebee like from the rescue command line, I could log back in to plasma.


So I thought maybe manually installing the Nvidia drivers from the website might work, same result.
so I --uninstall'd the drivers and, I got things working again.


Figuring out how to restore took me a while and I tried several small things along the way which I can't remember. Nothing too fancy. It seems that the dance of installing the bumblebee-nvidia package, then discovering the system halts on next boot and purging everything nvidia, is something that a lot of people go through. I decided to install primus bumblebee without nvidia, this seemed to work since I can

Code: Select all

cat /proc/acpi/bbswitch
and I see the light on my laptop, which indicates the status of the dedicated Nvidia card, turn on, then after a while, turn off again.



This post helped me get the Intel driver up, since I noticed that wasn't even the case
http://forums.debian.net/viewtopic.php? ... e&start=15

I added:

Code: Select all

/etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
    Identifier  "Intel Graphics"
    Driver      "intel"
    Option      "AccelMethod"    "sna"
    Option      "TearFree"    "true"
EndSection
Now, when I boot and I run optirun inxi -G, the X server restarts and the GPU indicator light on my laptop lights up! It's something, so I'm making progress.


Earlier on I followed this howto:
https://www.pcsuggest.com/install-and-c ... in-debian/

Which told me to install virtualgl as a bridge, I'm going to try removing it and reboot. See what happens.
Seems like after the reboot I have the same effect. X server restarts, nothing happens.



So I tried bumblebee-nvidia again and this time when I reboot, the screen stays black but I do have the option to go to TTY1-7, where 7 is just blank.
I tried startx, which complained about kdeinit(5) having trouble. After purging nvidia again and rebooting into X, my panel was on the wrong monitor and I had to reconfigure a new one.

So... Seems like I'm missing something crucial to get to the sweet spot. Some configuration file or a combination of config files?

Apologies upfront if I forgot to post anything relevant to the issue. Just ask and I'll deliver!

Anyone like to help? :D

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Bumblebee - Core i7-4720HQ - GTX980M - Having trouble

#2 Post by bw123 »

...with KDE Plasma 5.8.6. Everything works splendid. No tearing, no freezes, but I can't for the life of me figure out how to get my integrated dedicated Nvidia 980M working.
I have had trouble getting two cards working also with KDE on stretch, or an integrated with an add-in card. The X configuration I used for years doesn't work anymore. You apparently can't have two devices with two separate X screens anymore. Kwin_X11 wants to merge two outputs of the same card into one 'virtual' screen, whatever that is.

I recall there was a similar issue on jessie, then awhile later it got fixed with a big update, I hope that happens again.

If you solve this, and can explain it to me my hat is off to you. I spent weeks trying to get it resolved, but multi monitor with separate devices is broke on stretch plasma from what I can see. This may be related to why you are having trouble with your setup, an integrated and a 'discreet' device?

p.s. my old X config still works fine on fluxbox, have you tried a window manager setup?
resigned by AI ChatGPT

c-tz
Posts: 5
Joined: 2018-02-11 20:19

Re: Bumblebee - Core i7-4720HQ - GTX980M - Having trouble

#3 Post by c-tz »

Hi bw123,

Thanks for your reply. I have a couple of assumptions made about the workings of this setup, which might not necessarily be true. Please correct me if I'm wrong:

- I have a setup where I have an integrated Nvidia980M working with the GPU in my i7-4720HQ (the 'discrete' one, or as I put it earlier, the 'standard' device), which is my default output GPU.

- I have two monitors, monitor in the laptop and an external HDMI one.

- I can offload rendering work to the Nvidia card, which communicates its output to the i7-4720HQ, displaying it on the screen.

- I assume I don't need a separate X window server running, but that X is smart enough to do it's work in the background and then display its output in a seperate window.


I used to have a setup once, like the one you're describing, where I had two cards (one ATI Radeon and a simple one, can't remember what brand) where I had two seperate X servers running, each on it's own monitor. That was years ago, a decade and some, when I first started experimenting with Linux. It seems all knowledgefrom that period of time is lost and I haven't spend serious time playing around with desktop setups since. Once in a while I install a graphical frontend and when it works out of the box without tearing or freezes I just keep my hands of it and do simple stuff like watching series or browsing, email. No gaming anymore. If I find that there's tearing or freezes I just try other desktops/window managers/ distro's and hope they work. If not, there's always M$ Windows. It's just far too much of a hassle trying to get around software rendering and into driver setup for Nvidia cards. I simply didn't have the time and energy. Patience, fortunately, I have enough.
p.s. my old X config still works fine on fluxbox, have you tried a window manager setup?
I've always had the impression that window managers like sddm, the one which comes with KDE plasma, don't have that much to do with how output from GPU's is handled, since their job is "dressing" the windows generated by X and translating output for compositing and being a frontend for things like OpenGL. Am I wrong?

I've spend 4 days now getting back into it. I forgot how complicated this stuff is hahah! I feel like I don't understand the inner workings of X and its relation to window managers enough anymore to make a good analysis of the problem at hand and so I'm just trying to solve this by trial and error. It feels like starting from scratch.


Offtopic: Might Wayland be a solution? Is it ready for daily usage or still in development?

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Bumblebee - Core i7-4720HQ - GTX980M - Having trouble

#4 Post by bw123 »

- I assume I don't need a separate X window server running, but that X is smart enough to do it's work in the background and then display its output in a seperate window.
I used to have a setup once, like the one you're describing, where I had two cards (one ATI Radeon and a simple one, can't remember what brand) where I had two seperate X servers running, each on it's own monitor. That was years ago, a decade and some, when I first started experimenting with Linux.
Two cards don't require two servers. Multiple devices can be assigned by the X server to displays that increment, ie, :0.0, :0.1, :0.2

This is what kwin_X11 is giving me trouble with. Multi head, or what some call multi-seat. It still works as it should on a simple window manager setup. Some searches I did said this is an issue with the way kwin communicates with dbus, or vice-versa. The two use only the main display :0 and cannot pass the 'node' and this is of course necessary for any working multi head or multi seat setup. All I can get Kwin_X11 to do for me so far is extended desktop using one device. There's really no point to me in having multiple monitors that all share the same screen or workspace. That completely takes away the benefit of multiple workspaces.

An X window manager that can't manage windows on multiple displays is pretty lame. It's a single station manager, and X can do so much more than that. I'm really surprised in a way, but yeah maybe wayland has taken up time or changed direction of the project. That's hard to say for sure.

All I know about wayland is it is coming, rumor is it might fix everything for everybody, but you know, I have my doubts. Every time there is some new whiz-bang thing, it seems to be a step backwards lately for users.

Try another window manager with no display manager on the same hardware.
Last edited by bw123 on 2018-02-13 16:43, edited 1 time in total.
resigned by AI ChatGPT

User avatar
Ardouos
Posts: 1075
Joined: 2013-11-03 00:30
Location: Elicoor II
Has thanked: 1 time
Been thanked: 4 times

Re: Bumblebee - Core i7-4720HQ - GTX980M - Having trouble

#5 Post by Ardouos »

The setup gave me the message which I come across online a lot; that the setup of nvidia warns about nouveau but that a reboot should fix it.

But then after reboot, the screen is black. No keyboard response, no mouse, only a forced shutdown works.


After purging everything nvidia and bumblebee like from the rescue command line, I could log back in to plasma.
I had this issue with my laptop, adding acpi_osi="!Windows 2015" to grub should work.

This post may help.
http://forums.debian.net/viewtopic.php?f=6&t=136344

It is also worth mentioning that using the liquorix kernel seems to work wonders for optimus setups.
There is only one Debian | Do not break Debian | Stability and Debian | Backports

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

c-tz
Posts: 5
Joined: 2018-02-11 20:19

Re: Bumblebee - Core i7-4720HQ - GTX980M - Having trouble

#6 Post by c-tz »

I forgot to mention that I already tried 2009 and 2015 acpi option at boot with grub, but not yet with the intel driver installed also. Maybe it's worth a try, but I'm not too hopeful.

I remember reading about the liquorix kernel, but I'm not too sure about what issues might arise when I install it.

I remember your username from other posts about the same subject!

Have you tried the liquorix kernel?? Anyone with experience?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Bumblebee - Core i7-4720HQ - GTX980M - Having trouble

#7 Post by stevepusser »

You'll have to use a backported Liquorix kernel, since the official one's headers require gcc-7, and Stretch has gcc-6.

https://techpatterns.com/forums/about2615.html

Since they moved the thread to a "sticky", I can't edit the title. Liquorix now also has a PPA, so I don't build any Ubuntu versions except 14.04. I don't have any issue running the current 4.14 kernel, but be aware that you'll have to get some third party drivers such as broadcom-sta and Nvidia from the stretch-backports repo to build on such a new kernel.

Code: Select all

uname -a
Linux mx1 4.14.0-18.2-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix 4.14-25~mx17+1 (2018-02-11) x86_64 GNU/Linux
For what it's worth, we've already got Nvidia, ndiswrapper, broadcom-sta, and Virtual Box building on a 4.15 kernel. Ndiswrapper needs to be 1.60-6, and I had to cherry-pick a couple patches from Ubuntu 18.04 for broadcom-sta to get that to build. Upstream Debian should pick up those patches shortly, though.
MX Linux packager and developer

User avatar
Ardouos
Posts: 1075
Joined: 2013-11-03 00:30
Location: Elicoor II
Has thanked: 1 time
Been thanked: 4 times

Re: Bumblebee - Core i7-4720HQ - GTX980M - Having trouble

#8 Post by Ardouos »

c-tz wrote:I forgot to mention that I already tried 2009 and 2015 acpi option at boot with grub, but not yet with the intel driver installed also. Maybe it's worth a try, but I'm not too hopeful.
In the boot parameter, you will need to change the default parameter or it won't work (for me at least).
From :

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet"
To:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT='quiet acpi_osi="!Windows 2015"'
c-tz wrote: Have you tried the liquorix kernel?? Anyone with experience?
Yes, I'm using it now and it works wonders. I am using Stevepusser's repo as it has been built to work with Jessie and Stretch.

I'll fish out my guide I wrote for my laptop for the hope it helps others.
There is only one Debian | Do not break Debian | Stability and Debian | Backports

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

User avatar
Ardouos
Posts: 1075
Joined: 2013-11-03 00:30
Location: Elicoor II
Has thanked: 1 time
Been thanked: 4 times

Re: Bumblebee - Core i7-4720HQ - GTX980M - Having trouble

#9 Post by Ardouos »

This is how I build my laptop:

Code: Select all

$ inxi -M
Machine:   Device: laptop System: PC Specialist Limited product: N15_17RD
           Mobo: CLEVO model: N15_17RD UEFI: American Megatrends v: 1.05.15 date: 06/06/2016
Battery    BAT0: charge: 43.3 Wh 85.7% condition: 50.5/56.0 Wh (90%)

Code: Select all

$ inxi -G
Graphics:  Card-1: Intel HD Graphics 530
           Card-2: NVIDIA GM107M [GeForce GTX 960M]
           Display Server: X.Org 1.19.2 drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.02hz
           GLX Renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2) GLX Version: 3.0 Mesa 13.0.6
Installation:
  • #Install Debian 9

    #Run from Installer and enter rescue mode. Mount /dev/sda2 as root and chroot onto the system. (I do this step to install the Liquorix kernel. Otherwise when I shutdown the machine normally with Debian's kernel, the system refuses to shutdown unless I run sysrq.)

    #Install Liquorix Kernel and Headers– For Debian 8 and 9 or For Debian Testing/Unstable.

    #Backported Nvidia drivers

    #Backported Linux Non-free firmware

    #If you have an Intel card - Added the options iwlwifi 11n_disable=1 to make Wi-Fi work more reliably. I have a Intel Wireless 8260 card.

    #Installed virtualgl, it is needed for bumblebee to work.

    #Installed bumblebee and bumblebee nvidia. Bumblebee configurations may vary on setup and configure.

    #Added the boot parameter: acpi_osi="!Windows 2015" to grub.
    From:

    Code: Select all

    GRUB_CMDLINE_LINUX_DEFAULT=”quiet”
    To:

    Code: Select all

    GRUB_CMDLINE_LINUX_DEFAULT='quiet acpi_osi="!Windows 2015"'
    #OPTIONAL: You can turn watchdog timer off by going into /etc/systemd/system.conf and changing watchdog timer to 0.

    #It is also noteworthy that I do not have tlp or laptop-mode-tools installed.

    #I have had some mild success by adding i915.preliminary_hw_support=1 as a boot parameter. It enables support for Intel HD Graphics, but I currently do not need it as I do not seem to have the issues with kernel 4.14+.
This setup works for me, but YMMV. Some users may not need to install virtualgl or backport packages etc...
There is only one Debian | Do not break Debian | Stability and Debian | Backports

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply