Re: [gentoo-user] can't start X as user

2023-06-14 Thread Philip Webb
230614 Michael wrote:
> On Wednesday, 14 June 2023 01:21:53 BST Philip Webb wrote:
>> My new machine has no problem with graphics using System Rescue etc
>> nor using 'startx' as root with Gentoo, but it refuses to start as user.
>> I've had a series of errors :
>>   parse_vt_settings : can't open /dev/tty0 (permission denied)
>> after adding my user to 'tty input' in 'group' :
>>   can't open virtual console 7 : permission denied
> Not sure if this is necessary:
> 
>   $ grep 'tty|input' /etc/group
>   tty:x:5:
>   input:x:97:

My user is in 'tty wheel usb input video' (among others).

> The elogind service ought to be in boot runlevel according to the wiki:
> https://wiki.gentoo.org/wiki/Elogind#Configuration

I've corrected that & checked that Pam is running & Udev is in 'sysinit'.

>> 'xorg-server' has 'USE="elogind"'.
>> In my current machine, there is a  /dev/fb0  with permission  660 .
>> but there is no such device in the new machine.

Ditto for  /dev/dri/card0 .

> Have you followed this wiki page to configure your kernel,
> include the appropriate firmware for your card(s),
> set up INPUT_DEVICES & VIDEO_CARDS in make.conf,
> emerged associated x11-base/xorg-drivers
> and the x11-base/xorg-server packages before a reboot ?
> https://wiki.gentoo.org/wiki/Xorg/Guide

Yes.  I have "evdev" + "radeon vesa" in 'make.conf'.
'xf86-video-ati/vesa' are installed,
as is 'xorg-server' + all its requirements ("dependencies").

> There should be a fb0 device listed:
>   $ ls -l /dev/fb*
>   crw-rw 1 root video 29, 0 Jun 14 08:52 /dev/fb0

ANB5 has  /dev/fb0  /dev/dri/card0  with  660  permitions, ANB6 hasn't
(those are my names for the present + new machines).

> You'll also need to have emerged a Desktop Environment
> or at least a window manager: https://wiki.gentoo.org/wiki/Window_manager

I've installed 'twm xterm' to test X for now.
I will install KDE for regular use later.

'.xinitrc' is

  #xscreensaver &
  numlockx
  exec dbus-launch --exit-with-session /usr/bin/twm

ie the same as in ANB5, but substituting Twm for Plasma.

230614 Jack wrote :

> what does /var/log/Xorg.0.log show ?

It has these errors (EE) in the X log file :

  Failed to load module "fbdev" (does not exist)
  Open /dev/dri/card0 : no such directory or file
  VESA (0) : cannot read int vect
  Screens found, but none has a useable configuration

Do I need 'fbdev' or 'card0' ?  Whatever is "int vect" ?

When I try to 'startx' as user, the log file is in  ~/.local/share/xorg ,
which is also where it is in ANB5.  When I try 'Xorg -configure',
it produces nothing of use & dumps it in my home directory (ugh).

I can probably cut the Gordian knot by emerging Xorg-server with 'suid'.
How insecure is that for a single-user system in a house ?
The Elogind approach has worked in ANB5 since Aug 2020.

I can't make much of a useful comparison between the  2  machines,
as ANB5 dates from 2015, ie long before the 'elogind' affair in 2020,
& it has Nvidia graphics, whereas ANB6 has cutting-edge AMD.

BTW System Rescue + Mint (live USB) load modules for AMDGPU,
which seems to be the latest graphics offering ;
I need to find some firmware to get it to work
(enabling AMDGPU in the kernel causes the boot process to stall
with a message re missing firmware).
There are in fact  2  graphics tools in ANB6,
one in the CPU (AMD), the other on the Mobo (Gigabyte).
How can I tell which one the machine is trying to use ?

I will continue to poke around, but further advice is very welcome.
Please read my comments above carefully (smile).

-- 
,,
SUPPORT ___//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT`-O--O---'   purslowatchassdotutorontodotca




[gentoo-user] Re: can't start X as user

2023-06-14 Thread James Cloos
if nothing else works, this should:

  :; chmod 4711 /usr/bin/Xorg

that was changed to not be suid some time back, relying instead on
things like elogind.  but the old way should still work.

on gentoo the suid use flag for x11-base/xorg-server would do that
at merge time.

-JimC
-- 
James Cloos  OpenPGP: 0x997A9F17ED7DAEA6



Re: [gentoo-user] Re: Can't upgrade portage or update/install ebuilds

2023-06-14 Thread Michael
On Tuesday, 13 June 2023 19:06:33 BST Laurence Perkins wrote:
> >From: Mitch D. futurehyp...@gmail.com
> >Sent: Tuesday, June 13, 2023 9:36 AM
> >To: gentoo-user@lists.gentoo.org
> >Subject: Re: [gentoo-user] Re: Can't upgrade portage or update/install
> >ebuilds
 
> >On Tue, Jun 13, 2023 at 10:38 AM Grant Edwards
> >grant.b.edwa...@gmail.com wrote:
 On
> >2023-06-12, Wol antli...@youngman.org.uk
> >wrote:>
> >> On 09/06/2023 21:16, Grant Edwards wrote:
> >> 
> >>> On 2023-06-09, Daniel Pielmeier
> >>> bil...@gentoo.org wrote:
>>>
> >>>
> >>>
>  If it is only about gemato then temporary disable the rsync-verify
>  flag
>  which pulls it in.
> 
> 
> 
>  # USE="-rsync-verify" emerge sys-apps/portage
> >>>
> >>>
> >>>
> >>> The problem I ran into is that you never know how many issues there
> >>> are standing in the way of upgrading. The one time I decided to muscle
> >>> my way through updating an "obsolete" Gentoo install, [...]
> >>>
> >>>
> >>>
> >>> You do learn alot about how portage/emerge works...
> >>>
> >>>
> >>>
> >> Learning that is a good idea maybe :-)
> >>
> >>
> >>
> >> But last time I had a well-out-of-date system, it was a long and
> >> messy process ...
> >>
> >>
> >>
> >> What I did was, every time portage said "giving up" or "conflict found"
> >> or whatever, I just took a note of as many of the packages I could
> >> remember that portage said it could emerge, and then manually updated
> >> them "emerge --update --one-shot".
> >>
> >>
> >>
> >> And any conflicts, if I dared, I simply deleted then "emerge -C
> >> --one-shot".
>
> >
> >IIRC, at one point Python was one of those problems, and I stupidly
> >removed Python before realizing what that meant...
> >
> >Hilarity ensued.
> >
> >Removing/skipping as many of the non-essential "big" packages and
> >their dependancies and getting the base system updated is indeed the
> >best way to go.
> >
> >I second this approach. When rescuing a Gentoo system, my first step would
> >be to deselect any and every non-critical package from @world, then try to
> >get @system updated through any means necessary. In the past, I've removed
> >packages instead of deselecting them, but I've had cases where depclean
> >refused to do anything because there were already dependency problems, and
> >sometimes it's hard to know what's safe to unmerge with "-C".
 
> 
> I have noticed that doing a --unmerge on virtual/* clears away whole
> sections of conflicts in a lot of cases.
 
> Doing the same on dev-perl/* is a decent trick too if it's snarled enough
> that perl-cleaner runs into conflicts.  But sometimes perl dependencies
> aren't correctly spelled out, so you may have to reinstall some of it by
> hand in some cases.
 
> And you'd be surprised how many “hard” dependency version requirements are
> “softer” than expected.  Using the "ebuild" tool to force it to "just do
> what it's told" and install the new version, and then "emerge -e @world" at
> the end of it all to clean up any mess uses a lot of machine time, but it
> can save a lot of human time.
 
> LMP

I start with the basic toolchain and if this succeeds, I proceed with @system.  
I never remove packages belonging to the toolchain.  If the toolchain Blockers 
are impossible to resolve, I download a Stage 3, chroot into it with a LiveUSB 
and build binary packages for the blocked toolchain components.  Then it is a 
matter of copying them over, emerging them and trying again to update/upgrade 
the toolchain, before I start on @system.

If things are seriously broken I tend to reinstall, because in many cases it 
is a faster route.

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] can't start X as user

2023-06-14 Thread Michael
On Wednesday, 14 June 2023 01:21:53 BST Philip Webb wrote:
> My new machine has no problem with graphics using System Rescue etc
> nor using 'startx' as root with Gentoo, but it refuses to start as user.
> 
> I've had a series of errors :
> 
>   parse_vt_settings : can't open /dev/tty0 (permission denied)
> 
> after adding my user to 'tty input' in 'group' :
> 
>   can't open virtual console 7 : permission denied

Not sure if this is necessary:

$ grep 'tty|input' /etc/group
tty:x:5:
input:x:97:


> after adding 'elogind' to 'default' runlevel & starting it :
> 
>   xf86EnableIO : failed to enable I/O ports -03ff
>(operation not permitted)

The elogind service ought to be in boot runlevel according to the wiki:

https://wiki.gentoo.org/wiki/Elogind#Configuration


> yes, my user is in the 'video' group & 'xorg-server' has  USE="elogind" .
> 
> In my current machine, there is a  /dev/fb0  with permission  660 .
> but there is no such device in the new machine.

Have you followed this wiki page to configure your kernel, include the 
appropriate firmware for your card(s), set up INPUT_DEVICES & VIDEO_CARDS in 
make.conf, emerge associated x11-base/xorg-drivers and the x11-base/xorg-
server packages before a reboot?

https://wiki.gentoo.org/wiki/Xorg/Guide

There should be a fb0 device listed:

$ ls -l /dev/fb*
crw-rw 1 root video 29, 0 Jun 14 08:52 /dev/fb0

You'll also need to have emerged a Desktop Environment, or at least a window 
manager:

https://wiki.gentoo.org/wiki/Window_manager

Check the above wiki pages and post back with any queries and accompanying 
logs if things do not work as expected.

signature.asc
Description: This is a digitally signed message part.