Nvidia Optimus laptop, nouveau & external monitor

Kernels & Hardware, configuring network, installing services

Nvidia Optimus laptop, nouveau & external monitor

Postby BhooshanAJ » 2019-11-11 11:59

Laptop : ASUS TUF FX504GM. (i7 8750H & Nvidia GTX 1060)
Problem : My external monitor is not visible in the Display options.
I have been trying to solve this on my own. Therefore I changed some of the non relevant stuff to tiny font.
I have tried installing from both live CD and net install.

I have read the documentation but it's still a little confusing and I have some questions before I go ahead and do a fresh install this time using a net install.


My usual process of install is to install the base system and then manual install in this order..
Code: Select all
apt install gcc g++ make cmake automake curl wget sudo linux-headers-$(uname -r) xorg xserver-xorg-core
reboot
apt install gdm3 gnome-core mariadb-server mariadb-client python3
reboot

and some icons, themes & gnome extensions etc after boot.
I have read that bumblebee doesn't allow the use of external monitor. But it also mentioned it can do that with nouveau.

I have read the arch/Manjaro wiki on the subject and some mention using reverse PRIME to do this. But again... I don't know if that would be the best course of action.
When I tried Manjaro live CD the monitor seems to get detected. But the display is just a haze of colours.

Oddly. When I boot Debian LIVE cd the debian splash logo shows up on both my screens perfectly fine. (with or without acpi=off)
Another anomoly is that most times.. I have to boot Debian live CD with acpi=off.


This is my system info when I tried MX Linux recently.
Code: Select all
System:    Host: HomeLT Kernel: 4.19.0-6-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0
           parameters: BOOT_IMAGE=/boot/vmlinuz-4.19.0-6-amd64
           root=UUID=c3cf7cf3-60b4-4639-af2a-63e8a397f5d8 ro quiet splash
           Desktop: Xfce 4.14.1 tk: Gtk 3.24.5 info: xfce4-panel wm: xfwm4 dm: LightDM 1.26.0
           Distro: MX-19_x64 patito feo October 21  2019 base: Debian GNU/Linux 10 (buster)
Machine:   Type: Laptop System: ASUSTeK product: TUF GAMING FX504GM_FX80GM v: 1.0
           serial: <filter>
           Mobo: ASUSTeK model: FX504GM v: 1.0 serial: <filter> UEFI: American Megatrends
           v: FX504GM.308 date: 06/10/2019
Battery:   ID-1: BAT1 charge: 44.0 Wh condition: 44.0/48.1 Wh (91%) volts: 4.0/11.7
           model: ASUS A32-K55 type: Li-ion serial: <filter> status: Full
CPU:       Topology: 6-Core model: Intel Core i7-8750H bits: 64 type: MT MCP arch: Kaby Lake
           family: 6 model-id: 9E (158) stepping: A (10) microcode: B4 L2 cache: 9216 KiB
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 52992
           Speed: 900 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 901 2: 900 3: 900 4: 900
           5: 901 6: 900 7: 900 8: 900 9: 900 10: 900 11: 900 12: 900
           Vulnerabilities: Type: l1tf
           mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable
           Type: meltdown mitigation: PTI
           Type: spec_store_bypass
           mitigation: Speculative Store Bypass disabled via prctl and seccomp
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW,
           STIBP: conditional, RSB filling
Graphics:  Device-1: Intel UHD Graphics 630 vendor: ASUSTeK driver: i915 v: kernel
           bus ID: 00:02.0 chip ID: 8086:3e9b
           Device-2: NVIDIA GP106M [GeForce GTX 1060] vendor: ASUSTeK driver: N/A
           bus ID: 01:00.0 chip ID: 10de:1c20
           Display: x11 server: X.Org 1.20.4 driver: modesetting unloaded: fbdev,vesa
           resolution: 1920x1080~120Hz
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 630 (Coffeelake 3x8 GT2)
           v: 4.5 Mesa 18.3.6 compat-v: 3.0 direct render: Yes
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: ASUSTeK driver: snd_hda_intel v: kernel
           bus ID: 00:1f.3 chip ID: 8086:a348
           Sound Server: ALSA v: k4.19.0-6-amd64
Network:   Device-1: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi v: kernel
           port: 6000 bus ID: 00:14.3 chip ID: 8086:a370
           IF: wlan0 state: down mac: <filter>
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK
           driver: r8169 v: kernel port: 3000 bus ID: 03:00.0 chip ID: 10ec:8168
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:    Local Storage: total: 1.15 TiB used: 5.21 GiB (0.4%)
           ID-1: /dev/nvme0n1 vendor: Kingston model: RBUSNS8154P3256GJ size: 238.47 GiB
           block size: physical: 512 B logical: 512 B speed: 15.8 Gb/s lanes: 2 serial: <filter>
           rev: E8FK11.C scheme: GPT
           ID-2: /dev/sda vendor: Seagate model: ST1000LX015-1U7172 size: 931.51 GiB block size:
           physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter>
           rev: SDM1 scheme: GPT
           ID-3: /dev/sdb type: USB vendor: SanDisk model: Cruzer Blade size: 7.45 GiB
           block size: physical: 512 B logical: 512 B serial: <filter> rev: 1.26 scheme: GPT
Partition: ID-1: / raw size: 31.50 GiB size: 30.88 GiB (98.03%) used: 5.18 GiB (16.8%) fs: ext4
           dev: /dev/sda2
Sensors:   System Temperatures: cpu: 49.0 C mobo: 27.8 C
           Fan Speeds (RPM): cpu: 0
Repos:     No active apt repos in: /etc/apt/sources.list
           Active apt repos in: /etc/apt/sources.list.d/antix.list
           1: deb http://iso.mxrepo.com/antix/buster buster main
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
           1: deb http://deb.debian.org/debian buster-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list
           1: deb http://deb.debian.org/debian buster main contrib non-free
           2: deb http://deb.debian.org/debian-security buster/updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list
           1: deb http://mxrepo.com/mx/repo/ buster main non-free
           No active apt repos in: /etc/apt/sources.list.d/various.list
Info:      Processes: 303 Uptime: 3m Memory: 15.52 GiB used: 1.02 GiB (6.6%) Init: SysVinit
           v: 2.93 runlevel: 5 default: 5 Compilers: gcc: 8.3.0 alt: 8 Shell: bash v: 5.0.3
           running in: quick-system-in inxi: 3.0.36


The last time I did this. I installed bumblebee and primus and the laptop was unable to boot. Here are the pictures of the error it showed.
Again..sometimes... acpi=off would allow it to boot.

https://drive.google.com/open?id=1BMBNh ... rlIz_wXThX
BhooshanAJ
 
Posts: 7
Joined: 2018-03-11 18:28

Re: Nvidia Optimus laptop, nouveau & external monitor

Postby BhooshanAJ » 2019-12-04 11:41

I installed the nvidia-drivers.

and use this configuration

cat /etc/X11/xorg.conf.d/10-nvidia.conf
Code: Select all
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration"
EndSection

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

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection


My system now uses the following drivers.

glxinfo | grep OpenGL
Code: Select all
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 1060/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 430.64
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 430.64
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 430.64
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:


Trouble is now the laptop always runs on the external monitor.. I have to login and manually run
Code: Select all
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto


to make the laptop screen usable

xrandr --listproviders
Code: Select all
Providers: number : 2
Provider 0: id: 0x28d cap: 0x1, Source Output crtcs: 4 outputs: 1 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x43 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 1 associated providers: 1 name:modesetting


I tried putting these two commands in /etc/gdm3/init/Default file at the end.
exec xrandr --setprovideroutputsource modesetting NVIDIA-0
exec xrandr --auto

But that doesn't seem to work.


Without the X11 config file I get this

glxinfo | grep OpenGL
Code: Select all
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.2.4
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 19.2.4
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.2.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:



I tried changed the config to

Identifier "layout"
Screen 0 "intel"
Inactive "nvidia"

But that obviously wasn't going to work.

nouvaeu doesn't work. Laptop becomes unbootable without acpi=off

I just want to be able to use both my displays.

Also. Would you guys consider putting in strike through bbc code?
BhooshanAJ
 
Posts: 7
Joined: 2018-03-11 18:28


Return to System configuration

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable