View previous topic :: View next topic |
Author |
Message |
dustfinger Guru
Joined: 15 Aug 2004 Posts: 449
|
Posted: Thu Jul 13, 2017 2:04 pm Post subject: [/solved] Alienware 17 R4 Optimus no screens |
|
|
System: Alienware 17 R4
Problem: I can't get Optimus to work. When I run startx several things seem to go wrong and XServer shuts down. I have read through relevant chapters at /usr/share/doc/nvidia-drivers-384.47/README.bz2. I have read the gentoo wiki on optimus. I have read through the gentoo wiki on nvidia and the wiki on xorg. I am now reaching out to the community. Maybe someone knows exactly what the issue here is. Below is a list of relevant information about my current configuration.
logs
dmesg
Xorg.0.log
lspci
Code: |
$ sudo lspci
00:00.0 Host bridge: Intel Corporation Skylake Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 07)
00:01.2 PCI bridge: Intel Corporation Skylake PCIe Controller (x4) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 07)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #1 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #6 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #9 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
01:00.0 VGA compatible controller: NVIDIA Corporation GP104M [GeForce GTX 1070 Mobile] (rev a1)
3c:00.0 Ethernet controller: Qualcomm Atheros Killer E2400 Gigabit Ethernet Controller (rev 10)
3d:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
3e:00.0 Non-Volatile memory controller: Toshiba America Info Systems Device 0115 (rev 01)
|
From the kernel
Code: |
$ grep -i EXTRA_FIRMWARE /usr/src/linux/.config
CONFIG_EXTRA_FIRMWARE=""
$ grep -i drm /usr/src/linux/.config
CONFIG_DRM=y
CONFIG_DRM_MIPI_DSI=y
# CONFIG_DRM_DP_AUX_CHARDEV is not set
CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_KMS_FB_HELPER=y
CONFIG_DRM_FBDEV_EMULATION=y
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_AMDGPU is not set
# CONFIG_DRM_NOUVEAU is not set
CONFIG_DRM_I915=y
CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT=y
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_I915_GVT is not set
# CONFIG_DRM_VGEM is not set
# CONFIG_DRM_VMWGFX is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_QXL is not set
# CONFIG_DRM_BOCHS is not set
CONFIG_DRM_PANEL=y
CONFIG_DRM_BRIDGE=y
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
# CONFIG_DRM_LEGACY is not set
$ grep -i nvidia /usr/src/linux/.config
# CONFIG_NET_VENDOR_NVIDIA is not set
# CONFIG_FB_NVIDIA is not set
$ grep -i acpi /usr/src/linux/.config
CONFIG_X86_64_ACPI_NUMA=y
# Power management and ACPI options
CONFIG_ACPI=y
CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
# CONFIG_ACPI_DEBUGGER is not set
CONFIG_ACPI_SLEEP=y
# CONFIG_ACPI_PROCFS_POWER is not set
CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
# CONFIG_ACPI_EC_DEBUGFS is not set
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=y
CONFIG_ACPI_FAN=y
CONFIG_ACPI_DOCK=y
CONFIG_ACPI_CPU_FREQ_PSS=y
CONFIG_ACPI_PROCESSOR_CSTATE=y
CONFIG_ACPI_PROCESSOR_IDLE=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
CONFIG_ACPI_THERMAL=y
CONFIG_ACPI_NUMA=y
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y
CONFIG_ACPI_TABLE_UPGRADE=y
# CONFIG_ACPI_DEBUG is not set
# CONFIG_ACPI_PCI_SLOT is not set
CONFIG_ACPI_CONTAINER=y
CONFIG_ACPI_HOTPLUG_IOAPIC=y
# CONFIG_ACPI_SBS is not set
# CONFIG_ACPI_HED is not set
# CONFIG_ACPI_BGRT is not set
# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set
# CONFIG_ACPI_NFIT is not set
CONFIG_HAVE_ACPI_APEI=y
CONFIG_HAVE_ACPI_APEI_NMI=y
# CONFIG_ACPI_APEI is not set
# CONFIG_ACPI_EXTLOG is not set
# CONFIG_ACPI_CONFIGFS is not set
CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_X86_ACPI_CPUFREQ_CPB=y
# CONFIG_HOTPLUG_PCI_ACPI is not set
CONFIG_PNPACPI=y
CONFIG_ATA_ACPI=y
# CONFIG_PATA_ACPI is not set
CONFIG_ACPI_I2C_OPREGION=y
# ACPI drivers
# ACPI drivers
# CONFIG_SENSORS_ACPI_POWER is not set
# ACPI INT340X thermal drivers
# CONFIG_MFD_INTEL_LPSS_ACPI is not set
CONFIG_DMA_ACPI=y
# CONFIG_THINKPAD_ACPI is not set
# CONFIG_ACPI_WMI is not set
# CONFIG_ACPI_CMPC is not set
|
Xorg.conf
Code: |
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 "AllowEmptyIntialConfiguration"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
|
.xinitrc
Code: |
$ cat ~/.xinitrc
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
exec fvwm2 |
_________________ Unanswered Post Initiative:
https://forums.gentoo.org/viewtopic.php?t=119906
Last edited by dustfinger on Wed Jul 19, 2017 2:42 pm; edited 2 times in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54214 Location: 56N 3W
|
Posted: Thu Jul 13, 2017 2:37 pm Post subject: |
|
|
dustfinger,
You have the teltale signs of Optimus,
nVidia can't see a display, intel and nVidia GPUs but ... a few high end 'gaming laptops' actually have two complete independent graphics setups.
That is, they look like Optimus but are not.
Such laptops allow you to choose GPUs in the BIOS. Do you have that option?
The Intel GPU is active now. If you move the xorg.conf and .xinitrc out of the way, it should just work.
If your system really is non Optimus, choose the nVidia GPU in the BIOS and
Put Xorg.conf
Code: | Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection | in xorg.conf and again, it should just work. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
dustfinger Guru
Joined: 15 Aug 2004 Posts: 449
|
Posted: Thu Jul 13, 2017 3:30 pm Post subject: |
|
|
Hi NeddySeagoon,
I am not with my laptop at the moment, but I found this discussion on the alienware forum:
https://na.alienwarearena.com/ucf/show/1125054/boards/technical-support-1/ForumPost/why-does-my-alienware-17-r4-have-two-graphics-cards
It suggests that the Alienware does have Optimus as well as a Fn + 7 key for toggling between the two GPUs. I will have to take a look when I get home, but I am no sure if that FN + 7 key will work in linux?
NeddySeagoon wrote: | a few high end 'gaming laptops' actually have two complete independent graphics setups. |
My system definitely has two GPUs. One is the intel skylake integrated GPU and the other is the nvidia Geforce 1070.
Code: |
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GP104M [GeForce GTX 1070 Mobile] (rev a1)
|
NeddySeagoon wrote: | That is, they look like Optimus but are not |
So I don't really have optimus then? I suppose that means that I will have to manually switch between the two GPUs?
NeddySeagoon wrote: | If your system really is non Optimus, choose the nVidia GPU in the BIOS |
I looked for such a setting the other day and could not find one, but I will take another look tonight. Perhaps the FN + 7 key will do the same thing?? I will also try out your xorg.conf, but that would definitely turn off any Optimus handling. If my system really does support Optimus then it would be ideal to have it setup to do its thing.
Thank you for taking the time to answer my post!
Cheerio! _________________ Unanswered Post Initiative:
https://forums.gentoo.org/viewtopic.php?t=119906 |
|
Back to top |
|
|
dustfinger Guru
Joined: 15 Aug 2004 Posts: 449
|
Posted: Fri Jul 14, 2017 11:23 am Post subject: |
|
|
Hi NeddySeagoon,
I tried the Xorg.conf that you suggested with only the nvidia device configured. The Xorg.0.log complains that [ 80040.101] (EE) NVIDIA(0): Failed to assign any connected display devices to X screen 0.. I also tried pressing FN + 7 to see if I could force the nvidia GPU to be used and then tried running startx again, but that resulted in the same error.
I had a look in my bios again to see if I can spot a way to change the GPU. I don't see any way in the bios of doing this. From the Main tab it tells me that the Integrated Graphics is Intel Skylake and the Discrete Graphics 1 is Nvidia GFX. There is no option to change the order or anything like that.
I will continue to experiment, but I feel like I am floundering in the dark on this one. _________________ Unanswered Post Initiative:
https://forums.gentoo.org/viewtopic.php?t=119906
Last edited by dustfinger on Fri Jul 14, 2017 1:03 pm; edited 1 time in total |
|
Back to top |
|
|
dustfinger Guru
Joined: 15 Aug 2004 Posts: 449
|
Posted: Fri Jul 14, 2017 12:00 pm Post subject: |
|
|
With the following xorg.conf
Code: |
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "DPI" "96 x 96"
Option "AllowEmptyInitialConfig"
Option "Coolbits" "31"
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefault=0x1; PowerMizerDefaultAC=0x1"
Option "nvidiaXineramaInfoOverride" "1920x1080+0+0, 1920x1080+1600+0, 1920x1080+0+1080, 1920x1080+1920+1080"
EndSection
|
That configuration may have got me a little closer. In my Xorg.0.log I can now see a lot of activity around modesetting. The output of startx has these two lines:
Code: |
gdm: failed to open any driver (search paths /usr/lib64/dri)
gdm: Last dlopen error: /usr/lib64/dri/i965_dri.so: cannot open shared object file: No such file or directory
failed to load driver: i965
|
I checked and /usr/lib64/dri/i965_dri.so is a symlink to /usr/lib64/mesa/i965_dri.so which is missing.
At the moment in make.conf I have VIDEO_CARDS="nvidia"
so I changed it to VIDEO_CARDS="nvidia intel 1965"
Before rebuilding @world I wanted to update my kernel so..
From the kernel source tree
Code: |
$ grep -B 1 'MODULE_FIRMWARE.*SKL' drivers/gpu/drm/i915/intel_guc_loader.c drivers/gpu/drm/i915/intel_csr.c
drivers/gpu/drm/i915/intel_guc_loader.c-#define I915_SKL_GUC_UCODE GUC_FW_PATH(skl, SKL_FW_MAJOR, SKL_FW_MINOR)
drivers/gpu/drm/i915/intel_guc_loader.c:MODULE_FIRMWARE(I915_SKL_GUC_UCODE);
--
drivers/gpu/drm/i915/intel_csr.c-#define I915_CSR_SKL "i915/skl_dmc_ver1_26.bin"
drivers/gpu/drm/i915/intel_csr.c:MODULE_FIRMWARE(I915_CSR_SKL);
|
I added this to the kernel
Code: |
$ grep -i EXTRA .config
CONFIG_EXTRA_FIRMWARE="i915/skl_dmc_ver1_26.bin"
CONFIG_EXTRA_FIRMWARE_DIR="firmware"
|
Then tried to build the kernel
Code: |
$ sudo make
Password:
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
make[1]: *** No rule to make target 'firmware/i915/skl_dmc_ver1_26.bin', needed by 'firmware/i915/skl_dmc_ver1_26.bin.gen.o'. Stop.
make: *** [Makefile:988: firmware] Error 2
|
So I went to see if the bin was actually there:
Code: |
$ ls firmware/i915/
skl_dmc_ver1_26.bin.gen.S
|
I was expecting to see skl_dmc_ver1_26.bin. I am not quite sure what to do about the fact that the bin file is just not there. I decided to build @world and will continue experimenting tonight when I am home from work. _________________ Unanswered Post Initiative:
https://forums.gentoo.org/viewtopic.php?t=119906
Last edited by dustfinger on Fri Jul 14, 2017 1:02 pm; edited 1 time in total |
|
Back to top |
|
|
mrbassie l33t
Joined: 31 May 2013 Posts: 772 Location: over here
|
Posted: Fri Jul 14, 2017 12:45 pm Post subject: |
|
|
I have an optimus laptop and lspci lists the nvidia chip as Code: | 01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 950M] (rev a2) |
So I suspect Neddy may be correct.
EDIT: Initially tried only running on the nvidia chip but it got very hot very fast so I had to spend a week or two getting bumblebee running, I just checked and I still have commented lines in my xorg.conf for running on nvidia. They may work for you Code: | #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 |
|
|
Back to top |
|
|
dustfinger Guru
Joined: 15 Aug 2004 Posts: 449
|
|
Back to top |
|
|
dustfinger Guru
Joined: 15 Aug 2004 Posts: 449
|
Posted: Wed Jul 19, 2017 2:41 pm Post subject: |
|
|
To get it working the key thing was to make sure I had the kernel built against the intel skylake firmware. First I had to configure the kernel to look for i915/skl_dmc_ver1_26.bin in the correct path. By default it simply looks in the firmware path local to the source tree. But sys-kernel/linux-firmware drops the intel skylake firmware in /lib/firmware. I guess this is a well known thing, but it was not known to me.
Code: |
grep -i firmware /usr/src/linux/.config
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FIRMWARE_IN_KERNEL=y
[b]CONFIG_EXTRA_FIRMWARE="i915/skl_dmc_ver1_26.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"[/b]
# Altera FPGA firmware download module
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_FIRMWARE_EDID is not set
# Firmware Drivers
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_GOOGLE_FIRMWARE is not set
# EFI (Extensible Firmware Interface) Support
# CONFIG_TEST_FIRMWARE is not set
|
In make.conf I made sure that I had both the intel and nvidia graphics set and the use flag for glamor
Code: |
VIDEO_CARDS="nvidia intel 1965"
USE="bindist udev nvidia acpi glamor"
|
Then I just used the following xorg config:
Code: |
Section "Device"
Identifier "nvidia"
Driver "nvidia"
# Change the BusID if necessary. Tips: (lspci | grep -E "VGA|3D") (Change 01:00.0 to 1:0:0)
BusID "PCI:1:00:0"
Option "ConnectedMonitor" "CRT-0"
Option "CustomEDID" "CRT-0:/sys/class/drm/card0-eDP-1/edid"
Option "UseEDID" "true"
# Option "AccelMethod" "none"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
#Driver "intel"
# Change BusID if necessary. Tips: (lspci | grep -E "VGA|3D") (Change 00:02.0 to 0:2:0)
BusID "PCI:0:02:0"
#Option "AccelMethod" "none"
Option "AccelMethod" "sna"
#Option "AccelMethod" "uxa"
# The next three options help to reduce tearing, but reduce performance
Option "TearFree" "True"
Option "Tiling" "True"
Option "SwapbuffersWait" "True"
EndSection
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
#Screen 1 "nvidia"
Inactive "intel"
#Screen 0 "intel"
#Inactive "nvidia"
EndSection
Section "Monitor"
Identifier "builtin"
DisplaySize 382 214 # in millimeters
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration" "Yes"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
|
Now I have direct rendering
Code: |
$ glxinfo | grep -iE 'rendering|nvidia'
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation
OpenGL core profile version string: 4.5.0 NVIDIA 384.47
OpenGL core profile shading language version string: 4.50 NVIDIA
GL_NV_parameter_buffer_object2, GL_NV_path_rendering,
GL_NV_path_rendering_shared_edge, GL_NV_pixel_data_range,
GL_NV_shader_thread_shuffle, GL_NV_stereo_view_rendering,
OpenGL version string: 4.5.0 NVIDIA 384.47
OpenGL shading language version string: 4.50 NVIDIA
GL_NV_parameter_buffer_object2, GL_NV_path_rendering,
GL_NV_path_rendering_shared_edge, GL_NV_pixel_data_range,
GL_NV_shader_thread_shuffle, GL_NV_stereo_view_rendering,
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 384.47
GL_NV_packed_float_linear, GL_NV_path_rendering,
GL_NV_path_rendering_shared_edge, GL_NV_pixel_buffer_object,
GL_NV_stereo_view_rendering, GL_NV_texture_array, GL_NV_texture_barrier, |
Also, now my firmware library symlink is actually pointing to the mesa library
Code: |
$ ls -la /usr/lib64/dri/i965_dri.so
lrwxrwxrwx 1 root root 19 May 29 21:07 /usr/lib64/dri/i965_dri.so -> ../mesa/i965_dri.so |
The only issue is now that it seems my nvidia is always on unless I edit my xorg config and make the intel skylake driver always on. That is not really what optimus is all about though. Is there a way to configure xorg to auto switch between the two drivers? If so, then how can I test that this is actually happening?
dustfinger. _________________ Unanswered Post Initiative:
https://forums.gentoo.org/viewtopic.php?t=119906 |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54214 Location: 56N 3W
|
Posted: Wed Jul 19, 2017 3:46 pm Post subject: |
|
|
dustfinger,
A switch between the nVidia and intel graphics requires an Xorg restart at the moment. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
dustfinger Guru
Joined: 15 Aug 2004 Posts: 449
|
Posted: Fri Jul 21, 2017 9:50 pm Post subject: |
|
|
Thanks NeddySeagoon,
That will work for me for now. I will try to keep myself in the loop for when support finally comes our way. I have read a bit about the bumblebee project, but I imagine that eventually it will be supported natively by xorg. _________________ Unanswered Post Initiative:
https://forums.gentoo.org/viewtopic.php?t=119906 |
|
Back to top |
|
|
|