You are not logged in.

#1 2018-03-21 01:25:03

theburritoeater
Member
Registered: 2018-03-21
Posts: 9

KDE Having Issues Outputting to Two Monitors, and Switching GPU

Hello ArchLinux users,
I have been trying to caress my install of Arch to work on my Optimus enabled laptop, a Gigabyte Aero 14

The machine has an NVIDIA GTX-1060Ti as well as the usual Intel Integrated Graphics, and I am running KDE Plasma 5 on Kernel 4.15.10-1-ARCH .

As many of you already know, configuring switchable graphics in Linux can be a pain, it definitley has been for me during the past two weeks trying to get this to work.
My goal is to have at minimum: just the Intel card and drivers active with the ability to work either on my laptop screen, or on my two dual ASUS Monitors.
Optimally: having the above mentioned compatibility along with the availability to run an application with my GPU if I need to is what I really am aiming for.

I have tried disabling the NVIDIA card, though when I do this, I am not able to connect to external displays.  Even with my HDMI and DP connected, xrandr will tell me:

Screen 0: minimum 8 x 8, current 2560 x 1440, maximum 32767 x 32767
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
eDP-1-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 310mm x 174mm
   2560x1440     60.00*+  59.99    59.99    59.96    59.95  
   ...
   ...
   320x180       59.84    59.32  
DP-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)

note: above I replaced the long list of possible resolution outputs with '...' to save clutter, if it is important I can post immediately

I have already tried working with bumbleebee, but not only do I prefer to work with nvidia-xrun (better performance), but I have not been able to get a bumbleebee configuration to boot in the first place after following the wiki.
I have also tried working with the nouveau drivers which have yielded more frustrating experiences. 

I followed the wiki's instructions to install and configure nvidia-xrun
The current packages I have installed from following the wiki are:

  • bbswitch 0.8-118

  • nvidia 390.42-3

  • nvidia-utils 390.42-1

  • nvidia-xrun 0.3-0

  • xorg and xorg-server

and I installed nvidia-settings at one point to try and get my dual monitors working.
At first, the NVIDIA card wouldn't even start when summoned by

nvidia-xrun [application] 

and I was getting various issues which I fixed with a little Googling and adding this line to my boot parameters:

 GRUB_CMDLINE_LINUX_DEFAULT="quiet pcie_port_pm=off acpi_osi=Linux" 

After completing setup, I noticed three main problems: 

  1. I cannot turn the NVIDIA card off with bbswitch commands, it is on all the time

  2. If I turn the NVIDIA card off in BIOS, system will not boot (bbswitch complains with an ERROR)

  3. When I boot into KDE, I still cannot detect or output to my monitors. 

Interestingly enough, when I was able to run an application by starting up on TTY2 and typing

 nvidia-xrun [application] 

, my monitors would turn on and I would be running the app on my monitors instead of my laptop screen (with dual screen functionality)

Later on I added a  parameter to a configuration file and my OS just stopped booting, unfortunatley that was the one thing I didin't take notes on so I don't remember exactly what I did.  However, I have the text from the following files linked to individual pastebins if desired:

The only (weird) way I can get into my desktop now is by continually rebooting until I can sneak into a TTY2, login, then type

 nvidia-xrun startkde 

and Plasma is started and runs on my GPU.
I say "sneak" into a TTY2 because there has consistently been an ACPI error when booting my install of Arch since day 1.  It hasn't caused any issues, but now sometimes it displays the errors, then freezes, prompting me to perform a cold shutdown.  If I press Ctrl+Alt+F2 quick enough I can bypass the freeze and get a working terminal.
So evidently, accessing and running applications from my GPU is working to some degree.  Sadly, I cannot boot normally into KDE, and I cannot attach dual displays to KDE when I am running on my Intel driver when I disable my NVIDIA in BIOS or when I was able to boot normally with GPU on standby, with it ready to be "woken up" by nvidia-xrun

Last but not least, here is my output from

 lshw -c video 

:

 *-display                 
       description: VGA compatible controller
       product: GP106M [GeForce GTX 1060 Mobile 3GB]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:137 memory:de000000-deffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:df000000-df07ffff
  *-display
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 04
       width: 64 bits
       clock: 33MHz
       capabilities: vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:122 memory:dd000000-ddffffff memory:b0000000-bfffffff ioport:f000(size=64) memory:c0000-dffff

This problem is evidently very buggy and tricky, and any hep would be greatly appreciated, as I am very determined to get this working, thanks.

Offline

#2 2018-03-21 07:05:04

seth
Member
Registered: 2012-09-03
Posts: 51,233

Re: KDE Having Issues Outputting to Two Monitors, and Switching GPU

As many of you already know, configuring switchable graphics in Linux can be a pain

No.
Follow https://wiki.archlinux.org/index.php/Bumblebee
nvidia-xrun will NOT get you to

Optimally: having the above mentioned compatibility along with the availability to run an application with my GPU if I need to is what I really am aiming for.

as is pointed out in https://wiki.archlinux.org/index.php/NVIDIA_Optimus

And especially remove that bogus /etc/X11/xorg.conf
Wtf does everybody and esp. with an optimus system believe it's a good idea to let nvidia write a generic X server config full of crufted bullshit? Is there some stupid askubuntu thread about this or something?

What it does is to want to load the nvidia driver for the default X11 server (ever) what's not going to work if you blacklisted the nvidia kernel module.
Also

nvidia-xrun startkde

is terribly pointless - you're running your desktop session on the GPU.

Read the linked wiki articles (I know you didn't so far) and return if you've remaining issues.

Offline

#3 2018-03-21 16:21:48

theburritoeater
Member
Registered: 2018-03-21
Posts: 9

Re: KDE Having Issues Outputting to Two Monitors, and Switching GPU

seth, thank you for your reply.
To ensure I am following your suggestions clearly, I did a full fresh install of Arch, and followed the steps provdided by the Bumblebee article on the wiki.
Before instaling Bumblebee, as expected, KDE would not boot with my GPU on.  After installing bumblebee and others, things started working.  I tested my installation with the steps on the wiki and all is working.

However I still have the issue of not being able to connect to my dual external displays when they are plugged in. When I am using my dual displays, I want my laptop screen to be off, and my dual screens on.
I was reading the Github post on Bumblebee, but I am a bit confused in following their instructions.
The section I believe is relevant to me is Desktop on external monitor (wired to the nvidia chip) and dual-screen with laptop, as I believe m external outputs go straight to my NVIDIA card. 

When I wish to dock my laptop at my desk with my monitors and make my display switch, what are the main things that will be happening concerning the X server and bumblebee? 
The way I understand currently is that:
-X server will stop on my laptop screen
-I will need to restart another X using NVIDIA with my displays plugged in

I also don't understand what this will do (taken from the Github post), or what the "openGL library path" is:

the OpenGL library path must be set to nvidia' libGL.so directory

Likewise continuing to follow the Github post, I am not sure what

 export your nvidia library export LD_LIBRARY_PATH=/usr/lib32/nvidia:/usr/lib/nvidia:$LD_LIBRARY_PATH

will really do either.  What is the 'nvidia library export?'

And lastly, the post instructs me to create a

/etx/X11/xorg.conf

file as they specify, however I want to be sure I understand these steps and what each one does fully before doing so, as I am confident this file is what broke my system last time from your post.
The Github post also tells me that I would need to kill bumblebee and set my graphics card ON with bbswitch, however I do not have bbswitch installed because I wanted to adhere as strictly as possible to the official Arch Wiki's instructions which did not require bbswitch.

Thank you, seth, for your help in getting my system to boot with the GPU turned on and clearning up some confusion about xrun and the X11 server.  Now I just need to understand what connecting to my dual displays entails, the documentation above, and I will write a bash script if needed to help with switching between my laptop screen and my monitors when I come home and dock my computer.

Last edited by theburritoeater (2018-03-21 16:26:04)

Offline

#4 2018-03-24 20:46:33

seth
Member
Registered: 2012-09-03
Posts: 51,233

Re: KDE Having Issues Outputting to Two Monitors, and Switching GPU

Sorry for the delay.
Afaik you'll have to run the nvidia chip permanently in order to use outputs on the GPU - this may not be the case w/ nouveau and https://wiki.archlinux.org/index.php/PR … erse_PRIME
So if your desire is to use the nvidia outputs, you can basically forget about

just the Intel card and drivers active with the ability to work either on my laptop screen, or on my two dual ASUS Monitors

---

That line lacks a colon or so

export LD_LIBRARY_PATH=/usr/lib32/nvidia:/usr/lib/nvidia:$LD_LIBRARY_PATH

Offline

Board footer

Powered by FluxBB