How Do I Adjust Power Settings?

Forum Forums Official Releases antiX-21/22 “Grup Yorum” How Do I Adjust Power Settings?

  • This topic has 24 replies, 4 voices, and was last updated Sep 13-5:09 pm by CyberGhost.
Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • #88486
    Member
    CyberGhost

      Hi, I can’t seem to find a way to change the power settings for when my laptop is on battery or plugged in. When I have it plugged in, the screen goes dim, but when I have it on battery alone, the screen brightens up. I would like to be able to have it bright when plugged in like it is when on battery alone. Where do I find the config file to edit to make changes to the power settings? Also, based on my system info below, do I have the right kernel for my system? Thanks in advance! Here’s my system info:

      System:
        Kernel: 5.10.137-antix.1-486-smp arch: i686 bits: 32 compiler: gcc v: 10.2.1
          parameters: BOOT_IMAGE=/boot/vmlinuz-5.10.137-antix.1-486-smp
          root=UUID=370a8dff-c4b8-458d-8335-72c7bb799c0e ro quiet
        Desktop: IceWM v: 2.9.9 vt: 7 dm: slimski v: 1.5.0
          Distro: antiX-21_386-full Grup Yorum 31 October 2021 base: Debian GNU/Linux 11 (bullseye)
      Machine:
        Type: Laptop System: Hewlett-Packard product: HP Pavilion dv1000 (PR425UA#ABA) v: Rev 1
          serial: <superuser required> Chassis: Quanta type: 10 serial: <superuser required>
        Mobo: Quanta model: 09B8 v: 34.20 serial: <superuser required> BIOS: Hewlett-Packard v: F.12
          date: 11/08/2004
      Battery:
        ID-1: BAT0 charge: 45.5 Wh (100.0%) condition: 45.5/88.8 Wh (51.2%) volts: 12.4 min: 14.8
          model: Hewlett-Packard JM-12 type: Li-ion serial: <filter> status: not charging
      Memory:
        RAM: total: 964.8 MiB used: 272 MiB (28.2%)
        RAM Report: permissions: Unable to run dmidecode. Root privileges required.
      PCI Slots:
        Permissions: Unable to run dmidecode. Root privileges required.
      CPU:
        Info: model: Intel Pentium M bits: 32 arch: M Dothan built: 2003-05 process: Intel 90nm
          family: 6 model-id: 0xD (13) stepping: 6 microcode: 0x18
        Topology: cpus: 1x cores: 1 smt: <unsupported> cache: 2 MiB note: check
        Speed (MHz): 600 min/max: 600/1600 scaling: driver: acpi-cpufreq governor: schedutil core:
          1: 600 bogomips: 3192
        Flags: acpi apic bts clflush cmov cpuid cx8 de dts est fpu fxsr mca mce mmx msr mtrr pbe pge
          pse sep ss sse sse2 tm tm2 tsc vme
        Vulnerabilities:
        Type: itlb_multihit status: KVM: VMX unsupported
        Type: l1tf status: Vulnerable
        Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
        Type: meltdown status: Vulnerable
        Type: mmio_stale_data status: Not affected
        Type: retbleed status: Not affected
        Type: spec_store_bypass status: Vulnerable
        Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
        Type: spectre_v2
          mitigation: Retpolines, STIBP: disabled, RSB filling, PBRSB-eIBRS: Not affected
        Type: srbds status: Not affected
        Type: tsx_async_abort status: Not affected
      Graphics:
        Device-1: Intel 82852/855GM Integrated Graphics vendor: Hewlett-Packard driver: i915 v: kernel
          arch: Gen2 process: Intel 130nm built: 2002-03 ports: active: LVDS-1 empty: VGA-1
          bus-ID: 00:02.0 chip-ID: 8086:3582 class-ID: 0300
        Display: x11 server: X.Org v: 1.20.11 driver: X: loaded: intel
          unloaded: fbdev,modesetting,vesa gpu: i915 display-ID: :0.0 screens: 1
        Screen-1: 0 s-res: 1280x768 s-dpi: 96 s-size: 338x203mm (13.31x7.99") s-diag: 394mm (15.52")
        Monitor-1: LVDS-1 mapped: LVDS1 model: Seiko Epson 0x5642 built: 2004 res: 1280x768 hz: 60
          dpi: 108 gamma: 1.2 chroma: red: x: 0.580 y: 0.341 green: x: 0.310 y: 0.549 blue: x: 0.153
          y: 0.153 white: x: 0.314 y: 0.329 size: 300x180mm (11.81x7.09") diag: 356mm (14") ratio: 15:9
          modes: 1280x768
        OpenGL: renderer: Mesa DRI Intel 852GM/855GM x86/MMX/SSE2 v: 1.3 Mesa 20.3.5
          direct render: Yes
      Audio:
        Device-1: Intel 82801DB/DBL/DBM AC97 Audio vendor: Hewlett-Packard driver: snd_intel8x0
          v: kernel bus-ID: 00:1f.5 chip-ID: 8086:24c5 class-ID: 0401
        Sound Server-1: ALSA v: k5.10.137-antix.1-486-smp running: yes
      Network:
        Device-1: Realtek RTL-8100/8101L/8139 PCI Fast Ethernet Adapter vendor: Hewlett-Packard
          driver: 8139too v: 0.9.28 modules: 8139cp port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8139
          class-ID: 0200
        IF: eth0 state: unknown speed: 100 Mbps duplex: full mac: <filter>
        IP v4: <filter> scope: global broadcast: <filter>
        IP v6: <filter> type: dynamic mngtmpaddr scope: global
        IP v6: <filter> scope: link
        Device-2: Intel PRO/Wireless 2200BG [Calexico2] Network vendor: Hewlett-Packard
          driver: ipw2200 v: 1.2.2kmprq modules: wl bus-ID: 02:06.0 chip-ID: 8086:4220 class-ID: 0280
        IF: eth1 state: down mac: <filter>
        WAN IP: <filter>
      Bluetooth:
        Message: No bluetooth data found.
      Logical:
        Message: No logical block device data found.
      RAID:
        Message: No RAID data found.
      Drives:
        Local Storage: total: 149.05 GiB used: 4.56 GiB (3.1%)
        SMART Message: Unable to run smartctl. Root privileges required.
        ID-1: /dev/sda maj-min: 8:0 vendor: Hitachi model: HTS541616J9AT00 size: 149.05 GiB
          block-size: physical: 512 B logical: 512 B speed: <unknown> type: N/A serial: <filter> rev: A70H
          scheme: MBR
        Optical-1: /dev/sr0 vendor: PIONEER model: DVD-RW DVR-K14 rev: 1.14
          dev-links: cdrom,cdrw,dvd,dvdrw
        Features: speed: 24 multisession: yes audio: yes dvd: yes rw: cd-r,cd-rw,dvd-r state: running
      Partition:
        ID-1: / raw-size: 147.54 GiB size: 144.17 GiB (97.71%) used: 4.56 GiB (3.2%) fs: ext4
          dev: /dev/sda1 maj-min: 8:1 label: rootantiX21 uuid: 370a8dff-c4b8-458d-8335-72c7bb799c0e
      Swap:
        Kernel: swappiness: 10 (default 60) cache-pressure: 50 (default 100)
        ID-1: swap-1 type: partition size: 1.5 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda2
          maj-min: 8:2 label: swapantiX uuid: 5b861ae7-9b9f-4848-bedb-5afd5502cf4c
      Unmounted:
        Message: No unmounted partitions found.
      USB:
        Hub-1: 1-0:1 info: Full speed or root hub ports: 6 rev: 2.0 speed: 480 Mb/s chip-ID: 1d6b:0002
          class-ID: 0900
        Hub-2: 2-0:1 info: Full speed or root hub ports: 2 rev: 1.1 speed: 12 Mb/s chip-ID: 1d6b:0001
          class-ID: 0900
        Device-1: 2-1:2 info: Pixart Imaging Optical Mouse type: Mouse driver: hid-generic,usbhid
          interfaces: 1 rev: 2.0 speed: 1.5 Mb/s power: 100mA chip-ID: 093a:2510 class-ID: 0301
        Hub-3: 3-0:1 info: Full speed or root hub ports: 2 rev: 1.1 speed: 12 Mb/s chip-ID: 1d6b:0001
          class-ID: 0900
        Hub-4: 4-0:1 info: Full speed or root hub ports: 2 rev: 1.1 speed: 12 Mb/s chip-ID: 1d6b:0001
          class-ID: 0900
      Sensors:
        Message: No sensor data found. Is lm-sensors configured?
      Repos:
        Packages: apt: 1571 lib: 744
        No active apt repos in: /etc/apt/sources.list
        Active apt repos in: /etc/apt/sources.list.d/antix.list
          1: deb http: //mirrors.rit.edu/mxlinux/mx-packages/antix/bullseye/ bullseye main nosystemd nonfree
        Active apt repos in: /etc/apt/sources.list.d/bullseye-backports.list
          1: deb http: //deb.debian.org/debian bullseye-backports main contrib non-free
        Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
          1: deb http: //ftp.us.debian.org/debian/ bullseye-updates main contrib non-free
        Active apt repos in: /etc/apt/sources.list.d/debian.list
          1: deb http: //ftp.us.debian.org/debian/ bullseye main contrib non-free
          2: deb http: //security.debian.org/ bullseye-security main contrib non-free
        No active apt repos in: /etc/apt/sources.list.d/various.list
      Processes:
        CPU top: 5 of 117
        1: cpu: 25.0% command: yad pid: 2475 mem: 23.2 MiB (2.4%)
        2: cpu: 5.3% command: xorg pid: 1802 mem: 25.3 MiB (2.6%)
        3: cpu: 2.9% command: desktop-session started by: bash pid: 2049 mem: 3.27 MiB (0.3%)
        4: cpu: 2.8% command: slimski pid: 1793 mem: 7.81 MiB (0.8%)
        5: cpu: 2.0% command: init pid: 1 mem: 1.74 MiB (0.1%)
        Memory top: 5 of 117
        1: mem: 25.3 MiB (2.6%) command: xorg pid: 1802 cpu: 5.3%
        2: mem: 23.2 MiB (2.4%) command: yad pid: 2475 cpu: 25.0%
        3: mem: 17.5 MiB (1.8%) command: zzzfm pid: 2129 cpu: 1.1%
        4: mem: 15.8 MiB (1.6%) command: volumeicon pid: 2185 cpu: 0.2%
        5: mem: 15.4 MiB (1.5%) command: icewm pid: 2123 cpu: 1.3%
      Info:
        Processes: 117 Uptime: 1m wakeups: 2 Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: service
        Compilers: gcc: 10.2.1 alt: 10 Client: IceWM v: 2.9.9 inxi: 3.3.19
      • This topic was modified 8 months ago by CyberGhost.
      • This topic was modified 8 months ago by CyberGhost.
      #88560
      Member
      sybok
        Helpful
        Up
        0
        ::

        Hi, similar topic was already discussed elsewhere.
        See e.g.
        https://www.antixforum.com/forums/topic/laptop-amd-cpu-low-battery-warning/#post-70389
        Not 100% sure that the recommended package does what you desire.

        Also, there are two Debian packages that can help to manage power consumption in notebooks but they may turn off some ports if not used for some time.
        I mentioned them in another topic but I need to leave soon and I do not have time to search for it.

        #88605
        Member
        CyberGhost
          Helpful
          Up
          0
          ::

          @sybok, I already read that thread before. Xfce power manager didn’t change anything. Tried that. Also, the main topic on that thread you linked is about wanting to know when there is a low battery and how to make it notify you. I want to know how to keep the screen as bright when it’s on battery alone, for when it’s plugged in too. When plugged in, the screen goes dim a bit. So there has to be some configuration file that I can edit to make that happen.

          #88623
          Member
          sybok
            Helpful
            Up
            0
            ::

            Hi, I did the following web search ‘icewm power manager’ and it pointed me to ‘xscreensaver’, see the link
            https://hrclinux.blogspot.com/2013/05/icewm-startup-commands.html
            I have it installed and it has 3 options: Standby/Suspend/Off After.

            If not installed and hence not controlling the screen, then ‘antiX control centre’ -> ‘Session’ -> ‘Set Screen Blanking’ allows to control a single parameter.
            Exploring what script does the job might point you to a configuration file with more options similar to ‘xscreensaver’.
            The title of the pop-up window is ‘set-screen-blank’ which is a valid terminal command.
            ‘which set-screen-blank’ outputs ‘/usr/local/bin/set-screen-blank’, a shell script that does the job.

            It invokes ‘xset’ which I have discovered in another link
            https://www.linuxquestions.org/questions/debian-26/screen-dims-and-shuts-off-constantly-4175492340/
            See ‘man xset’ and search for ‘dpms’.

            I knew my first reply was not completely what you searched but I hoped that Xfce power manager could do the job.
            I hope that the content of my current post is more on-topic this time.

            #88632
            Member
            CyberGhost
              Helpful
              Up
              0
              ::

              @sybok Thanks that just might work! I’ll look into it. Also, it’s ok I know you’re just trying to help best you can and I greatly appreciate your help! I will do a little experimenting and report back.

              #88636
              Member
              CyberGhost
                Helpful
                Up
                0
                ::

                Ok I read those articles from the links you posted @sybok but they didn’t help me. I did however find this from just looking around in the file system. I don’t know what, if anything in this file, can be changed or how to do it.

                #!/bin/sh
                #
                # Returns 0 (true) if on AC power
                #         1 (false) if not on AC power
                #         255 (false) if can't tell
                #
                # Example shell script:
                #     if on_ac_power; then
                #       echo We're on AC power
                #     else
                #       echo Can't say we're on AC power
                #     fi
                
                set -e
                
                # sysfs
                #
                # This algorithm is complicated by the possibility of multiple AC
                # adapters.  We scan the ac_adapter/power_supply directory looking for adapters
                # that have known states.  If any adapter is on-line, we return 0.  If
                # no adapters are on-line but one or more are off-line, we return 1.
                #
                OFF_LINE_P=no
                
                if [ -d /sys/class/power_supply/ ]; then
                    for FN in /sys/class/power_supply/*; do
                	if test -d "${FN}" && test -r "${FN}/type"; then
                	    type="$(cat "${FN}/type")"
                	    case "${type}" in
                	    Mains|USB*|BrickID|Wireless)
                		if [ -r "${FN}/online" ]; then
                		    online="$(cat "${FN}/online")"
                		    [ "$online" = 1 ] && exit 0
                		    [ "$online" = 0 ] && OFF_LINE_P=yes
                		fi;;
                	    esac
                	fi
                    done
                    [ "${OFF_LINE_P}" = "yes" ] && exit 1
                fi
                
                # ACPI
                # same algorithm as above, a fallback only when the generic sysfs interface
                # is not available (old kernels only)
                if [ -d /proc/acpi/ac_adapter ]; then
                    for FN in /proc/acpi/ac_adapter/*; do
                	if [ -d "${FN}" ]; then
                	    if [ -r "${FN}/state" ]; then
                		grep --quiet on-line "${FN}/state" && exit 0
                		grep --quiet off-line "${FN}/state" && OFF_LINE_P=yes
                	    elif [ -r "${FN}/status" ]; then
                		grep --quiet on-line "${FN}/status" && exit 0
                		grep --quiet off-line "${FN}/status" && OFF_LINE_P=yes
                	    fi
                	fi
                    done
                    [ "${OFF_LINE_P}" = "yes" ] && exit 1
                fi
                
                # PMU
                if [ -r /proc/pmu/info ]; then
                    exec awk </proc/pmu/info '
                	BEGIN { FS=":"; ret = 255 }
                	/^AC Power.*1$/ { ret = 0; exit }
                	/^AC Power.*0$/ { ac = 1 }
                        /^Battery.*/ {
                                if ($2 ~/0/ && ac == 1)
                                        ret = 0
                                else
                                        ret = 1
                                exit }
                	END { exit ret }
                    '
                fi
                
                # APM
                if [ -r /proc/apm ]; then
                    exec awk </proc/apm '
                	BEGIN { ret = 255 }
                	/^[0-9.a-zA-Z]* [0-9.]* 0x.. 0x../ {
                		if ($4 == "0x01") { ret = 0; exit }
                		else if ($4 == "0x00") { ret = 1; exit }
                	}
                	END { exit ret }
                    '
                fi
                
                # nothing is available
                exit 255
                #88637
                Moderator
                christophe
                  Helpful
                  Up
                  0
                  ::

                  Just a thought: I have a laptop that has entries in the BIOS regarding that issue. Maybe yours has such a setting? (Brightness on battery & brightness when connected to power.)

                  confirmed antiX frugaler, since 2019

                  #88638
                  Member
                  CyberGhost
                    Helpful
                    Up
                    0
                    ::

                    Also here’s a screenshot of possible options to edit.

                    #88641
                    Member
                    CyberGhost
                      Helpful
                      Up
                      0
                      ::

                      @christophe Thanks I didn’t even think of that! I’ll check now!

                      #88643
                      Member
                      CyberGhost
                        Helpful
                        Up
                        0
                        ::

                        @christophe Unfortunately, my BIOS doesn’t have that option

                        #88646
                        Moderator
                        BobC
                          Helpful
                          Up
                          0
                          ::

                          Have you looked at xrandr?

                          xrandr

                          Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
                          eDP-1 connected primary 1920×1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
                          3840×2160 60.00 + 60.00 59.98 59.97 48.00
                          3200×1800 59.96 59.94

                          You want the one that’s connected, just the name
                          xrandr | grep " connected" | cut -f1 -d " "

                          eDP-1

                          Change brightness to 50%
                          xrandr --output eDP-1 --brightness 0.5

                          Change brightness to 100%
                          xrandr --output eDP-1 --brightness 1.0

                          #88647
                          Member
                          CyberGhost
                            Helpful
                            Up
                            0
                            ::

                            @BobC Thanks I’ll try that!

                            #88652
                            Moderator
                            BobC
                              Helpful
                              Up
                              0
                              ::

                              More internet searching shows, to show current brightness:

                              xrandr --prop --verbose | grep -A10 " connected" | grep "Brightness"

                              grep -A10 ” connected’ tells it to return the ” connected” line and 10 lines after it

                              #88653
                              Member
                              sybok
                                Helpful
                                Up
                                0
                                ::

                                @BobC: @Robin mentioned that ‘xrandr’ adds a “mask” that hides the brightness and is therefore not a power-saving solution (though it may reduce eye strain), see the following:
                                https://www.antixforum.com/forums/topic/display-brightness/page/2/#post-75656

                                antiX contains a command ‘backlight-brightness’ (‘which backlight-brightness’ leads to ‘/usr/local/bin/backlight-brightness’).
                                It did not work for me for some reason, same output as in https://www.antixforum.com/forums/topic/display-brightness/#post-73166
                                I remember that @masinick mentioned elsewhere this might be related to kernel.

                                #88659
                                Moderator
                                BobC
                                  Helpful
                                  Up
                                  0
                                  ::

                                  sybok, thanks for that warning.

                                  I tried xbacklight on mine, and it says “no outputs have a backlight property”

                                  In addition, the Brighten and Dim keys on my keyboard have no effect under Linux. Not sure if that is just antiX or all, as I usually run antiX on this machine.

                                Viewing 15 posts - 1 through 15 (of 25 total)
                                • You must be logged in to reply to this topic.