Artix Linux Forum

Artix Linux => Installation / Migration / Configuration => Topic started by: Phoen7x on 18 January 2019, 13:30:07

Title: Not authorized to control networking. with OpenRC
Post by: Phoen7x on 18 January 2019, 13:30:07
Hello everybody,
I have now also run GNU / Linux with OpenRc as init on my laptop.
Unfortunately I was confronted with new problems there.
I'm runnig XFCE4 and lightdm as desktop engine.

1. I'm not able to add a W-Lan Network (LAN works):
If i  go thrue notification area "Connect to a hidden wireless network" (other networks are listed there) i get the error:
Code: [Select]
(1) Not authorized to control networking.
and if i go to networkconnections i get the error:
Code: [Select]
Insufficient privileges.
The questionable hereby, i'm able to shutdown restart and standy as a normal user so polkit-elogind should not be the problem.
Solution: this workaround (https://wiki.gentoo.org/wiki/NetworkManager#Fixing_nm-applet_insufficient_privileges) change plugdev to network and add user.

2. My disk is fully encrypted with luks LVM (without /boot), however, I do not yet have the right keymap to decrypt even tough:
Code: [Select]
HOOKS=(base udev autodetect modconf block keyboard keymap encrypt lvm2 filesystems fsck)
Solution: Forgot to add the keymap also in: /etc/vconsole.conf and /etc/conf.d/keymaps

3. I'm not able to control the backlight Forgot install xf86-video...
3. Laptop doesn't suspend if i close the notebook lid, but if i manually suspend and open the lid, laptop starts...
Solution:
Code: [Select]
# xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -n -t bool -s false


Hope you can help me.
Thank you. :)
Title: Re: Problems on Laptop with OpenRC
Post by: nous on 18 January 2019, 22:02:21
Please, post more information about your system. Is it pure Artix install? Migrated from systemd?
For #1: post your group membership as reported by id. You should be a member of power group.
For #2: is your keymap included in initrd? For example, I explicitly specify my font file in /etc/mkinitcpio.conf:
Code: [Select]
FILES="/usr/share/kbd/consolefonts/ter-v16b.psf.gz"
For #3: Assuming elogind is up and running, you need a directive in /etc/elogind/logind.conf:
Code: [Select]
HandleLidSwitch=suspend
Title: Re: Problems on Laptop with OpenRC
Post by: Phoen7x on 18 January 2019, 23:04:16
Thank you for your response.

It's a fresh openrc installation, no migration.
#1 My groups:
Code: [Select]
uid=1000(host) gid=985(users) Gruppen=985(users),3(sys),998(wheel),995(audio),994(disk),990(optical),988(storage),986(video)
I don't know why i must be in the group power, because shotdown and restart works perfect?

#2 I don't know how you mean this? I think my keymap is:
/usr/share/kbd/keymaps/i386/qwertz/de-latin1.map.gz

#3 I've uncommented the line, restartet but the laptop doesn't suspend altough ive set same in powersettings.
Title: Re: Problems on Laptop with OpenRC
Post by: SGOrava on 19 January 2019, 00:30:24
Can you try to follow this section on ArchWiki ?
https://wiki.archlinux.org/index.php/NetworkManager#Set_up_PolicyKit_permissions

In short you should also create (if it does not exist) and add user to "network" group.
Title: Re: Problems on Laptop with OpenRC
Post by: nous on 19 January 2019, 01:15:24
Code: [Select]
dmesg -wHT | grep -i lid
Open close the lid and see if it gets registered; you should get something similar to
Code: [Select]
[Sat Jan 19 01:28:11 2019] elogind-daemon[2397]: Lid closed.
[Sat Jan 19 01:28:14 2019] elogind-daemon[2397]: Lid opened.
If yes, then your Xfce is intercepting the action. But you're saying you have the same in power settings; this means Xfce inhibits elogind but can't convey the action. Try setting lid action to 'Ignore' and see if elogind takes over. Does LXQt work?

Networkmanager is confirmed to work in fresh Artix installations. Do you remember having tampered with any related settings or disabling any daemons? Do you get any additional messages in /var/log/everything.log? Post your 'rc-status --all' at our pastebin (https://paste.artixlinux.org).

Title: Re: Problems on Laptop with OpenRC
Post by: Phoen7x on 19 January 2019, 13:01:12
Can you try to follow this section on ArchWiki ?
https://wiki.archlinux.org/index.php/NetworkManager#Set_up_PolicyKit_permissions

In short you should also create (if it does not exist) and add user to "network" group.
This also doesn't solves the WiFi problem... :(

dmesg -wHT | grep -i lid:
Code: [Select]
[Fr Jan 18 23:09:24 2019] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input2
[Fr Jan 18 23:09:24 2019] ACPI: Lid Switch [LID0]
[Fr Jan 18 23:17:14 2019] ACPI: button: The lid device is not compliant to SW_LID.
In /var/log/everything.log
Code: [Select]
Jan 19 12:56:09 host root[3347]: LID closed
...
Jan 19 12:56:23 host root[3353]: LID opened

rc-status --all
Code: [Select]
Runlevel: default
 dbus                                                              [  started  ]
 elogind                                                           [  started  ]
 iptables                                                          [  stopped  ]
 syslog-ng                                                         [  started  ]
 wpa_supplicant                                                    [  started  ]
 NetworkManager                                                    [  started  ]
 acpid                                                             [  started  ]
 avahi-daemon                                                      [  started  ]
 netmount                                                          [  started  ]
 xdm                                                               [  started  ]
 alsasound                                                         [  started  ]
 ntp-client                                                        [  stopped  ]
 cronie                                                            [  started  ]
 local                                                             [  started  ]
 agetty.tty3                                           [  started 13:50:32 (0) ]
 agetty.tty6                                           [  started 13:50:32 (0) ]
 agetty.tty5                                           [  started 13:50:32 (0) ]
 agetty.tty2                                           [  started 13:50:32 (0) ]
 agetty.tty4                                           [  started 13:50:32 (0) ]
 agetty.tty1                                           [  started 13:50:32 (0) ]
Runlevel: sysinit
 devfs                                                             [  started  ]
 sysfs                                                             [  started  ]
 udev                                                              [  started  ]
 dmesg                                                             [  started  ]
 kmod-static-nodes                                                 [  started  ]
 udev-trigger                                                      [  started  ]
 cgroups                                                           [  started  ]
Runlevel: shutdown
 killprocs                                                         [  stopped  ]
 savecache                                                         [  stopped  ]
 mount-ro                                                          [  stopped  ]
Runlevel: nonetwork
 local                                                             [  started  ]
Runlevel: boot
 hwclock                                                           [  started  ]
 sysctl                                                            [  started  ]
 loopback                                                          [  started  ]
 modules                                                           [  started  ]
 dmcrypt                                                           [  started  ]
 lvm                                                               [  started  ]
 fsck                                                              [  started  ]
 root                                                              [  started  ]
 mtab                                                              [  started  ]
 swap                                                              [  started  ]
 localmount                                                        [  started  ]
 bootmisc                                                          [  started  ]
 procfs                                                            [  started  ]
 binfmt                                                            [  started  ]
 hostname                                                          [  started  ]
 haveged                                                           [  started  ]
 termencoding                                                      [  started  ]
 keymaps                                                           [  started  ]
 urandom                                                           [  started  ]
 net.lo                                                            [  started  ]
 opensysusers                                                      [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 lvmetad                                                           [  started  ]
 xdm-setup                                                         [  started  ]
Dynamic Runlevel: manual

Networkmanager is confirmed to work in fresh Artix installations. Do you remember having tampered with any related settings or disabling any daemons? Do you get any additional messages in /var/log/everything.log?

I've got nothing disabled. What exactly should I look for in the log?
Title: Re: Problems on Laptop with OpenRC
Post by: artoo on 19 January 2019, 13:25:38
elogind needs to be in the boot runlevel, remove it from default and add it to boot.
Title: Re: Problems on Laptop with OpenRC
Post by: Phoen7x on 19 January 2019, 20:06:32
elogind needs to be in the boot runlevel, remove it from default and add it to boot.
This doesn't solve any of my problems. :(

Under systemd + KDE Plasma + WaylandSession closing the lid suspend the computer (same with xserver works non-reliable).

I don't understand why I should have the wrong permission to add a WiFi. Is there any workaround to add it with a configfile trough the terminal?
Title: Re: Not authorized to control networking. with OpenRC
Post by: Phoen7x on 19 January 2019, 23:31:30
If i want to disconnect Wired connection, i get also an error...
Code: [Select]
(1) org.freedesktop.NetworkManager.network-control request failed: not autorized
does this focus the error?
Title: Re: Not authorized to control networking. with OpenRC
Post by: Phoen7x on 20 January 2019, 13:07:49
if i
Code: [Select]
sudo nm-connection-editor
I am able to save the settings, but if I want to connect. Something ask for my WPA2 passphrase although i've set this in the connection editor?...

and if i
Code: [Select]
sudo nm-applet
Code: [Select]
** Message: 13:12:46.320: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
nm-applet-Message: 13:12:46.320: No keyring secrets found for Heimnetzwerk/802-11-wireless-security; asking user.
If i open nm-applet as normal user, there is really no passphrase seted, but if i opend as root there is.  :(

And I find out that there is no file:
/etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf or something like nm
Title: Re: Not authorized to control networking. with OpenRC
Post by: SGOrava on 20 January 2019, 17:19:24
Quote
And I find out that there is no file:
/etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf or something like nm

If you looks at NetworkManager files, you will see this file at
Code: [Select]
/usr/share/dbus-1/system.d/org.freedesktop.NetworkManager.conf
Title: Re: Not authorized to control networking. with OpenRC
Post by: Phoen7x on 20 January 2019, 19:38:29
Oh.
Don't know what to doo...  :'(

Where should I look? on systemd I doesn't have these problems... :(
Title: Re: Not authorized to control networking. with OpenRC
Post by: nous on 20 January 2019, 23:37:15
Add your user to 'dbus' group.
Code: [Select]
% sudo usermod -G dbus -a $(whoami)
Logout, login, check your group membership and retry NM.
Title: Re: Not authorized to control networking. with OpenRC
Post by: Phoen7x on 21 January 2019, 15:40:08
Add your user to 'dbus' group.
Code: [Select]
% sudo usermod -G dbus -a $(whoami)
Logout, login, check your group membership and retry NM.
The same error.
Code: [Select]
(1) org.freedesktop.NetworkManager.network-control request failed: not autorized
I've got running an older version of the same GNU/Linux but with KDE Plasma instead of XFCE. Same groups, same services, there is no problem... It might be a problem with OpenRC and XFCE?
Title: Re: Not authorized to control networking. with OpenRC
Post by: SGOrava on 23 January 2019, 11:41:47
some polkit hell ?
Title: Re: Not authorized to control networking. with OpenRC
Post by: Phoen7x on 23 January 2019, 15:06:10
I don't know what you mean?  ::)

Where could i find the request for: org.freedesktop.NetworkManager.network-control ?
On my system there is many systemd-stuff ...  :o , but only systemd-dummy and libsystemd-dummy, not the real package.
Existing groups:
Code: [Select]
systemd-journal-remote:x:982:
systemd-network:x:981:
systemd-resolve:x:980:
systemd-timesync:x:979:
systemd-coredump:x:978:
folder with systemd-service-units
/usr/share/dbus-1/system-services -> org.freedesktop.NetworkManager.service, org.freedesktop.nm_dispatcher.service, org.freedesktop.PolicyKit1.service
Could this be a problem?
I've removed org.freedesktop.ModemManager1.service and now, the warning that this service could not acquire is gone.
Title: Re: Not authorized to control networking. with OpenRC
Post by: Phoen7x on 25 January 2019, 18:43:38
The mainproblem seems to be be solved:
Ive forgot to change the group in the gentoo-workaround to network.

Only the problem with the lid and suspend i could not solve...
Title: Re: Not authorized to control networking. with OpenRC
Post by: nous on 25 January 2019, 20:21:36
Try another desktop (LXQt). If it can suspend then you can narrow the problem down to xfce4.
Title: Re: Not authorized to control networking. with OpenRC
Post by: Phoen7x on 25 January 2019, 20:43:35
Try another desktop (LXQt). If it can suspend then you can narrow the problem down to xfce4.
I've testet before KDE Plasma 5. There it works only in the wayland-session...  ::)
Seems that this could help, but I didn't know how...
Quote
Problem is that xfce4-power-manager (xf4pm) is letting logind handle the lid close, and that happens because the logind-handle-lid-switch field in xf4pm settings is by default set to true (no idea why). To make xf4pm have control over lid close, we have to set that field to false: xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s false.
Title: Re: Not authorized to control networking. with OpenRC
Post by: slblxs on 27 January 2019, 18:36:12
Today I had this problem, but in Artix runit. After upgrading, I could not connect to the wifi. I opened edit conections, and in the general tab I left as it is in the image.
And solved, just to leave this tip if there is anyone else with this problem.



Sorry to be in Portuguese. :)