Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 462900 - app-laptop/laptop-mode-tools-1.63 - pcie-aspm: line 10: echo: write error: Operation not permitted
Summary: app-laptop/laptop-mode-tools-1.63 - pcie-aspm: line 10: echo: write error: Op...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alon Bar-Lev (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-24 03:54 UTC by Alexandre
Modified: 2013-03-29 08:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
silence-stderr.patch (file_462900.txt,1.02 KB, text/plain)
2013-03-28 00:29 UTC, Manuel Rüger (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre 2013-03-24 03:54:07 UTC
Upgraded from v1.62-r2 and now I get:

/usr/share/laptop-mode-tools/modules/pcie-aspm: line 10: echo: write error: Operation not permitted

when start or stop that.

Thanks!!!

Reproducible: Always




Portage 2.1.11.58 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.2, glibc-2.16.0, 3.8.4-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.8.4-gentoo-x86_64-Intel-R-_Pentium-R-_Dual_CPU_T3400_@_2.16GHz-with-gentoo-2.2
KiB Mem:     2820728 total,   1207176 free
KiB Swap:    1048572 total,   1048572 free
Timestamp of tree: Sun, 24 Mar 2013 03:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.2-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.8 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo privacychain
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -g0"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -g0"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy ccache config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersandbox xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS=" ftp://gentoo.c3sl.ufpr.br/gentoo/ http://gentoo.c3sl.ufpr.br/ ftp://ftp.las.ic.unicamp.br/pub/gentoo/ http://www.las.ic.unicamp.br/pub/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ "
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage/"
USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 c++0x cairo caps cdda cdr cli consolekit cracklib crypt css cups custom-cflags cxx dbus declarative dga dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gif gnutls gpm gstreamer gtk iconv infinality jpeg kde kipi lame lcms libnotify lzma lzo mad minimal mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses networkmanager nls nptl nvidia offensive ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qt3support qt4 quicktime readline samba sdl session spell sse sse2 ssl ssse3 startup-notification svg syslog tcpd theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vim-syntax vorbis vpx wavpack wxwidgets x264 xcb xcomposite xml xmp xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel loopback" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

app-laptop/laptop-mode-tools-1.63 was built with the following:
USE="acpi apm -bluetooth -scsi -systemd"
Comment 1 Manuel Rüger (RETIRED) gentoo-dev 2013-03-24 12:42:29 UTC
https://github.com/rickysarraf/laptop-mode-tools/blob/master/usr/share/laptop-mode-tools/modules/pcie-aspm

Do you have this file /sys/module/pcie_aspm/parameters/policy ?

Can you try "echo default > /sys/module/pcie_aspm/parameters/policy" manually?
Comment 2 Alexandre 2013-03-24 16:36:16 UTC
(In reply to comment #1)
> https://github.com/rickysarraf/laptop-mode-tools/blob/master/usr/share/
> laptop-mode-tools/modules/pcie-aspm
> 
> Do you have this file /sys/module/pcie_aspm/parameters/policy ?


-rw-r--r-- 1 root root 4096 Mar 24 13:28 /sys/module/pcie_aspm/parameters/policy

"[default] performance powersave"

> Can you try "echo default > /sys/module/pcie_aspm/parameters/policy"
> manually?

Same error.


If I try to change manually:

"/sys/module/pcie_aspm/parameters/policy"                                                                                                                    
"/sys/module/pcie_aspm/parameters/policy" E667: Fsync failed
WARNING: Original file may be lost or damaged
don't quit the editor until the file is successfully written!

Thank you!
Comment 3 Manuel Rüger (RETIRED) gentoo-dev 2013-03-24 16:54:55 UTC
looks like you cannot write into that file, unless you've set pci_aspm=force
see:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/760131/comments/99
Comment 4 Alexandre 2013-03-24 17:17:29 UTC
Thank you Manuel Rüger,

pci_aspm=force did the trick.
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2013-03-28 00:01:01 UTC
Thanks mrueg,

Closing.
Comment 6 Manuel Rüger (RETIRED) gentoo-dev 2013-03-28 00:02:39 UTC
Please don't close it as invalid. The problem still exists.

Maybe it is better to disable pcie-aspm by default. Not everyone wants to override kernel's aspm settings via a grub boot parameter.
Comment 7 Alon Bar-Lev (RETIRED) gentoo-dev 2013-03-28 00:04:26 UTC
(In reply to comment #6)
> Please don't close it as invalid. The problem still exists.
> 
> Maybe it is better to disable pcie-aspm by default. Not everyone wants to
> override kernel's aspm settings via a grub boot parameter.

OK... although upstream bug tracker should be used to monitor these kind of things... should I add a patch to disable this by default?
Comment 8 Manuel Rüger (RETIRED) gentoo-dev 2013-03-28 00:12:03 UTC
I've filled a bug upstream now:

https://github.com/rickysarraf/laptop-mode-tools/issues/9

An easy patch would be passing every output of the echo commands to /dev/null as it gets logged via the log commands anyway.
Comment 9 Manuel Rüger (RETIRED) gentoo-dev 2013-03-28 00:29:05 UTC
Created attachment 343486 [details]
silence-stderr.patch

If pcie_aspm=force isn't active, the module won't do anything except being noisy. At least this will silence stderr.
Comment 10 Alon Bar-Lev (RETIRED) gentoo-dev 2013-03-29 08:00:02 UTC
Thank you!

Fixed in laptop-mode-tools-1.63-r1