Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Configure Xorg to use radeon instead of software rendering
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ThuleanTraveller
n00b
n00b


Joined: 14 Sep 2021
Posts: 7

PostPosted: Mon Sep 27, 2021 9:48 pm    Post subject: Configure Xorg to use radeon instead of software rendering Reply with quote

Hi there, new Gentoo user here.
I’m trying to get an EGPU to play games on my Thinkpad using hardware acceleration. There’s no external monitor connected to the EGPU, so what I want is for Xorg to use it for video, but the laptop screen as the display. By default (I don’t have an xorg.conf) Xorg is detecting the card and the internal graphics correctly, but OpenGL is using llvmpipe as the renderer. Setting up a “radeon.conf” in xorg.conf.d causes xorg to crash with “no displays detected”. Can I create a “screens” or “monitor” section in this file that allows it to use the radeon video with the laptop screen?

Second question also:
Since I assume Xorg wouldn’t work without the card connected with this theoretical setup, is there a way to use the internal Intel graphics if the laptop is booted without the card connected, such as a script I could run at login? I've tried programs such as Gswitch to automate this but it doesn't appear to be compatible with my setup.

Thanks in advance!
Back to top
View user's profile Send private message
dbtx
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2020
Posts: 117

PostPosted: Tue Sep 28, 2021 2:25 pm    Post subject: Reply with quote

Quote:
Can I create a “screens” or “monitor” section in this file that allows it to use the radeon video with the laptop screen?

Someone jump in and tell us otherwise but I really doubt it can be done effectively and efficiently.

Normally everything is rendered into video memory and then scanned out to a monitor attached to the same GPU as the memory. It would be possible to copy the results back into the system and show it on a different monitor (on the far side of a different GPU, like recordmydesktop minus the video encoding step) but that also means increased traffic on the PCIe bus and so reduced performance as well as higher latency, as in, more lag. Maybe it's not as bad as using an HDMI capture dongle as a sort of monitor on the Radeon to stream it back into a viewer on the internal GPU, or maybe it's worse. But AFAIK when X mirrors a monitor and it is working well, both monitors are on the same GPU.

If you *really* want to use the internal LCD, the best performance and most hackiness (worst physical integrity) would come with attaching it directly to the Radeon via an HDMI->LVDS converter or DP->eDP adapter. Ideally you could include a switch or multiplexer that connected the LCD either to the motherboard or to the adapter, and then X should just try to use whichever GPU has a monitor on it... I think.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Tue Sep 28, 2021 2:43 pm    Post subject: Reply with quote

ThuleanTraveller,

Welcome to Gentoo.

How this can work and if it can work dependes on your hardware.

nVidia have a system like this called Optimus. Both the Intet GPU and the nVidia GPU draw into the same framebuffer RAM in the laptop.
However, the nVidia GPU has no connections to any display surface at all. Whichever GPU is used to render the image into the framebuffer, the Intel GPU is always used to transfer the framebuffer to the display surface.

I understand that ATI/AMD have a similar system but they seem to be very rare.

What exact make and model is your Thinkpad?
We need to read the fine print in manual and possibly the BIOS set up.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ThuleanTraveller
n00b
n00b


Joined: 14 Sep 2021
Posts: 7

PostPosted: Tue Sep 28, 2021 6:05 pm    Post subject: Reply with quote

NeddySeagoon wrote:
What exact make and model is your Thinkpad?


Thanks for replying! The thinkpad model is a T61, with Intel internal graphics. The card I'm using is an AMD HD 5450 hooked into the Expresscard slot. I have to admit that I rarely (read: never) do as much research as I should with these things. My inspiration for using the card without a monitor came from this video https://www.youtube.com/watch?v=jUCUbYoegsk&t=1s&ab_channel=MarkJay Which appears to show someone with essentially the same setup (though he's using an NVIDIA card and a T420s) He does note in the comments section that performance isn't optimal but he can use it with and without an external monitor. Performance isn't too important for me as my Gentoo setup is very minimal. As long as it can run an N64 emulator and GZdoom then I will be happy (For the most part, I just want the card for newer OpenGL support) If we do get it to work I'll run some performance tests and let you guys know what it's like.
Back to top
View user's profile Send private message
ThuleanTraveller
n00b
n00b


Joined: 14 Sep 2021
Posts: 7

PostPosted: Tue Sep 28, 2021 7:01 pm    Post subject: Reply with quote

dbtx wrote:
If you *really* want to use the internal LCD, the best performance and most hackiness (worst physical integrity) would come with attaching it directly to the Radeon via an HDMI->LVDS converter or DP->eDP adapter. Ideally you could include a switch or multiplexer that connected the LCD either to the motherboard or to the adapter, and then X should just try to use whichever GPU has a monitor on it... I think.


I'm definitely not seperating the monitor from the motherboard... It was enough of a nightmare putting it in there :o It'll need to be a software solution or none at all. I'm suprised it's such a problem! Obviously using a cable back and forth is going to increase latency, but Xorg doesn't seem to consider the radeon device as being any different from the internal GPU (They're both PCI devices) Currently it appears to be using the CPU for everything. Would it be possible to have rendering done on the EGPU but display video via the IGPU? Sorry if these are stupid questions.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Tue Sep 28, 2021 7:50 pm    Post subject: Reply with quote

ThuleanTraveller,

I can't watch that video right now. Well, I don't have any sound because I'm bringing up a new system and ALSA isn't working completely.
It will be suboptimal though. Somehow you have to get the rendered image over the the miniPCIe interface and into the pixel buffer, so that the Intel GPU can put it on the screen.
The miniPCIe interface was not made for that. Its too low a bandwidth.

Lets get hardware rendering going on the Intel GPU first and see if that's good enough.

Please post your
Code:
emerge --info
output and put your entire Xorg.0.log output onto a pastebin site. wgetpaste is your friend there.
The log will either be at /var/log/Xorg.0.log or somewhere in /home/<username>/ depending on how you installed Xorg.

The output of
Code:
lspci -nnk
will be useful too, so we can see what is attached to your PCI/PCIe bus.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ThuleanTraveller
n00b
n00b


Joined: 14 Sep 2021
Posts: 7

PostPosted: Thu Sep 30, 2021 12:14 am    Post subject: Reply with quote

NeddySeagoon wrote:
Lets get hardware rendering going on the Intel GPU first and see if that's good enough.

Please post your
Code:
emerge --info
output and put your entire Xorg.0.log output onto a pastebin site. wgetpaste is your friend there.
The log will either be at /var/log/Xorg.0.log or somewhere in /home/<username>/ depending on how you installed Xorg.

The output of
Code:
lspci -nnk
will be useful too, so we can see what is attached to your PCI/PCIe bus.


Here's what you requested!

emerge --info: https://pastebin.pl/view/3c1fc84a

Xorg.log: https://pastebin.pl/view/091ad4cf

lspci -nnk: https://pastebin.pl/view/f35fef99
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum