bayasdev / envycontrol

Easy GPU switching for Nvidia Optimus laptops under Linux
MIT License
1.23k stars 61 forks source link

[BUG] Not switching correctly #185

Open nPHYN1T3 opened 1 week ago

nPHYN1T3 commented 1 week ago

Describe the bug If I switch to nvidia envycontrol -q says it's set to nvidia but everything seems like it's in hybrid mode.

If I launch nvidia-settings it still shows the intel GPU running a "CRT" screen (WTH?) which is the wrong screen size and most software launched is confined to the wrong dimensions of the Intel phantom CRT screen. The nVidia connected screen shows as a "Prime" screen like in an offload "hybrid" config.

Testing something like glxgears and glxinfo says it's nvidia but if I launch anything that actually uses 3D acceleration it's a slide show when it should run like an over fueled rocket. Occasionally applications will also launch on the "hidden" overlayed Intel screen. To correct the wrong screen dimensions and off screen rendering I always have to disable the "CRT" screen in the nvidia settings every boot now.

To Reproduce Steps to reproduce the behavior:

  1. Run sudo envycontrol -s nvidia
  2. Reboot
  3. Note mouse cursor off center due to the mismatched and overlayed Intel screen to the nVidia screen
  4. Cry at the useless performance that is worse than just running the Intel chip alone

Expected behavior Single Screen connected to only the nVidia chip like it used too (yes I know it's technically pass through)

Screenshots Upon request if it matters.

System Information:

Intel

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4)
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b4)
00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b4)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
02:00.0 Ethernet controller: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet (rev c0)
03:00.0 Network controller: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)
04:00.1 SD Host controller: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)
05:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)

nVidia

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4)
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b4)
00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b4)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GF108 High Definition Audio Controller (rev a1)
02:00.0 Ethernet controller: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet (rev c0)
03:00.0 Network controller: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)
04:00.1 SD Host controller: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)
05:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)
bayasdev commented 1 week ago

Please do the manual configuration described in the wiki as you're using CTWM

nPHYN1T3 commented 1 week ago

I had done that (but such a long time ago) I'll go re-read it and make sure something hasn't gibbed it. Thanks...

Le record scratch wiki is blank..."Manual set up" is only listed in features which takes you to the FAQ, which says to do the thing I already have in my .xinitrc. To which I'd say I'm not reporting the "black screen" which is what you get if you haven't done the manual setup.

I've had this in .xinitrc for years. if [[ $(envycontrol --query) == "nvidia" ]] ; then xrandr --setprovideroutputsource modesetting NVIDIA-0 xrandr --auto fi

nPHYN1T3 commented 1 week ago

As an addendum I uninstalled envycontrol and reinstalled it in an attempt to "clean things up." Envycontrol indeed then reported it is in hybrid mode despite the requested mode being nvidia. So it's also not reporting the mode accurately.

I again request nvidia, it says everything was changed and to reboot. I reboot and envycontrol now again says it's nvidia but nothing has changed and my screen is shown as prime offload still, cursor is offset to the Intel "CRT" screen.