You are not logged in.

#1 2022-08-02 09:16:11

TheTS
Member
Registered: 2022-08-02
Posts: 22

Xorg crashes when using a discrete video card

Hello everyone, I have a laptop(HP 250 G5 Notebook PC) with installed Arch. NeoFetch tells me I have a discrete video card(AMD ATI Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / Radeon 520 Mobile) and an integrated video card(Intel HD Graphics 5500).
The output from NeoFetch

When I trying to change Xorg config to this:

/etc/X11/xorg.conf

Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "AMDGPU"
    Driver "amdgpu"
    Option "AllowEmptyInitialConfiguration"
EndSection

My system never starts, The "Starting version 251.3-1-arch" inscription flickers
Here is a log of Xorg
Here is a log of dmesg
Here is a output of lspci -k

And My question is: how to use the discrete video card as main for Xorg
Thanks for your help smile
P.S.: Sorry for my English, this is not my native language
P.S.S.: The embedded video card can be /dev/dri/card1

Last edited by TheTS (2022-08-03 09:38:26)

Offline

#2 2022-08-02 10:57:06

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

So,
I tried to solve this(don't help):

/etc/X11/xorg.conf

Section "Device"
    Identifier "AMDGPU"
    Driver "amdgpu"
    BusID "PCI:d:0:0"
    Option "AllowEmptyInitialConfiguration"
EndSection

Here is a output of journalctl(from tty when system don't starting)(361973 lines)

Offline

#3 2022-08-02 11:32:31

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

Offline

#4 2022-08-02 11:50:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: Xorg crashes when using a discrete video card

Your amdgpu is a display controller which means it does not have a screen attached and the "normal" methods of setting this up will predictably fail. If you want to use this like intended in an on demand manner, remove your xorg.conf and read https://wiki.archlinux.org/title/PRIME# … rs_-_PRIME

If you really want to redirect the entire session to the discrete card, see https://wiki.archlinux.org/title/PRIME#Reverse_PRIME

Note that in terms of battery life you should generally prefer the first approach.

Offline

#5 2022-08-02 12:15:01

seth
Member
Registered: 2012-09-03
Posts: 50,005

Re: Xorg crashes when using a discrete video card

Also notice that

BusID "PCI:d:0:0"

is bogus, the format is decimal, so

BusID "PCI:13:0:0"

Ftr, the fil.io links are 404 and the pastebin one isn't an Xorg log but maybe the Xorg console output.
https://wiki.archlinux.org/title/Xorg#General

Online

#6 2022-08-02 12:28:39

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

Thanks V1del and seth, now I need some time to do this smile

Offline

#7 2022-08-02 13:17:03

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

I really appreciate your help, but during my experiments I was able to make amazing progress (I really hope that it will still give me an image on the monitor). But, Reverse PRIME - I can't figure out how to do this, sorry.
While I am waiting for your reply I will try to fix it and post my updates (in the same archives)

Here is the archive (google drive) with my configuration, Xorg output, dmesg and journalctl

P.S.: This is the translation of DeepL

Offline

#8 2022-08-02 13:21:41

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

After a little reading, I still came to PRIME

P.S.: This is the translation of DeepL

Offline

#9 2022-08-02 13:30:56

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

Following the PRIME guide and got this in the beginning, is this normal?

[thets@archisthebest ~]$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x44 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 3 associated providers: 0 name:modesetting
Provider 1: id: 0xbc cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:modesetting

Offline

#10 2022-08-02 13:40:21

seth
Member
Registered: 2012-09-03
Posts: 50,005

Re: Xorg crashes when using a discrete video card

Yes, 0 is the intel chip, 1 the AMD one - both are handled by be modesetting driver (instead of xf86-video-intel/amdgpu)
Now check

DRI_PRIME=1 glxinfo | grep "OpenGL renderer"

Online

#11 2022-08-02 13:43:03

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

seth wrote:

Yes, 0 is the intel chip, 1 the AMD one - both are handled by be modesetting driver (instead of xf86-video-intel/amdgpu)
Now check

DRI_PRIME=1 glxinfo | grep "OpenGL renderer"

I have tried it, and yes, it gives the right result. But I still need to run all Xorg on the discrete graphics card. I am doing this to improve system stability

P.S.: This is the translation of DeepL

Offline

#12 2022-08-02 13:44:27

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

Can I do that?

DRI_PRIME=1 startx

Offline

#13 2022-08-02 13:48:27

seth
Member
Registered: 2012-09-03
Posts: 50,005

Re: Xorg crashes when using a discrete video card

No.

The config file you uploaded in #7 references the amdgpu chip and driver but is insufficient for a reverse prime setup (compare the wiki example) and it's also fishy that you say "Driver "amdgpu"" but the chip is currently under control of the modesetting driver.

pacman -Qs xf86-video

Online

#14 2022-08-02 13:58:19

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

seth wrote:

No.

The config file you uploaded in #7 references the amdgpu chip and driver but is insufficient for a reverse prime setup (compare the wiki example) and it's also fishy that you say "Driver "amdgpu"" but the chip is currently under control of the modesetting driver.

pacman -Qs xf86-video

Is this correct for AMD?

/etc/X11/xorg.conf

Section "ServerLayout"
        Identifier "layout"
        Screen 0 "intel"
        Inactive "amd"
EndSection

Section "Device"
        Identifier "amd"
        Driver "amdgpu"
EndSection

Section "Screen"
        Identifier "amd"
        Device "amd"
EndSection

Section "Device"
        Identifier "intel"
        Driver "modesetting"
        BusID "PCI:0:2:0"
EndSection

Section "Screen"
        Identifier "intel"
        Device "intel"
EndSection

P.S.:

[thets@archisthebest ~]$ pacman -Qs xf86-video
local/xf86-video-amdgpu 22.0.0-1 (xorg-drivers)
    X.org amdgpu video driver

Offline

#15 2022-08-02 14:11:22

seth
Member
Registered: 2012-09-03
Posts: 50,005

Re: Xorg crashes when using a discrete video card

You're more interested in this example, https://wiki.archlinux.org/title/PRIME# … rimary_GPU

Online

#16 2022-08-02 14:23:46

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

seth wrote:

You're more interested in this example, https://wiki.archlinux.org/title/PRIME# … rimary_GPU

First of all, here's what I tried first. And I think the same problem is waiting for me in "Discrete card as primary GPU".
Anyway, is this correct for AMD?:

/etc/X11/xorg.conf.d/10-gpu.conf
Section "ServerLayout"
    Identifier "layout"
    Screen 0 "amdgpu" #Or modesetting
    Inactive "intel"
EndSection

Section "Device"
    Identifier  "amdgpu"
    Driver      "amdgpu"
    BusID       "PCI:13:0:0" #Or PCI:0:13:0 or PCI:d:0:0 or PCI:0:d:0
EndSection

Section "Screen"
    Identifier "amdgpu"
    Device "amdgpu"
EndSection

Section "Device"
    Identifier  "intel"
    Driver      "intel"
    BusID       "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Offline

#17 2022-08-02 15:07:57

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

As I thought, this leads to the same error.
Unfortunately, I can no longer experiment like this because it is extremely difficult to fix through TTY.
I hope for your guidance, thank you

P.S.: This is the translation of DeepL

Offline

#18 2022-08-02 15:17:08

seth
Member
Registered: 2012-09-03
Posts: 50,005

Re: Xorg crashes when using a discrete video card

You could try to replace

Driver      "amdgpu"

w/

Driver      "modesetting"

and you MUST use

Driver      "modesetting"

instead of

Driver      "intel"

(as you don't even have that driver installed)

Online

#19 2022-08-02 16:09:42

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

seth wrote:

You could try to replace

Driver      "amdgpu"

w/

Driver      "modesetting"

and you MUST use

Driver      "modesetting"

instead of

Driver      "intel"

(as you don't even have that driver installed)

I'm not sure I understand you correctly, but here are my (unsuccessful) attempts.

P.S.: I accidentally broke the link from post #7

Offline

#20 2022-08-02 18:50:50

seth
Member
Registered: 2012-09-03
Posts: 50,005

Re: Xorg crashes when using a discrete video card

There're 2 > 80MB files in that archive?
Please don't use the google drive from some dozen or hundred lines of text but upload it to ix.io or 0x0.st

cat /path/to/file | curl -F 'file=@-' 0x0.st

Online

#21 2022-08-02 19:00:02

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

seth wrote:

There're 2 > 80MB files in that archive?
Please don't use the google drive from some dozen or hundred lines of text but upload it to ix.io or 0x0.st

cat /path/to/file | curl -F 'file=@-' 0x0.st

Okay, from now on I will send text with 0x0.st smile

Offline

#22 2022-08-02 19:05:22

seth
Member
Registered: 2012-09-03
Posts: 50,005

Re: Xorg crashes when using a discrete video card

You want ot do that right now, because I'm not looking through 80MB of data for some 100 random relevant lines.

Online

#23 2022-08-02 19:16:44

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

seth wrote:

You want ot do that right now, because I'm not looking through 80MB of data for some 100 random relevant lines.

Sorry, here is journal files(that big files):
From 18:52:39 folder
From 19:01:01 folder

Offline

#24 2022-08-02 19:22:09

TheTS
Member
Registered: 2022-08-02
Posts: 22

Re: Xorg crashes when using a discrete video card

In order not to waste time I will try to use this part of the PRIME manual

Offline

#25 2022-08-02 19:30:25

seth
Member
Registered: 2012-09-03
Posts: 50,005

Re: Xorg crashes when using a discrete video card

An 80MB journal means you uploaded the entire journal (possibly even in binary form)
We basically only need the xorg log of the failing run.

Last edited by seth (2022-08-02 19:30:41)

Online

Board footer

Powered by FluxBB