Bug 1121307

Summary: Segmentation fault when trying to enable RADEON discrete card.
Product: [Fedora] Fedora Reporter: renebarbosa <renebarbosafl>
Component: xorg-x11-drv-atiAssignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: gansalmon, itamar, jonathan, kernel-maint, lotz, madhu.chinakonda, marcelo.barbosa, mchehab, xgl-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-29 21:38:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
segfault_xorg.0.log none

Description renebarbosa 2014-07-19 02:30:26 UTC
Created attachment 919220 [details]
segfault_xorg.0.log

Description of problem: 
I have a Dell Inspirton 14z ultrabook and i can't enable my discrete video card through vgaswitcheroo using Fedora 20.
I am not sure if this is a bug in the kernel or in the xorg-x11-drv-ati but as radeon/vgaswitcheroo are kernel components I am marking it as a bug of the kernel package. If it's wrong, please forgive me and assign the bug to the correct package. It's important to say that I am booting the kernel with radeon.runpm=0 option as without it I can't change the /sys/kernel/debug/vgaswitcheroo/switch.

Version-Release number of selected component (if applicable):
kernel-3.15.5-200.fc20.x86_64

How reproducible:
Follow the Fedora QA TestCase for vgaswitcheroo[1].

Steps to Reproduce:
1. Check which GPU you are using right now: glxinfo | grep 'OpenGL renderer' Usually integrated GPU (Intel) is default.
2. Switch to discrete graphics: echo "DDIS" > /sys/kernel/debug/vgaswitcheroo/switch.
3. Restart X. Usually logout and login back to session is enough. 

Actual results:
Blank screen. My X server is not starting after the swith to discrete graphics.

Expected results:
1. You should successfully switch between GPUs when X restarts, without freezes, graphical artefacts or etc.
2. Desktop should work with both GPUs. Applications known to work in single GPU mode should work in hybrid graphics modes as well. 

Additional info:
My lshw output follow below and i've attached the Xorg.0.log. The Xorg.0.log is showing a Segmentation fault error when trying to enable the discrete card.

[root@localhost rene]# lshw -C video
  *-display               
       description: VGA compatible controller
       product: Thames [Radeon HD 7550M/7570M/7650M]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:02:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=radeon latency=0
       resources: irq:48 memory:e0000000-efffffff memory:f7e20000-f7e3ffff ioport:e000(size=256) memory:f7e00000-f7e1ffff
  *-display
       description: VGA compatible controller
       product: 3rd Gen Core processor Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:46 memory:f7800000-f7bfffff memory:d0000000-dfffffff ioport:f000(size=64)

Links:
[1] http://fedoraproject.org/wiki/QA:Testcase_vga_switcheroo

Thanks for the attention.

Comment 1 renebarbosa 2014-07-19 02:37:57 UTC
Hardware Informations:

[rene@localhost ~]$ lspci
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.3 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 4 (rev c4)
00:1c.5 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Thames [Radeon HD 7550M/7570M/7650M] (rev ff)
07:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)
09:00.0 Ethernet controller: Qualcomm Atheros AR8162 Fast Ethernet (rev 10)

Comment 2 Marcelo Barbosa "firemanxbr" 2014-07-19 14:36:00 UTC
@renebarbosa,

   In my case, I have same hardware that you, same Fedora, and same kernel version, but I don't use this option: radeon.runpm=0, my results are:

# cat /sys/kernel/debug/vgaswitcheroo/switch
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynOff:0000:02:00.0

# lspci | grep 'VGA'
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Thames [Radeon HD 7550M/7570M/7650M] (rev ff)

# rpm -qa | grep xorg
xorg-x11-xinit-1.3.2-9.fc20.x86_64
xorg-x11-drv-vmmouse-13.0.0-6.fc20.x86_64
xorg-x11-font-utils-7.5-18.fc20.x86_64
xorg-x11-drv-evdev-2.8.4-1.fc20.x86_64
xorg-x11-drv-wacom-0.23.0-5.fc20.x86_64
xorg-x11-drv-qxl-0.1.1-3.fc20.x86_64
xorg-x11-drv-mga-1.6.2-8.fc20.x86_64
xorg-x11-drv-fbdev-0.4.3-10.fc20.x86_64
abrt-addon-xorg-2.2.1-2.fc20.x86_64
xorg-x11-server-common-1.14.4-11.fc20.x86_64
xorg-x11-drv-intel-2.21.15-7.fc20.x86_64
xorg-x11-fonts-Type1-7.5-9.fc20.noarch
xorg-x11-glamor-0.5.1-3.20140115gitfb4d046c.fc20.x86_64
xorg-x11-drv-openchrome-0.3.3-2.fc20.x86_64
xorg-x11-server-utils-7.7-6.fc20.x86_64
xorg-x11-drv-synaptics-1.7.6-2.fc20.x86_64
xorg-x11-drv-nouveau-1.0.9-2.fc20.x86_64
xorg-x11-xauth-1.0.9-1.fc20.x86_64
xorg-x11-drv-vmware-13.0.2-4.20140613git82c9b0c.fc20.x86_64
xorg-x11-fonts-misc-7.5-9.fc20.noarch
xorg-x11-drv-ati-7.2.0-3.20131101git3b38701.fc20.x86_64
xorg-x11-xkb-utils-7.7-8.fc20.x86_64
xorg-x11-drv-vesa-2.3.2-10.fc20.x86_64
xorg-x11-utils-7.5-12.fc20.x86_64
xorg-x11-server-Xorg-1.14.4-11.fc20.x86_64
xorg-x11-drv-modesetting-0.8.0-2.fc20.x86_64

   My Fedora is very updated:

# yum upgrade -y
Loaded plugins: langpacks, refresh-packagekit
No packages marked for update

   Please trying remove kernel boot option and compare with my results.

Cheers,

firemanxbr

Comment 3 renebarbosa 2014-07-19 18:15:52 UTC
Hello Marcelo, 

Thanks for you answer. As requested, i've removed the "radeon.runpm=0" parameter and the issue is still happening even with Radeon Dynamic Power Management enabled.

When my system starts I have exactly the same result as yours, as seen below:

[root@localhost log]# cat /sys/kernel/debug/vgaswitcheroo/switch 
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynOff:0000:02:00.0

I've followed the vgaswitcheroo testcase[1] and after restarting X server my X server just died, the curious thing is that when this happens I can not even use the TTYs. I had to reboot my laptop using ctrl+alt+del to get it working again.

Marcelo, can you try follow the Fedora test case and check if it will work fine in your laptop?

Thanks for the help!

[1] http://fedoraproject.org/wiki/QA:Testcase_vga_switcheroo

Comment 4 Marcelo Barbosa "firemanxbr" 2014-07-19 19:22:48 UTC
Hi,

   For me this test works correctly. 
   I'm using Gnome 3.10.2, what's your graphical environment ? 
   Attempted to verify if problem is not related to updates ? 
   Did you check the versions of the packages?

Cheers,

firemanxbr

Comment 5 renebarbosa 2014-07-24 23:09:35 UTC
Hello! Sorry for the delay! 
Yup, my system is fully upgraded and it's still happening. It's currently impossible to enable the ATI discrete card using the open source controller and vgaswitcheroo. I am also viewing some kernel panics when using the latest kernel 3.15.

Comment 6 Marcelo Barbosa "firemanxbr" 2014-07-25 01:25:21 UTC
HI renebarbosa,

  You checked yours packages ? please see my first comment and see to the component affected in this ticket:

Component: kernel → xorg-x11-drv-ati
Assignee: kernel-maint → xgl-maint

Comment 7 renebarbosa 2014-07-30 02:03:07 UTC
Hello, 

I've double checked it and yes I am using exactly the same version you're using, the latest one from Fedora repos.

It's really weird I can't enable my discrete card using radeon as it's killing my Xorg after the switch.

Marcelo, what's the output of glxinfo | grep 'OpenGL renderer' after the execution of echo "DDIS" > /sys/kernel/debug/vgaswitcheroo/switch and restarting X in your system? Are you getting the correct informations about the discrete card?

Again, thanks for the help.

Comment 8 Michael Lotz 2015-04-09 13:23:30 UTC
Hello,

i can confirm this bug. But my hardware is an Dell Latitude E6540 and with Fedora 21. 
If i want to use the DIS Card. I do this:

1. systemctl isolate multi-user.target
2. echo DIS > /sys/kernel/debug/vgaswitcheroo/switch

now the System looks like it is freeze. I have no Screen and i cant change the Terminals(ALT+CTRL F2, ect.). But i see that the Disk LED is blinking. Only a hard shutdown helps to turn off.  

All is updated BIOS, OS, ect.

lspci |grep VGA
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Mars XTX [Radeon HD 8790M] (rev ff)

uname -r
3.19.3-200.fc21.x86_64

Best Regards

Michael Lotz

Comment 9 Fedora End Of Life 2015-05-29 12:24:38 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Fedora End Of Life 2015-06-29 21:38:41 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.