Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Non root Xorg on AMD video cards
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 283

PostPosted: Mon Jul 06, 2020 4:34 pm    Post subject: Reply with quote

GDH-gentoo wrote:
The patches you speak of must be applied to the driver's code, right?

Yes, the first is for x11-drivers/xf86-video-amdgpu, the second - for x11-drivers/xf86-video-ati and the third (AFAIK) - for x11-base/xorg-server.
I thought, one package can't patch another packages...
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 484
Location: South America

PostPosted: Mon Jul 06, 2020 4:42 pm    Post subject: Reply with quote

halcon wrote:
I thought, one package can't patch another packages...
That's correct, it can't. The patches would have to be applied by the ebuilds for x11-drivers/xf86-video-amdgpu, x11-drivers/xf86-video-ati and x11-base/xorg-server, respectively.
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 283

PostPosted: Mon Jul 06, 2020 4:43 pm    Post subject: Reply with quote

GDH-gentoo wrote:
That's correct, it can't. The patches would have to be applied by the ebuilds for x11-drivers/xf86-video-amdgpu, x11-drivers/xf86-video-ati and x11-base/xorg-server, respectively.

Aha! So, it's a question of interacting with the devs of these packages. Thanks.
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 484
Location: South America

PostPosted: Mon Jul 06, 2020 4:50 pm    Post subject: Reply with quote

halcon wrote:
Aha! So, it's a question of interacting with the devs of these packages.

Not necessarily, Portage can apply user patches.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4877
Location: Dallas area

PostPosted: Mon Jul 06, 2020 4:52 pm    Post subject: Reply with quote

I could see something like this working

The logic of xorg-server re *logind/suid need to be modified.
If "-elogind -systemd -suid" then cause drm_master_util to be emerged and the patch for modesetting driver copied to /etc/portage/patches/x11-base/xorg-server.
Have all patches for x11-drivers (except modesetting) in the misc directory of drm_master_util and when drm_master_util is emerged, part of the process copies the patches to the appropriate directories under /etc/portage/patches.

And the above doesn't address the need to be in certain groups for rootless X to work.

I think this is all that needs to be done to make it work, but again, I'm not sure if gentoo's devs would want to even mess with it, given their push for *logind.

Edit to add: Also the x11-drivers/* need to be re-emerged once the patches are put in place, but I'm not sure if that can be automated, by way of an ebuild.
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon


Last edited by Anon-E-moose on Mon Jul 06, 2020 4:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 283

PostPosted: Mon Jul 06, 2020 4:57 pm    Post subject: Reply with quote

GDH-gentoo wrote:
halcon wrote:
Aha! So, it's a question of interacting with the devs of these packages.

Not necessarily, Portage can apply user patches.

Is the solution changing the ebuilds of amd, ati, xorg and putting them in my local overlay? (together with the patches)
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 283

PostPosted: Mon Jul 06, 2020 5:03 pm    Post subject: Reply with quote

Anon-E-moose wrote:
Edit to add: Also the x11-drivers/* need to be re-emerged once the patches are put in place, but I'm not sure if that can be automated, by way of an ebuild.

That's why I told about "meta package" which would "command" amd/ati/xorg to rebuild.
Back to top
View user's profile Send private message
GDH-gentoo
Guru
Guru


Joined: 20 Jul 2019
Posts: 484
Location: South America

PostPosted: Mon Jul 06, 2020 5:08 pm    Post subject: Reply with quote

halcon wrote:
Is the solution changing the ebuilds of amd, ati, xorg and putting them in my local overlay? (together with the patches)
You don't need the local repository for that if the ebuilds directly or indirectly call eapply_user. If they do, user patches can go in /etc/portage/patches. See here. I haven't checked those particular ebuilds.

You do need the local repository to hold the ebuild for drm_master_util, because it is not in Gentoo's repository, and to override the handling of USE flags in the way Anon-E-moose is suggesting, if you want to do that.

A meta-package would not help here.
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 283

PostPosted: Mon Jul 06, 2020 5:17 pm    Post subject: Reply with quote

GDH-gentoo wrote:
You don't need the local repository for that if the ebuilds directly or indirectly call eapply_user. If they do, user patches can go in /etc/portage/patches. See here. I haven't checked those particular ebuilds.

You do need the local repository to hold the ebuild for drm_master_util, because it is not in Gentoo's repository, and to override the handling of USE flags in the way Anon-E-moose is suggesting, if you want to do that.

A meta-package would not help here.

Ok, I have "to learn the language" a little...
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4877
Location: Dallas area

PostPosted: Mon Jul 06, 2020 5:44 pm    Post subject: Reply with quote

Ok, I'll take a step back and put this whole rootless X into perspective.

I would expect that it doesn't appeal to most businesses, because they're probably using one of the big DE's and thus using *logind
That leave home users and at that a great part will be using a big DE w/*logind.
So rather than try and get gentoo devs to add things for (an admittedly) small audience to portage packages, the best bet is to modify the wiki.

So what's left could be satisfied with the ebuild, the drm_master_util sources and the patches for different drivers.
And the best way would be to enhance/modify the rootless X page (gentoo wiki) to add info about drm_master_util, with clear messages about who should and shouldn't use this on their system. Also needs info on the driver patches and where to get them and how to properly apply them.
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
kajzer
l33t
l33t


Joined: 27 Nov 2014
Posts: 815

PostPosted: Mon Jul 06, 2020 5:46 pm    Post subject: Reply with quote

halcon wrote:
And that will work?! I thought that simple won't work because the patches are for another packages.


Obviously that will not work, that was silly of me 8O

Well then, if this really has a chance of getting into the main portage tree then I guess the best thing would be to modify video drivers ebuilds and glue all the relevant pieces together.
Back to top
View user's profile Send private message
kajzer
l33t
l33t


Joined: 27 Nov 2014
Posts: 815

PostPosted: Mon Jul 06, 2020 6:05 pm    Post subject: Reply with quote

Anon-E-moose wrote:
Ok, I'll take a step back and put this whole rootless X into perspective.

I would expect that it doesn't appeal to most businesses, because they're probably using one of the big DE's and thus using *logind
That leave home users and at that a great part will be using a big DE w/*logind.
So rather than try and get gentoo devs to add things for (an admittedly) small audience to portage packages, the best bet is to modify the wiki.

So what's left could be satisfied with the ebuild, the drm_master_util sources and the patches for different drivers.
And the best way would be to enhance/modify the rootless X page (gentoo wiki) to add info about drm_master_util, with clear messages about who should and shouldn't use this on their system. Also needs info on the driver patches and where to get them and how to properly apply them.


Yeah I agree, Wiki should be updated and it would be good if it would contain information about drm_master_util and patches, basically what needs to be done if someone wants rootless Xorg but without using *kits *loginds etc.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5579

PostPosted: Sat Jul 11, 2020 3:10 pm    Post subject: Reply with quote

if there is something working, it might be a good idea to open a feature request at gentoo bugzilla and post it there.
maybe some of the devs will pick it up and migrate it into the main repo tree.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 283

PostPosted: Sat Aug 01, 2020 10:38 pm    Post subject: Reply with quote

Anon-E-moose wrote:
And the best way would be to enhance/modify the rootless X page (gentoo wiki) to add info about drm_master_util, with clear messages about who should and shouldn't use this on their system. Also needs info on the driver patches and where to get them and how to properly apply them.

Just found that the relevant information already was added to Gentoo Wiki, but then was deleted. It can be looked at revision 884856 .

EDIT:
And there's also a draft of another page (more detailed).
Back to top
View user's profile Send private message
keks24
n00b
n00b


Joined: 12 May 2017
Posts: 4
Location: Cologne, Germany

PostPosted: Sun Aug 02, 2020 12:34 pm    Post subject: Reply with quote

halcon wrote:
Anon-E-moose wrote:
And the best way would be to enhance/modify the rootless X page (gentoo wiki) to add info about drm_master_util, with clear messages about who should and shouldn't use this on their system. Also needs info on the driver patches and where to get them and how to properly apply them.

Just found that the relevant information already was added to Gentoo Wiki, but then was deleted. It can be looked at revision 884856 .

EDIT:
And there's also a draft of another page (more detailed).


Hello halcon,

author of the draft here. :)

I am still torn, if I really should write everything down on that Wiki article, since one of the X11 project members "vandalised" the article...

Currently I am still busy doing the first task of my to-do list, but I will get back to this non-root xserver stuff.

Discussion: https://wiki.gentoo.org/wiki/Talk:Non_root_Xorg#Handling_of_DRM_IOctls
_________________
This sentence is wrong!
Back to top
View user's profile Send private message
SlashBeast
Developer
Developer


Joined: 23 May 2006
Posts: 2902

PostPosted: Sun Aug 02, 2020 12:40 pm    Post subject: Reply with quote

What is the benefit of using drm_master_util that require patching xorg and drivers, over elogind in terms of simple system? By simple system I mean a system installed from stage3, where only change from bare stage3 are:

- defined VIDEO_CARDS and INPUT_DEVICES in make.conf
- Add 'elogind' into USE in make.conf
- emerge xorg-server and openbox (or other simple WM)
- dbus added into runlevel default (and started)

And now one can start X without root, via 'startx' with openbox started from .xinitrc.
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 283

PostPosted: Sun Aug 02, 2020 12:44 pm    Post subject: Reply with quote

SlashBeast wrote:
What is the benefit of using drm_master_util that require patching xorg and drivers, over elogind in terms of simple system?

IMHO, it's "just another" option for users. Gentoo is all about options, isn't it? I always thought, it's one of the main Gentoo features.
Back to top
View user's profile Send private message
SlashBeast
Developer
Developer


Joined: 23 May 2006
Posts: 2902

PostPosted: Sun Aug 02, 2020 12:51 pm    Post subject: Reply with quote

halcon wrote:
SlashBeast wrote:
What is the benefit of using drm_master_util that require patching xorg and drivers, over elogind in terms of simple system?

IMHO, it's "just another" option for users. Gentoo is all about options, isn't it? I always thought, it's one of the main Gentoo features.


I do not disagree with it. I was just genuinely curious why would you go extra mile to replace something that is already integrated and works by default, a lot of effort went into making it as as painless as possible and I just cannot wrap my head what problem would another solution solve, when it's transparent and does not even have an interface that one could 'not like'. I know that some people take stage3, then butcher it out of basic components like PAM and then complain that some new features are not working on their system, this just does not compute for me.
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 283

PostPosted: Sun Aug 02, 2020 1:02 pm    Post subject: Reply with quote

SlashBeast wrote:
I was just genuinely curious why would you go extra mile to get something that is already integrated and works by default...

I can say only for me, as a nonprofessional coder: when I look at the code of drm_master_util, I understand it. And when I look at the code of elogind, I can't understand it. Funny but true... :) A very exaggerated analogy: what would be the reason for me to use Nero Burning ROM, if I can use a command-line tool cdrecord? Also, I see there are more dependencies... Something like this.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4877
Location: Dallas area

PostPosted: Sun Aug 02, 2020 1:04 pm    Post subject: Reply with quote

Personally I have no use for PAM, nor have I ever had it installed on my system, and I've never seen any features not working because of that.
But I don't typically run either gnome or kde apps much less big desktops, so perhaps that's a large part of it.

I understand the rational for pam, ie. the users can't be trusted to know how to do things on their systems, and this is probably true for many people, but not all
I also don't use or need a login manager, as I don't do sessions/seats, hell I don't even have CGROUPS turned on in the kernel, as I've found no personally compelling reason for me to use it.

If I were a developer then I'd have the whole kitchen sink, ie most of gentoo packages installed, simply because I might need it as part of my job. But I'm not, and thus don't need a lot of packages that will never be used, be installed on my system. But I'm not your average user, who's never seen/used unix/linux before or someone who only knows how to use redhat (example) and just installs binaries.

Not disagreeing with you, Slashbeast, just giving you my view.
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 283

PostPosted: Sun Aug 02, 2020 1:08 pm    Post subject: Reply with quote

Anon-E-moose wrote:
I don't even have CGROUPS turned on in the kernel

^^ Same here.
Back to top
View user's profile Send private message
SlashBeast
Developer
Developer


Joined: 23 May 2006
Posts: 2902

PostPosted: Sun Aug 02, 2020 1:11 pm    Post subject: Reply with quote

Anon-E-moose wrote:
Personally I have no use for PAM, nor have I ever had it installed on my system, and I've never seen any features not working because of that.
One of the basic features is /etc/security/limits.conf that is pam_limits powered, without it, all you can do is setup ulimts in .bashrc or profile files, but you can bypass them using ssh to never execute them, so not that great if you have a shell server for example.


Anon-E-moose wrote:
I understand the rational for pam, ie. the users can't be trusted to know how to do things on their systems, and this is probably true for many people, but not all
I also don't use or need a login manager, as I don't do sessions/seats, hell I don't even have CGROUPS turned on in the kernel

You're missing on a great feature that depends on CGROUPS, the CONFIG_SCHED_AUTOGROUP, Here you can read about it when it first was developed https://www.phoronix.com/scan.php?page=article&item=linux_2637_video&num=1

Anon-E-moose wrote:
Not disagreeing with you, Slashbeast, just giving you my view.
and I do appreciate it.
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 283

PostPosted: Sun Aug 02, 2020 2:25 pm    Post subject: Reply with quote

Hi keks24,

keks24 wrote:
I am still torn, if I really should write everything down on that Wiki article, since one of the X11 project members "vandalised" the article...

I am a noob at Gentoo Wiki, registered yesterday, not aware of practise. But I've seen another useful user drafts. As I understand, it's like making a fork.

EDIT: And as it is dedicated only to one chapter (use case), it could be far more detailed, why not?
Back to top
View user's profile Send private message
keks24
n00b
n00b


Joined: 12 May 2017
Posts: 4
Location: Cologne, Germany

PostPosted: Sun Aug 02, 2020 2:38 pm    Post subject: Reply with quote

halcon wrote:
Hi keks24,

keks24 wrote:
I am still torn, if I really should write everything down on that Wiki article, since one of the X11 project members "vandalised" the article...

I am a noob at Gentoo Wiki, registered yesterday, not aware of practise. But I've seen another useful user drafts. As I understand, it's like making a fork.


It may be seen as a fork, yes. But it is still more like a draft, which you then can merge with the original Wiki article. Working in your user space, instead of live-editing is/should be common practise. I once forgot that and "Grknight" gave me a rebuke. :)

I am torn, due to the fact, that my work on the original Wiki article gets edited again by SlashBeast, because he thinks, it is unnecessary to put these information on the article. So my work was, more or less, for nothing. :)

-keks24
_________________
This sentence is wrong!
Back to top
View user's profile Send private message
halcon
Apprentice
Apprentice


Joined: 15 Dec 2019
Posts: 283

PostPosted: Sun Aug 02, 2020 2:45 pm    Post subject: Reply with quote

keks24 wrote:
more like a draft, which you then can merge with the original Wiki article

Ah, it works so...

I searched in my browser history for wiki/User and found that those useful pages that I remember are not drafts but simple user pages, as, for example,
https://wiki.gentoo.org/wiki/User:NeddySeagoon/HOWTO_Update_Old_Gentoo
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
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 5 of 8

 
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