[Switcheroo] AMD+ Intel - system unresponsive

I had problem with some Steam games, like Grand Ages Medieval, Tomb Raider, etc. Games won’t launch or displaying white screen. Someone on this forum suggest me to install and activate switcheroo, so I do this. This don’t make things better. I found some thread on the web, that I should add amdgpu.pm=0 to grub command line. That’s it! Games worked, but (I don’t remember when) I noticed system have hiccups. Today I disabled switcheroo and everything seems to works. I only need to test these Steam games works, so sorry for writing this post today - I wrote this to allow you to check the reason of may problem is really the switcheroo daemon.

If somebody confirm this, I will send bug report or someone else could do this.
My hardware:


> /sbin/lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 02)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 02)
00:08.0 System peripheral: Intel Corporation Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th Gen Core Processor Gaussian Mixture Model
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Intel(R) 100 Series Chipset Family LPC Controller/eSPI Controller - 9D4E (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] (rev 83)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
03:00.0 Network controller: Intel Corporation Dual Band Wireless-AC 3168NGW [Stone Peak] (rev 10)

On Mon 07 Jan 2019 07:26:03 PM CST, Lachu wrote:

I had problem with some Steam games, like Grand Ages Medieval, Tomb
Raider, etc. Games won’t launch or displaying white screen. Someone on
this forum suggest me to install and activate switcheroo, so I do this.
This don’t make things better. I found some thread on the web, that I
should add amdgpu.pm=0 to grub command line. That’s it! Games worked,
but (I don’t remember when) I noticed system have hiccups. Today I
disabled switcheroo and everything seems to works. I only need to test
these Steam games works, so sorry for writing this post today - I wrote
this to allow you to check the reason of may problem is really the
switcheroo daemon.

If somebody confirm this, I will send bug report or someone else could
do this.
<snip>

Hi
I think you mean amdgpu.dpm, there is no pm option? There are lots of
fixes, so would suggest removing any options to start with. I have a
dual AMD gpu setup with switcheroo-control.service running fine.

One option to perhaps try is amdgpu.dc=0 or 1, see how that goes
instead.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.25-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

This option is:
amdgpu.runpm=0

So I disabled power management (if I understood correctly).

Sorry, but I will check options after exams. Anyway - thanks for help!

Hi
Have a read here for all the options, your not running a laptop? The AMD card is a PCIe one?
https://dri.freedesktop.org/docs/drm/gpu/amdgpu.html

Hi
Another thought is your not using the amdgpu driver for your games…?

Does the likes of vkmark work and show the AMD card in use?

https://download.opensuse.org/repositories/benchmark/openSUSE_Factory/x86_64/vkmark-2017.08+git.20180530-1.6.x86_64.rpm


vkmark
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x1002
    Device ID:      0x6900
    Device Name:    AMD RADV ICELAND (LLVM 6.0.1)
    Driver Version: 75509761

/sbin/lspci  | grep -E "^.*(VGA|Display).*[AMD/ATI].*$" 

00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Wani [Radeon R5/R6/R7 Graphics] (rev ca)
04:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] (rev 83)

When all amdgpu driver related parameter disabled (window displaying only white screen appear):

=======================================================
vkmark 2017.08

Vendor ID:      0x1002
Device ID:      0x6900
Device Name:    AMD RADV ICELAND (LLVM 6.0.1)
Driver Version: 75509761

=======================================================
[vertex] device-local=true: FPS: 5269 FrameTime: 0.190 ms
[vertex] device-local=false: FPS: 5967 FrameTime: 0.168 ms
[texture] anisotropy=0: FPS: 4858 FrameTime: 0.206 ms
[texture] anisotropy=16: FPS: 4317 FrameTime: 0.232 ms
[shading] shading=gouraud: FPS: 5252 FrameTime: 0.190 ms
[shading] shading=blinn-phong-inf: FPS: 5422 FrameTime: 0.184 ms
[shading] shading=phong: FPS: 5409 FrameTime: 0.185 ms
[shading] shading=cel: FPS: 5663 FrameTime: 0.177 ms
[effect2d] kernel=edge: FPS: 5079 FrameTime: 0.197 ms
[effect2d] kernel=blur: FPS: 5549 FrameTime: 0.180 ms
[desktop] <default>: FPS: 5189 FrameTime: 0.193 ms
[cube] <default>: FPS: 5316 FrameTime: 0.188 ms
[clear] <default>: FPS: 4765 FrameTime: 0.210 ms

                               vkmark Score: 5235

=======================================================

With amdgpu.runpm=0 parameter:


vkmark
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x1002
    Device ID:      0x6900
    Device Name:    AMD RADV ICELAND (LLVM 6.0.1)
    Driver Version: 75509761
=======================================================
[vertex] device-local=true: FPS: 654 FrameTime: 1.529 ms
[vertex] device-local=false: FPS: 599 FrameTime: 1.669 ms
[texture] anisotropy=0: FPS: 656 FrameTime: 1.524 ms
[texture] anisotropy=16: FPS: 659 FrameTime: 1.517 ms
[shading] shading=gouraud: FPS: 579 FrameTime: 1.727 ms
[shading] shading=blinn-phong-inf: FPS: 638 FrameTime: 1.567 ms
[shading] shading=phong: FPS: 579 FrameTime: 1.727 ms
[shading] shading=cel: FPS: 643 FrameTime: 1.555 ms
[effect2d] kernel=edge: FPS: 653 FrameTime: 1.531 ms
[effect2d] kernel=blur: FPS: 565 FrameTime: 1.770 ms
[desktop] <default>: FPS: 552 FrameTime: 1.812 ms
[cube] <default>: FPS: 715 FrameTime: 1.399 ms
[clear] <default>: FPS: 718 FrameTime: 1.393 ms
=======================================================
                                   vkmark Score: 631
=======================================================

I also discovered in previous case (without amdgpu.runpm=0 parameter), system also is not responsive in 100%. Maybe it’s related to one of my GPU or with situation of switching between GPU?

Aha. My computer is HP laptop.

Hi
I would try the options I indicated above (amdgpu.dc=0 or 1) rather than the runpm one.

I removed amdgpu.runpm switch and tried both amdgpu.dc=0 and amdgpu.dc=1 and in both cases Grand Ages: Medieval display only white window.

Hi
So can you check the output from;


cat /sys/kernel/debug/vgaswitcheroo/switch

Is the switcheroo service running or still disabled? If disabled, enable/start and run the above command.

After updating kernel to 4.20 version and removing amdgpu.run_pm=0 games works good. I will test system responsive and respond after few days. Switcheroo is disabled. After starting it the output is:


0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynOff:0000:01:00.0

After makes it stopped again the output was:


0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynOff:0000:01:00.0

Should I restart X or system after changing switcheroo_control state?

Hi
You should be fine, so when you run an application that uses the discrete card, do you see the output change?

After running vkmark and displaying … /switcheroo/switch pseudo-file:


0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynPwr:0000:01:00.0

Previously it was:


0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynOff:0000:01:00.0

After vkmark turned off:


0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynOff:0000:01:00.0

So everything seems to works. Power of the masses or good documentation. It’s hard to believe GNU/Linux have only 1% - 5% market share. I think many person have the same laptop configuration, so developers saw the problem.
I will test my laptop and if there’s any problems, I will wrote. But currently it freeze for few seconds after vkmark ends.