Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Failed to add/activate connection. Wireless
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
pyhxr
n00b
n00b


Joined: 16 Jun 2014
Posts: 8

PostPosted: Mon Jul 14, 2014 4:18 pm    Post subject: Failed to add/activate connection. Wireless Reply with quote

Linux genice 3.12.21-gentoo-r1 #5 Tue Jul 8 19:29:30 PDT 2014 ppc 7447A, altivec supported PowerBook6,7 GNU/Linux

Using Network Manager (nm-applet specifically) I can see access points but do not have sufficient privileges to connect via wifi.
Wired ethernet does work. I would prefer to use this solution as opposed to Wicd/WPA_supp if possible.

I did see, read and follow article https://forums.gentoo.org/viewtopic-t-858965.html by ssuominen and even thanked him before I realized that it was still not working. [edit: this link is now fixed]

Code:
$ ck-list-sessions
Session1:
        unix-user = '1000'
        realname = '(null)'
        seat = 'Seat1'
        session-type = ''
        active = FALSE
        x11-display = ''
        x11-display-device = ''
        display-device = '/dev/tty1'
        remote-host-name = ''
        is-local = TRUE
        on-since = '2014-07-14T13:10:10.590384Z'
        login-session-id = ''
        idle-since-hint = '2014-07-14T13:11:26.436193Z'
Session2:
        unix-user = '1000'
        realname = '(null)'
        seat = 'Seat2'
        session-type = ''
        active = FALSE
        x11-display = ':0'
        x11-display-device = '/dev/tty7'
        display-device = '/dev/tty1'
        remote-host-name = ''
        is-local = FALSE
        on-since = '2014-07-14T13:11:12.251020Z'
        login-session-id = ''
Session3:
        unix-user = '1000'
        realname = '(null)'
        seat = 'Seat3'
        session-type = ''
        active = FALSE
        x11-display = ''
        x11-display-device = ''
        display-device = '/dev/ssh'
        remote-host-name = '10.0.2.85'
        is-local = FALSE
        on-since = '2014-07-14T13:36:38.224174Z'
        login-session-id = ''

# /etc/init.d/consolekit start
* WARNING: consolekit has already been started

$ cat .xinitrc
#exec ck-launch-session startxfce4 <-- the original was changed to
exec dbus-launch --sh-syntax --exit-with-session startxfce4 --with-ck-launch <-- this, the --with-ck-launch added from *note 1*
eval $(gnome-keyring-daemon --components=pkcs11,secrets,ssh,gpg)
export GNOME_KEYRING_PID
export GNOME_KEYRING_SOCKET
export SSH_AUTH_SOCK
export GPG_AGENT_INFO
#dbus-launch nm-applet & <-- taken off because nm-applet launches without it and

"- When using the native ConsoleKit support (which is either enabled by USE="consolekit" or always enabled in the different display managers) you should *not* write commands like dbus-launch or ck-launch-session yourself *anywhere* because the display manager does it for you."
*note 1* from http://jeffhoogland.blogspot.com/2012/05/howto-give-network-manager-sufficient.html but I made the file and put it in
/etc/polkit-1/localauthority/50-local.d/ which I had to create. It disappeared after a reboot.
EDIT: It just dawned on me that anywhere included the .xinitrc file so I have removed ck-launch-session at the end of the 2nd line


[nm-applet]
Identity=unix-group:netdev
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
ResultInactive=no
ResultActive=yes

Code:
# cat /etc/pam.d/system-login
auth            required        pam_tally2.so onerr=succeed
auth            required        pam_shells.so
auth            required        pam_nologin.so
auth            include         system-auth
 
account         required        pam_access.so
account         required        pam_nologin.so
account         include         system-auth
account         required        pam_tally2.so onerr=succeed
 
password        include         system-auth
 
session         optional        pam_loginuid.so
session         required        pam_env.so
session         optional        pam_lastlog.so silent
session         include         system-auth
session         optional        pam_ck_connector.so nox11
session         optional        pam_motd.so motd=/etc/motd
session         optional        pam_mail.so


Code:
# cat /etc/fstab
#/dev/BOOT            /boot             ext2               noauto,noatime  1 2
/dev/hda4               /                    ext3               noatime             0 1
/dev/hda3               none              swap              sw                     0 0
/dev/cdrom             /mnt/cdrom    auto               noauto,user        0 0
#/dev/fd0               /mnt/floppy    auto               noauto                0 0


$ ck-history --log
https://pastebin.com/JMY3Q2TP

# cat /etc/portage/make.conf
https://pastebin.com/KbgeW8Kn

Double checked all the kernel parameters listed in that sticky and pretty much went over ssuominen post about 20x
https://forums.gentoo.org/viewtopic-p-.html#

$ groups
wheel audio cdrom video cdrw usb users plugdev pyhxr netdev

Read this as well,
https://wiki.archlinux.org/index.php/NetworkManager#Set_up_PolicyKit_permissions
-- this part is different for me
Option 1. Run a PolicyKit authentication agent when you log in, such as /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 (part of polkit-gnome). You will be prompted for your password whenever you add or remove a network connection.

## this part is edited from the original post
## because a ps aux showed polkit-gnome-auth agent running
## I don't have that file I have
## /usr/lib/polkit-1/polkit/polkit-agent-helper-1
## and polkitd
## should I have polkit-gnome-authentication-agent ?

I've tried killing nm-applet and restarting it as root
I get the process ID but the applet disappears from the panel

basic stuff shows...
# ifconfig wlan0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether xx:xx:xx:xx:xx:xx txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

iwconfig wlan0
wlan0 no wireless extensions.

iw wlan0 info
Interface wlan0
ifindex 3
wdev 0x1
addr xx:xx:xx:xx:xx:xx
type managed
wiphy 0

# iw wlan0 connect "987654321"
# iw dev wlan0 link
Not connected. <-- this is predefined in wpa_supplicant

# cat /etc/wpa_supplicant/wpa_supplicant.conf
https://pastebin.com/UM1Z1W9k

Well looking at my browser history I think I've read several hundred posts about this topic, from just about every major Linux distro
so I might be forgetting a few things that I've done here, but I always end up with the "failed to activate connection (32) Not authorized to control networking" pop-up (connection failure).

I noticed running airmon-ng doesn't show anything either. It's very strange that b43 (wl is blacklisted) loads, can see APs, but cannot connect to anything
I used to be proficient grabbing a wifi network manually with iwconfig, now that this is deprecated for iw I have not been successful getting any (even open wifi) to connect via the command mentioned above. Tcpdump won't capture either because I need monitor mode but when I run iwconfig wlan0 mode monitor (as root) I receive Error for wireless request "Set Mode" (8B06) : Set failed on device wlan0 ; operation not supported. Well, I've captured many packets and used wifi with Debian on this same box so I know all this stuff is possible, sure would be nice to do this on Gentoo.

Thank you in advance for any advice or help
_________________
main(int c,char**v){return!m(v[1],v[2]);}m(char*s,char*t){return*t-42?*s?63==*t|*s==*t&&m(s+1,t+1):!*t:m(s,t+1)||*s&&m(s+1,t);}


Last edited by pyhxr on Tue Jul 15, 2014 6:48 am; edited 5 times in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Tue Jul 15, 2014 4:32 am    Post subject: Reply with quote

nm-applet uses dbus to communicate to Networkmanager which runs as root. nm-applet should be running as an unprivileged user, the one who took control of the console.

If you're seeing that you don't have permissions, this is probably one of the ugliest things that could happen, but I found that the Gentoo devs did a fairly good job to make sure it works out of the box. As I don't have a ppc I don't know how this translates from x86/x86-64.

1. What make.profile are you using? (/etc/make.conf -> /usr/portage/profiles/default/linux/powerpc/ppc32/13.0/desktop/gnome/systemd if you're using gnome 3 ?)
2. I assume NetworkManager is started since wired is working?
3. What are your make.conf USE flags?

Now I'm not sure how you got things installed without polkit-gnome. You may need to re-emerge NetworkManager and more likely nm-applet with --deep and --newuse after getting the standard USE flags setup properly.

Theoretically with networkmanager you won't need to muck with wpa_supplicant directly anymore.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
pyhxr
n00b
n00b


Joined: 16 Jun 2014
Posts: 8

PostPosted: Tue Jul 15, 2014 6:25 am    Post subject: re: nm-applet Reply with quote

Thank you for taking a shot at this.

from eselect profile list:
[2] default/linux/powerpc/ppc32/13.0/desktop *

ps aux | grep -i networkmanager
root 1774 0.0 1.6 57144 8464 ? Ssl 08:47
0:10 /usr/sbin/NetworkManager --pid-file /run/NetworkManager/NetworkManager.pid

Yes, NetworkManager starts up perfectly for the wired connection, and after following ssuominen's tut I was able to view the applet
and see available access points. ( The applet was missing somewhere prior to those many steps but I was able to scan ap's with the iw
command)

My USE flags
USE="consolekit pam policykit caps crypt filecaps gtk2 ipv6 netlink pcap ssl zlib -adns \
networkmanager bindist -gnome -kde -minimal -doc -doc-pdf -geopip \
-gtk3 -kerberos -libadns examples fcd grc jack oss pager \
performance-counters portaudio uhd wavelet -qt4 dbus jpeg lock session \
startup-notification thunar udisks upower udev X alsa"

Numerous times I have emerged software that required me to --autounmask-write, this led to when I run
# emerge -avDNut world
It would fail unless I ran
emerge --resume --exclude appA --exclude appB --exclude appC
this list got quite large!
If this is a noob mistake, please point me to what I should be reading.


ps aux | grep polkit
polkitd 1783 0.0 1.8 71504 9388 ? Sl 08:47 0:02 /usr/lib/polkit-1/polkitd --no-debug
pyhxr 3891 0.0 2.0 38872 10716 tty1 Sl 19:37 0:00 /usr/libexec/polkit-gnome-authentication-agent-1

So I need to edit the last post, because I guess that is running

Just so I understand clearly:
You mention re-emerging after I get the standard USE flags up and running. would this be accomplished by switching profiles to gnome,
then running emerge NM with --deep --newuse?

[I noticed the above link to the initial article was broken, I fixed that.]
_________________
main(int c,char**v){return!m(v[1],v[2]);}m(char*s,char*t){return*t-42?*s?63==*t|*s==*t&&m(s+1,t+1):!*t:m(s,t+1)||*s&&m(s+1,t);}
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Tue Jul 15, 2014 2:23 pm    Post subject: Reply with quote

Ok it looks like you're running xfce as your desktop and don't need to use the Gnome profile. You have the correct profile setting, but I don't think it's necessary to have all those USE flags.

You have a huge USE flags list, and I've noticed in the past that having a lot of -XXX flags tends to cause problems. The ones that seem most worrysome is having -gnome, though I'm not sure what the consequences of that is. Don't worry it won't install gnome if you omit that use flag, but it tends to cause strange issues for programs that were designed for Gnome.

I'm a bit worried about the bit about --autounmask-write - so at the moment, when you emerge -avDNut world, it doesn't work properly?

This is a fairly serious issue, you may have a bunch of programs that are simply incompatible with each other now... You should never need to --exclude to update. Which packages are you manually holding back now?

Should try to clean up your system so that emerge will work without having to exclude packages...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
pyhxr
n00b
n00b


Joined: 16 Jun 2014
Posts: 8

PostPosted: Wed Jul 16, 2014 2:03 pm    Post subject: update Reply with quote

eccerr0r: thanks for the advice, I changed my USE flags to
USE="-gtk3 -qt4 alsa consolekit dbus pam policykit udev udisks upower"
then ran
# emerge -avDNUT world
It has not changed my permission problem with regards to the nm-applet, however I was able to complete the process without excluding anything. It took about 24 hours but I'm glad that's fixed.

I'm going to start going through logs and see what I can find there. I've turned up the verbosity and read and implemented syslog-ng.
I have to get some things finished today so this will be on hold for a little while.
_________________
main(int c,char**v){return!m(v[1],v[2]);}m(char*s,char*t){return*t-42?*s?63==*t|*s==*t&&m(s+1,t+1):!*t:m(s,t+1)||*s&&m(s+1,t);}
Back to top
View user's profile Send private message
pyhxr
n00b
n00b


Joined: 16 Jun 2014
Posts: 8

PostPosted: Tue Jul 22, 2014 7:31 pm    Post subject: update 2 Reply with quote

I have nothing to report on the nm-applet problem yet.

I mentioned earlier having problems with monitor mode: I found out that this is solved by using the ip command.
you would just pass monitor mode to ip and create a separate interface and call it something linke 'mon0' for instance. Then use TCP dump or kismet. I might just end up removing Network-Manager and going with Wpa_supplicant and Wicd. I will revisit this in a few weeks, due to priorities.
_________________
main(int c,char**v){return!m(v[1],v[2]);}m(char*s,char*t){return*t-42?*s?63==*t|*s==*t&&m(s+1,t+1):!*t:m(s,t+1)||*s&&m(s+1,t);}
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC 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