FS#47151 - xorg-server 1.18 and Nvidia Optimus
Attached to Project:
Arch Linux
Opened by Jamp (jamp) - Sunday, 22 November 2015, 23:21 GMT
Last edited by Laurent Carlier (lordheavy) - Wednesday, 24 February 2016, 19:27 GMT
Opened by Jamp (jamp) - Sunday, 22 November 2015, 23:21 GMT
Last edited by Laurent Carlier (lordheavy) - Wednesday, 24 February 2016, 19:27 GMT
|
Details
Description:
Disabling switchable graphics does not work anymore With the xorg upgrade I downloaded this morning the instructions to disable the switchable graphics (https://wiki.archlinux.org/index.php/NVIDIA_Optimus) do not work anymore My xorg.conf is as below ///////////////////////////////////////////////////////////// Section "ServerLayout" Identifier "Layout0" Inactive "intel" Screen 0 "NVIDIA" InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" EndSection Section "Files" EndSection Section "InputDevice" # generated from default Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/psaux" Option "Emulate3Buttons" "yes" EndSection Section "InputDevice" # generated from default Identifier "Keyboard0" Driver "kbd" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Unknown" Option "DPMS" EndSection Section "Device" Identifier "nvidia" Driver "nvidia" VendorName "NVIDIA Corporation" Option "AllowEmptyInitialConfiguration" BusID "PCI:1:0:0" EndSection Section "Device" Identifier "INTEL" Driver "modesetting" Option "AccelMethod" "none" BusID "PCI:0:2:0" EndSection Section "Screen" Identifier "NVIDIA" Device "nvidia" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Depth 24 EndSubSection EndSection Section "Screen" Identifier "INTEL" Device "intel" EndSection //////////////////////////////////////////////////////////////////////////////// Additional info: * package version(s) * config and/or log files etc. Steps to reproduce: |
This task depends upon
Closed by Laurent Carlier (lordheavy)
Wednesday, 24 February 2016, 19:27 GMT
Reason for closing: Fixed
Additional comments about closing: See comments
Wednesday, 24 February 2016, 19:27 GMT
Reason for closing: Fixed
Additional comments about closing: See comments
Xorg.1.log (29.7 KiB)
Been up all night troubleshooting, found out that if you don't specify Screen 1 it will log in Xorg.*.log that there are no configurations for Screen 1. Also found out xorg-xrandr utility is version 1.4.3 and Server randr package is 1.5 (Maybe this could be the culprit).
I also found out that if using Screen 1, LightDM would start but I only get a black screen with a single pixel dot in the upperleft corner. I can use my password to log-in blindly but after that X session crashes and I'll be returned to LightDM with the same screen of the single pixel dot.
Since this happened during configuration tasks after installing, I started over using Nouveau for now.
mesa-11.0.5-1
mesa-libgl-11.0.5-1
xf86-input-evdev-2.10.0-1
xf86-input-synaptics-1.8.2-2
xf86-video-intel-1:2.99.917+478+gdf72bc5-2
xf86-video-vesa-2.3.4-1
xorg-server-1.17.4-2
xorg-server-common-1.17.4-2
xorg-server-xvfb-1.17.4-2
Perhaps someone may need this list :)
Best Regards,
PS @Sven-Hendrik - you refer to PRIME?
cd /var/cache/pacman/pkg/
sudo pacman -U xorg-server-1.17.4-2-x86_64.pkg.tar.xz xf86-input-evdev-2.10.0-1-x86_64.pkg.tar.xz xf86-input-synaptics-1.8.3-1-x86_64.pkg.tar.xz
Related forum thread which mentioned the workaround:
https://bbs.archlinux.org/viewtopic.php?pid=1581775
Hope someone will fix the xorg-server package soon...
If you want to be able to upgrade your system in the meantime, add this line to /etc/pacman.conf:
IgnorePkg = xorg-server xf86-input-evdev xf86-input-synaptics
Downgrade then add this to /etc/pacman.conf :
IgnorePkg = xf86-input-evdev xf86-input-joystick xf86-input-keyboard xf86-input-mouse xf86-input-synaptics xf86-input-void xf86-video-intel xf86-video-vesa xorg-server xorg-server-common xorg-server-xephyr
Wait for an Optimus support.
Notebook Model: HP ZBook 15 G2 Basic
graphics card: NVIDIA Quadro K2100M
CPU: Intel Core i7-4810MQ 4C
- xorg-1.17 + nvidia-358.16 works
- xorg 1.18 + nvidia-358.16 doesn't work
According to http://us.download.nvidia.com/XFree86/Linux-x86/358.16/README/randr14.html you only need a configuration such as:
% cat /etc/X11/xorg.conf
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:4:0:0"
Option "AllowEmptyInitialConfiguration"
EndSection
with:
% lspci|grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
04:00.0 VGA compatible controller: NVIDIA Corporation GK208M [GeForce GT 730M] (rev a1)
This simple configuration actually allows to start both xorg 1.17 and xorg 1.18. With xorg 1.18 it has the exact same effect as replacing "Screen 0" with "Screen 1" in the old configuration.
The undesirable effects I personally noticed within a few seconds are:
- dmenu broken: it doesn't show up all the time, most likely on another screen I can't see (I'm using i3, starting X with a startx)
- running Steam will popup 1/4 of the login window on the top left of the screen
- games ran by steam such as CS:GO will be extremely confused by the screen layout and you are simply not be able to play
In order to rollback:
% cd /var/cache/pacman/pkg
# pacman -U xf86-input-evdev-2.10.0-1-x86_64.pkg.tar.xz xf86-input-keyboard-1.8.1-1-x86_64.pkg.tar.xz xf86-input-mouse-1.9.1-1-x86_64.pkg.tar.xz xf86-input-vmmouse-13.1.0-1-x86_64.pkg.tar.xz xf86-input-void-1.4.1-1-x86_64.pkg.tar.xz xf86-video-ark-0.7.5-6-x86_64.pkg.tar.xz xf86-video-ati-1:7.5.0-2-x86_64.pkg.tar.xz xf86-video-dummy-0.3.7-4-x86_64.pkg.tar.xz xf86-video-fbdev-0.4.4-4-x86_64.pkg.tar.xz xf86-video-glint-1.2.8-6-x86_64.pkg.tar.xz xf86-video-i128-1.3.6-6-x86_64.pkg.tar.xz xf86-video-intel-1:2.99.917+478+gdf72bc5-2-x86_64.pkg.tar.xz xf86-video-mach64-6.9.5-1-x86_64.pkg.tar.xz xf86-video-neomagic-1.2.9-1-x86_64.pkg.tar.xz xf86-video-nouveau-1.0.11-3-x86_64.pkg.tar.xz xf86-video-nv-2.1.20-6-x86_64.pkg.tar.xz xf86-video-openchrome-0.3.3-5-x86_64.pkg.tar.xz xf86-video-r128-6.10.0-1-x86_64.pkg.tar.xz xf86-video-savage-2.3.8-1-x86_64.pkg.tar.xz xf86-video-siliconmotion-1.7.8-1-x86_64.pkg.tar.xz xf86-video-sis-0.10.8-1-x86_64.pkg.tar.xz xf86-video-tdfx-1.4.5-6-x86_64.pkg.tar.xz xf86-video-trident-1.3.7-1-x86_64.pkg.tar.xz xf86-video-vesa-2.3.4-1-x86_64.pkg.tar.xz xf86-video-vmware-13.1.0-2-x86_64.pkg.tar.xz xf86-video-voodoo-1.2.5-6-x86_64.pkg.tar.xz xorg-server-1.17.4-2-x86_64.pkg.tar.xz
And to prevent further upgrades, "IgnoreGroup = xorg" in /etc/pacman.conf is enough.
I didn't find any related Xorg bug report. Is anyone actually aware of anything on the Xorg side?
Note: this bug severity should be at least High.
To get rid of undesirable effects you mentioned add
Option "nvidiaXineramaInfo" "False"
to xorg.conf's "Device" section.
I guess it's i3 related.
That indeed works pretty well. Thanks.
Edit: actually... firefox is completely broken (left click not working, UI half dead, ...). Not sure if it's because of the xinerama thing or not.
My hardware: Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz + Nvidia Geforce GTX 860M.
Reproducing the bug is pretty easy with Firefox: left click simply doesn't respond, or clicking toolbar buttons such as the preferences are ignored (the hover event is working though).
The list of packages which I'm currently running:
mesa-11.1.0-2
mesa-libgl-11.1.0-2
xf86-input-evdev-2.10.0-3
xf86-input-synaptics-1.8.3-2
xf86-video-intel-1:2.99.917+519+g8229390-1
xf86-video-vesa-2.3.4-2
xorg-server-1.18.0-3
xorg-server-common 1.18.0-3
xorg-server-xvfb 1.18.0-3
nvidia 358.16-3
nvidia-utils 358.16-1
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:4:0:0"
Option "AllowEmptyInitialConfiguration"
EndSection
==> dmenu+steam broken
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:4:0:0"
Option "AllowEmptyInitialConfiguration"
Option "nvidiaXineramaInfo" "False"
EndSection
==> firefox broken
Same result. GTK3 apps, dmenu, steam still broken.
Option "nvidiaXineramaInfoOverride" "1366x768+0+0, 1366x768+1366+0, 1366x768+0+768, 1366x768+1366+768"
EDIT: Maybe someone should add aplattner to the CC list as he has an account here.
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:4:0:0"
Option "AllowEmptyInitialConfiguration"
#Option "nvidiaXineramaInfo" "False"
Option "nvidiaXineramaInfoOverride" "1920x1080+0+0, 1920x1080+1920+0, 1920x1080+0+1080, 1920x1080+1920+1080"
EndSection
Note1: "nvidiaXineramaInfoOverride" "1920x1080+0+0" isn't enough for some reason, the whole thing looks necessary.
Note2: in the .xinitrc, I also need disable the laptop monitor if I use an external one (otherwise I get huge lag/glitches in the top of the screen). It looks like this:
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
xrandr --output eDP-1 --off
Thanks Alex for the workaround. I'm curious about what the XineramaInfo we are overriding actually look like though...
My /etc/X11/xorg.conf.d/20-nvidia.conf :
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "DPI" "96 x 96"
Option "AllowEmptyInitialConfiguration"
Option "Coolbits" "31"
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefault=0x1; PowerMizerDefaultAC=0x1"
Option "nvidiaXineramaInfoOverride" "1600x900+0+0, 1600x900+1600+0, 1600x900+0+900, 1600x900+1600+900"
EndSection
Fullscren window apps are a bit broken, they don't respect my tint2 bar (evertyime bedhind it... now i use autohide option to pass this).
I frequently connect my laptop to different screens at work & at home, so the nvidiaXineramaInfoOverride workaround is bound to be a PITA.
Could it be that nvidia-libgl doesn't play nicely with X 1.18?
For anyone looking to reproduce it before the official package is out here is what I did:
- pulled xorg-server from abs
- bumped the pkgver to 1.18.1
- disabled the patches
- removed the dependency on mesa-libgl since I have nvidia-libgl installed
- built, installed, rebooted
packages are in testing. Are you using modesetting or intel driver?
I'm using modesettings. Good to hear the packages have hit testing, hopefully this fixes everyone else's issue as it did mine.
$pacman -Q xorg-server nvidia nvidia-libgl :(
xorg-server 1.18.1-2
nvidia 361.28-1
nvidia-libgl 361.28-1
I tried the basic config:
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "AllowEmptyInitialConfiguration"
EndSection
Can you please test with eclipse software and confirm whether it opens well and paste your config file?
https://devtalk.nvidia.com/default/topic/775691/linux/vsync-issue-nvidia-prime-ux32vd-with-gt620-m-/5
Apparently this was fixed in xorg git:
https://bugs.freedesktop.org/show_bug.cgi?id=92313
EDIT: Actually this is in Xorg 1.18.1, so might not be fixed.
This patch isn't included in xorg-server-1.18.1
I will push a new release in testing with this patch applied, please test (xorg-server-1.18.1-3)
I did have to remove some old symlinks and re-install libglvnd as there were some old symlinks screwing things up for me under /usr/lib/ (mainly for files like libGL.so.1 & libEGL.so) but once I did that and used the basic config everything started OK.
@Munzir I tested eclipse. I just opened a project and resized the main window - worked fine.
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
# Change BusID if necessary. Tips: (lspci | grep 3D) (Change 01:00.0 to 1:0:0)
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration" "Yes"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
# Change BusID if necessary. Tips: (lspci | grep VGA) (Change 00:02.0 to 0:2:0)
BusID "PCI:0:2:0"
Option "AccelMethod" "none"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
This works fine with xorg-server-1.17.4-2.
Update your xorg.conf read the wiki.