* [gentoo-user] Wlan disappeared after suspend
@ 2016-09-13 8:23 Bertram Scharpf
2016-09-13 12:08 ` Michael Orlitzky
0 siblings, 1 reply; 13+ messages in thread
From: Bertram Scharpf @ 2016-09-13 8:23 UTC (permalink / raw
To: gentoo-user
Hi,
after suspend, my wlan is dead and it cannot be restarted. I
searched Google for the problem and I found a solution that
might work, I thought. But it doesn't.
I added a line to /etc/pm/config.d/gentoo:
SUSPEND_MODULES="r8188eu"
Then, I recompiled the kernel to load r8188eu as a module.
It didn't help.
After the suspend, when I say lsmod, the module is still
there. Maybe this is the source of the problem.
What do I have to try?
Thanks in advance.
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Wlan disappeared after suspend
2016-09-13 8:23 [gentoo-user] Wlan disappeared after suspend Bertram Scharpf
@ 2016-09-13 12:08 ` Michael Orlitzky
2016-09-13 13:12 ` [gentoo-user] Emerge interferes with Git (Was: Wlan disappeared after suspend) Bertram Scharpf
2016-09-13 13:18 ` [gentoo-user] Wlan disappeared after suspend Bertram Scharpf
0 siblings, 2 replies; 13+ messages in thread
From: Michael Orlitzky @ 2016-09-13 12:08 UTC (permalink / raw
To: gentoo-user
On 09/13/2016 04:23 AM, Bertram Scharpf wrote:
> Hi,
>
> after suspend, my wlan is dead and it cannot be restarted....
>
> What do I have to try?
I had this same problem with the ath5k driver (still do, I bet)
on my Thinkpad x61s. What happens if you run "sudo rfkill list"
after you resume from suspend? Does it show that the wireless is
"hard blocked"?
In my case, it was, so I tried something stupid. I patched my kernel
to answer "no" to the question "is rfkill enabled?"... and it worked!
--- a/drivers/net/wireless/ath/ath5k/rfkill.c 2012-05-28 21:16:04.000000000 -0400
+++ b/drivers/net/wireless/ath/ath5k/rfkill.c 2012-05-28 21:17:17.000000000 -0400
@@ -66,10 +66,8 @@
static bool
ath5k_is_rfkill_set(struct ath5k_hw *ah)
{
- /* configuring GPIO for input for some reason disables rfkill */
- /*ath5k_hw_set_gpio_input(ah, ah->rf_kill.gpio);*/
- return ath5k_hw_get_gpio(ah, ah->rf_kill.gpio) ==
- ah->rf_kill.polarity;
+ /* Hard code this to work around a stupid bug. */
+ return 0;
}
static void
Maybe you can do the same thing for your driver, if rfkill is actually the issue.
I have a possibly outdated writeup of the issue here:
http://michael.orlitzky.com/articles/thinkpad_x61s_ath5k_rfkill_issues.php
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Emerge interferes with Git (Was: Wlan disappeared after suspend)
2016-09-13 12:08 ` Michael Orlitzky
@ 2016-09-13 13:12 ` Bertram Scharpf
2016-09-13 15:12 ` Rich Freeman
2016-09-13 13:18 ` [gentoo-user] Wlan disappeared after suspend Bertram Scharpf
1 sibling, 1 reply; 13+ messages in thread
From: Bertram Scharpf @ 2016-09-13 13:12 UTC (permalink / raw
To: gentoo-user
On Tuesday, 13. Sep 2016, 08:08:39 -0400, Michael Orlitzky wrote:
> On 09/13/2016 04:23 AM, Bertram Scharpf wrote:
> > after suspend, my wlan is dead and it cannot be restarted....
>
> I had this same problem with the ath5k driver (still do, I bet)
> on my Thinkpad x61s. What happens if you run "sudo rfkill list"
> after you resume from suspend? Does it show that the wireless is
> "hard blocked"?
First of all:
The rfkill install interferes with Git!
Error log:
>>> Compiling source in /usr/portage/tmp/portage/net-wireless/rfkill-0.5/work/rfkill-0.5 ...
make -j2 V=1
x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -W
error-implicit-function-declaration -c -o rfkill.o rfkill.c
./version.sh version.c
* ACCESS DENIED: open_wr: /usr/portage/.git/index.lock
rfkill.c: In function ‘get_name’:
rfkill.c:83:2: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
read(fd, name, sizeof(name) - 1);
^
x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -W
error-implicit-function-declaration -c -o version.o version.c
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed rfkill.o version.o -o rfkill
>>> Source compiled.
* --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
* LOG FILE: "/var/log/sandbox/sandbox-10986.log"
*
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line
F: open_wr
S: deny
P: /usr/portage/.git/index.lock
A: /usr/portage/.git/index.lock
R: /usr/portage/.git/index.lock
C: git update-index --refresh --unmerged
* --------------------------------------------------------------------------------
>>> Failed to emerge net-wireless/rfkill-0.5, Log file:
>>> '/usr/portage/tmp/portage/net-wireless/rfkill-0.5/temp/build.log'
I helped myself by renaming the .git directory, but that's
only a workaround.
How can I fix this? Should I report this?
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Wlan disappeared after suspend
2016-09-13 12:08 ` Michael Orlitzky
2016-09-13 13:12 ` [gentoo-user] Emerge interferes with Git (Was: Wlan disappeared after suspend) Bertram Scharpf
@ 2016-09-13 13:18 ` Bertram Scharpf
2016-09-13 13:22 ` Michael Orlitzky
1 sibling, 1 reply; 13+ messages in thread
From: Bertram Scharpf @ 2016-09-13 13:18 UTC (permalink / raw
To: gentoo-user
On Tuesday, 13. Sep 2016, 08:08:39 -0400, Michael Orlitzky wrote:
> On 09/13/2016 04:23 AM, Bertram Scharpf wrote:
> >
> > after suspend, my wlan is dead and it cannot be restarted....
> >
> > What do I have to try?
>
> I had this same problem with the ath5k driver (still do, I bet)
> on my Thinkpad x61s. What happens if you run "sudo rfkill list"
> after you resume from suspend? Does it show that the wireless is
> "hard blocked"?
Doesn't seem to.
# rfkill list # before suspend
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
# rfkill list # after resume
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Wlan disappeared after suspend
2016-09-13 13:18 ` [gentoo-user] Wlan disappeared after suspend Bertram Scharpf
@ 2016-09-13 13:22 ` Michael Orlitzky
0 siblings, 0 replies; 13+ messages in thread
From: Michael Orlitzky @ 2016-09-13 13:22 UTC (permalink / raw
To: gentoo-user
On 09/13/2016 09:18 AM, Bertram Scharpf wrote:
>
> Doesn't seem to.
>
> # rfkill list # before suspend
> 0: phy0: Wireless LAN
> Soft blocked: no
> Hard blocked: no
> # rfkill list # after resume
> 0: phy0: Wireless LAN
> Soft blocked: no
> Hard blocked: no
>
Ok, different problem then, good luck =)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Emerge interferes with Git (Was: Wlan disappeared after suspend)
2016-09-13 13:12 ` [gentoo-user] Emerge interferes with Git (Was: Wlan disappeared after suspend) Bertram Scharpf
@ 2016-09-13 15:12 ` Rich Freeman
2016-09-13 15:19 ` Michael Orlitzky
2016-09-13 17:49 ` Bertram Scharpf
0 siblings, 2 replies; 13+ messages in thread
From: Rich Freeman @ 2016-09-13 15:12 UTC (permalink / raw
To: gentoo-user
On Tue, Sep 13, 2016 at 9:12 AM, Bertram Scharpf
<lists@bertram-scharpf.de> wrote:
>
> The rfkill install interferes with Git!
>
> Error log:
> P: /usr/portage/.git/index.lock
> A: /usr/portage/.git/index.lock
> R: /usr/portage/.git/index.lock
> C: git update-index --refresh --unmerged
>
>>>> '/usr/portage/tmp/portage/net-wireless/rfkill-0.5/temp/build.log'
>
> I helped myself by renaming the .git directory, but that's
> only a workaround.
>
> How can I fix this? Should I report this?
>
It looks like you have your PORTAGE_TMPDIR set as /usr/portage/tmp?
I'm not sure if that is supposed to work or not, but I suspect that
might be the problem. Since it is located INSIDE a git repository (if
you have /usr/portage checked out from git), I suspect there is some
confusion if the package is trying to check something else out using
git or otherwise manipulate it. The .git directory is outside of the
sandbox so it shouldn't be able to be modified.
I suggest moving PORTAGE_TMPDIR to someplace like /var/tmp or /tmp or
someplace else. It isn't really ideal to have volatile information in
/usr anyway (this is the part where everybody chimes in and points out
that /usr/portage is in the wrong place to begin with).
--
Rich
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Emerge interferes with Git (Was: Wlan disappeared after suspend)
2016-09-13 15:12 ` Rich Freeman
@ 2016-09-13 15:19 ` Michael Orlitzky
2016-09-13 17:49 ` Bertram Scharpf
1 sibling, 0 replies; 13+ messages in thread
From: Michael Orlitzky @ 2016-09-13 15:19 UTC (permalink / raw
To: gentoo-user
On 09/13/2016 11:12 AM, Rich Freeman wrote:
> (this is the part where everybody chimes in and points out
> that /usr/portage is in the wrong place to begin with).
>
This way, everyone's unhappy. If we move it to a new better location,
then there will be public outcry from the people who prefer a different
new better location.
/var/cache/portage/repositories is the one true god
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Emerge interferes with Git (Was: Wlan disappeared after suspend)
2016-09-13 15:12 ` Rich Freeman
2016-09-13 15:19 ` Michael Orlitzky
@ 2016-09-13 17:49 ` Bertram Scharpf
2016-09-17 8:31 ` [gentoo-user] " Kai Krakow
1 sibling, 1 reply; 13+ messages in thread
From: Bertram Scharpf @ 2016-09-13 17:49 UTC (permalink / raw
To: gentoo-user
On Tuesday, 13. Sep 2016, 11:12:11 -0400, Rich Freeman wrote:
> On Tue, Sep 13, 2016 at 9:12 AM, Bertram Scharpf
> <lists@bertram-scharpf.de> wrote:
> >
> > The rfkill install interferes with Git!
> >
> > Error log:
> > P: /usr/portage/.git/index.lock
> > A: /usr/portage/.git/index.lock
> > R: /usr/portage/.git/index.lock
> > C: git update-index --refresh --unmerged
> >
> >>>> '/usr/portage/tmp/portage/net-wireless/rfkill-0.5/temp/build.log'
> >
> > I helped myself by renaming the .git directory, but that's
> > only a workaround.
> >
> > How can I fix this? Should I report this?
>
> It looks like you have your PORTAGE_TMPDIR set as /usr/portage/tmp?
Indeed. I have a "build partition" that I use for both,
package downloading and building in /usr/portage/tmp.
The rfkill make suite looks for a version number and in case
the work directory is a Git repo it tries to query the
version number there. Then, it finds the Git repo in
/usr/portage and fails. Not very friendly!
> I suggest moving PORTAGE_TMPDIR to someplace like /var/tmp or /tmp or
> someplace else. It isn't really ideal to have volatile information in
> /usr anyway (this is the part where everybody chimes in and points out
> that /usr/portage is in the wrong place to begin with).
I'll see how I solve it. I do not have time to make a
decision this evening.
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: Emerge interferes with Git (Was: Wlan disappeared after suspend)
2016-09-13 17:49 ` Bertram Scharpf
@ 2016-09-17 8:31 ` Kai Krakow
2016-09-17 13:54 ` Bertram Scharpf
0 siblings, 1 reply; 13+ messages in thread
From: Kai Krakow @ 2016-09-17 8:31 UTC (permalink / raw
To: gentoo-user
Am Tue, 13 Sep 2016 19:49:04 +0200
schrieb Bertram Scharpf <lists@bertram-scharpf.de>:
> On Tuesday, 13. Sep 2016, 11:12:11 -0400, Rich Freeman wrote:
> > On Tue, Sep 13, 2016 at 9:12 AM, Bertram Scharpf
> > <lists@bertram-scharpf.de> wrote:
> > >
> > > The rfkill install interferes with Git!
> > >
> > > Error log:
> > > P: /usr/portage/.git/index.lock
> > > A: /usr/portage/.git/index.lock
> > > R: /usr/portage/.git/index.lock
> > > C: git update-index --refresh --unmerged
> > >
> [...]
> > >
> > > I helped myself by renaming the .git directory, but that's
> > > only a workaround.
> > >
> > > How can I fix this? Should I report this?
> >
> > It looks like you have your PORTAGE_TMPDIR set
> > as /usr/portage/tmp?
>
> Indeed. I have a "build partition" that I use for both,
> package downloading and building in /usr/portage/tmp.
>
> The rfkill make suite looks for a version number and in case
> the work directory is a Git repo it tries to query the
> version number there. Then, it finds the Git repo in
> /usr/portage and fails. Not very friendly!
>
> > I suggest moving PORTAGE_TMPDIR to someplace like /var/tmp or /tmp
> > or someplace else. It isn't really ideal to have volatile
> > information in /usr anyway (this is the part where everybody chimes
> > in and points out that /usr/portage is in the wrong place to begin
> > with).
>
> I'll see how I solve it. I do not have time to make a
> decision this evening.
You could
# mount -o bind /usr/portage/tmp /var/tmp/portage
and then point the portage tmp dir to that directory. From there,
ebuilds cannot see the .git of /usr/portage.
--
Regards,
Kai
Replies to list-only preferred.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Emerge interferes with Git (Was: Wlan disappeared after suspend)
2016-09-17 8:31 ` [gentoo-user] " Kai Krakow
@ 2016-09-17 13:54 ` Bertram Scharpf
2016-09-17 14:36 ` Rich Freeman
0 siblings, 1 reply; 13+ messages in thread
From: Bertram Scharpf @ 2016-09-17 13:54 UTC (permalink / raw
To: gentoo-user
On Saturday, 17. Sep 2016, 10:31:17 +0200, Kai Krakow wrote:
> Am Tue, 13 Sep 2016 19:49:04 +0200
> schrieb Bertram Scharpf <lists@bertram-scharpf.de>:
>
> > The rfkill make suite looks for a version number and in case
> > the work directory is a Git repo it tries to query the
> > version number there. Then, it finds the Git repo in
> > /usr/portage and fails. Not very friendly!
>
> You could
>
> # mount -o bind /usr/portage/tmp /var/tmp/portage
>
> and then point the portage tmp dir to that directory. From there,
> ebuilds cannot see the .git of /usr/portage.
As long as I do not set GIT_DISCOVERY_ACROSS_FILESYSTEM...
I decided to add the following line to /etc/portage/make.conf:
GIT_CEILING_DIRECTORIES="$GIT_CEILING_DIRECTORIES:$PORTAGE_TMPDIR"
This should be part of the documentation. Where do I best
report it?
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Emerge interferes with Git (Was: Wlan disappeared after suspend)
2016-09-17 13:54 ` Bertram Scharpf
@ 2016-09-17 14:36 ` Rich Freeman
2016-09-17 15:18 ` Kai Krakow
2016-09-18 2:41 ` Bertram Scharpf
0 siblings, 2 replies; 13+ messages in thread
From: Rich Freeman @ 2016-09-17 14:36 UTC (permalink / raw
To: gentoo-user
On Sat, Sep 17, 2016 at 9:54 AM, Bertram Scharpf
<lists@bertram-scharpf.de> wrote:
>
> On Saturday, 17. Sep 2016, 10:31:17 +0200, Kai Krakow wrote:
> > Am Tue, 13 Sep 2016 19:49:04 +0200
> > schrieb Bertram Scharpf <lists@bertram-scharpf.de>:
> >
> > > The rfkill make suite looks for a version number and in case
> > > the work directory is a Git repo it tries to query the
> > > version number there. Then, it finds the Git repo in
> > > /usr/portage and fails. Not very friendly!
> >
> > You could
> >
> > # mount -o bind /usr/portage/tmp /var/tmp/portage
> >
> > and then point the portage tmp dir to that directory. From there,
> > ebuilds cannot see the .git of /usr/portage.
>
> As long as I do not set GIT_DISCOVERY_ACROSS_FILESYSTEM...
I don't think that if you navigate upwards after following a bind
mount that you end up in the tree that was mounted. Ie,
/var/tmp/portage/.. = /var/tmp, not /usr/portage. With a symbolic
link it would resolve to /usr/portage unless the shell does something
clever.
You can mount bind mounts into containers, and I'm pretty confident
the container can't navigate out into the rest of the filesystem that
way.
>
> I decided to add the following line to /etc/portage/make.conf:
>
> GIT_CEILING_DIRECTORIES="$GIT_CEILING_DIRECTORIES:$PORTAGE_TMPDIR"
>
> This should be part of the documentation. Where do I best
> report it?
Well, for anything on the wiki I'd suggest just adding it. For the
manpages I'd submit a bug on bugs.gentoo.org against portage (the
software).
--
Rich
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: Emerge interferes with Git (Was: Wlan disappeared after suspend)
2016-09-17 14:36 ` Rich Freeman
@ 2016-09-17 15:18 ` Kai Krakow
2016-09-18 2:41 ` Bertram Scharpf
1 sibling, 0 replies; 13+ messages in thread
From: Kai Krakow @ 2016-09-17 15:18 UTC (permalink / raw
To: gentoo-user
Am Sat, 17 Sep 2016 10:36:28 -0400
schrieb Rich Freeman <rich0@gentoo.org>:
> On Sat, Sep 17, 2016 at 9:54 AM, Bertram Scharpf
> <lists@bertram-scharpf.de> wrote:
> >
> > On Saturday, 17. Sep 2016, 10:31:17 +0200, Kai Krakow wrote:
> > > Am Tue, 13 Sep 2016 19:49:04 +0200
> > > schrieb Bertram Scharpf <lists@bertram-scharpf.de>:
> > >
> [...]
> > >
> > > You could
> > >
> > > # mount -o bind /usr/portage/tmp /var/tmp/portage
> > >
> > > and then point the portage tmp dir to that directory. From there,
> > > ebuilds cannot see the .git of /usr/portage.
> >
> > As long as I do not set GIT_DISCOVERY_ACROSS_FILESYSTEM...
>
> I don't think that if you navigate upwards after following a bind
> mount that you end up in the tree that was mounted. Ie,
> /var/tmp/portage/.. = /var/tmp, not /usr/portage. With a symbolic
> link it would resolve to /usr/portage unless the shell does something
> clever.
>
> You can mount bind mounts into containers, and I'm pretty confident
> the container can't navigate out into the rest of the filesystem that
> way.
True. This is why I suggested a bind mount and not a symlink.
--
Regards,
Kai
Replies to list-only preferred.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Emerge interferes with Git (Was: Wlan disappeared after suspend)
2016-09-17 14:36 ` Rich Freeman
2016-09-17 15:18 ` Kai Krakow
@ 2016-09-18 2:41 ` Bertram Scharpf
1 sibling, 0 replies; 13+ messages in thread
From: Bertram Scharpf @ 2016-09-18 2:41 UTC (permalink / raw
To: gentoo-user
On Saturday, 17. Sep 2016, 10:36:28 -0400, Rich Freeman wrote:
> On Sat, Sep 17, 2016 at 9:54 AM, Bertram Scharpf
> <lists@bertram-scharpf.de> wrote:
>
> > This should be part of the documentation. Where do I best
> > report it?
>
> Well, for anything on the wiki I'd suggest just adding it. For the
> manpages I'd submit a bug on bugs.gentoo.org against portage (the
> software).
Do you have an address of the wiki you mean? Reporting
should take less time than finding the fix.
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2016-09-18 2:42 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13 8:23 [gentoo-user] Wlan disappeared after suspend Bertram Scharpf
2016-09-13 12:08 ` Michael Orlitzky
2016-09-13 13:12 ` [gentoo-user] Emerge interferes with Git (Was: Wlan disappeared after suspend) Bertram Scharpf
2016-09-13 15:12 ` Rich Freeman
2016-09-13 15:19 ` Michael Orlitzky
2016-09-13 17:49 ` Bertram Scharpf
2016-09-17 8:31 ` [gentoo-user] " Kai Krakow
2016-09-17 13:54 ` Bertram Scharpf
2016-09-17 14:36 ` Rich Freeman
2016-09-17 15:18 ` Kai Krakow
2016-09-18 2:41 ` Bertram Scharpf
2016-09-13 13:18 ` [gentoo-user] Wlan disappeared after suspend Bertram Scharpf
2016-09-13 13:22 ` Michael Orlitzky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox