Solved [Solved] Problem with temperature in GNOME on Asus laptop

Hello.

I have a problem with my Asus laptop, with temperature. I'm using FreeBSD 10 RC4 with a Radeon HD7470m video card and Intel B960. Of course I did it using this manual: https://wiki.freebsd.org/Graphics#Installing_KMS_Ports. But I didn't do this:

Code:
portmaster graphics/libdrm graphics/dri x11-servers/xorg-server \
    x11-drivers/xf86-input-mouse x11-drivers/xf86-input-keyboard \
    x11-drivers/xf86-video-intel x11-drivers/xf86-video-ati graphics/libGL

My /etc/X11/xorg.conf:

Code:
Section "ServerLayout"
   Identifier     "X.org Configured"
   Screen      0  "Screen0" 0 0
   Screen      1  "Screen1" RightOf "Screen0"
   InputDevice    "Mouse0" "CorePointer"
   InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
   ModulePath   "/usr/local/lib/xorg/modules"
   FontPath     "/usr/local/lib/X11/fonts/misc/"
   FontPath     "/usr/local/lib/X11/fonts/TTF/"
   FontPath     "/usr/local/lib/X11/fonts/OTF/"
   FontPath     "/usr/local/lib/X11/fonts/Type1/"
   FontPath     "/usr/local/lib/X11/fonts/100dpi/"
   FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
   Load  "dbe"
   Load  "dri"
   Load  "dri2"
   Load  "extmod"
   Load  "record"
   Load  "glx"
EndSection

Section "InputDevice"
   Identifier  "Keyboard0"
   Driver      "kbd"
EndSection

Section "InputDevice"
   Identifier  "Mouse0"
   Driver      "mouse"
   Option       "Protocol" "auto"
   Option       "Device" "/dev/sysmouse"
   Option       "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
   Identifier   "Monitor0"
   VendorName   "Monitor Vendor"
   ModelName    "Monitor Model"
EndSection

Section "Monitor"
   Identifier   "Monitor1"
   VendorName   "Monitor Vendor"
   ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "NoAccel"               # [<bool>]
        #Option     "SWcursor"              # [<bool>]
        #Option     "EnablePageFlip"        # [<bool>]
        #Option     "ColorTiling"           # [<bool>]
        #Option     "ColorTiling2D"         # [<bool>]
        #Option     "RenderAccel"           # [<bool>]
        #Option     "SubPixelOrder"         # [<str>]
        #Option     "EXAVSync"              # [<bool>]
        #Option     "EXAPixmaps"            # [<bool>]
        #Option     "ZaphodHeads"           # <str>
        #Option     "EnablePageFlip"        # [<bool>]
        #Option     "SwapbuffersWait"       # [<bool>]
   Identifier  "Card0"
   Driver      "radeon"
   BusID       "PCI:1:0:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "ShadowFB"              # [<bool>]
        #Option     "DefaultRefresh"        # [<bool>]
        #Option     "ModeSetClearScreen"    # [<bool>]
   Identifier  "Card1"
   Driver      "radeon"
   BusID       "PCI:1:0:0"
EndSection

Section "Screen"
   Identifier "Screen0"
   Device     "Card0"
   Monitor    "Monitor0"
   SubSection "Display"
      Viewport   0 0
      Depth     1
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     4
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     8
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     15
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     16
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     24
   EndSubSection
EndSection

Section "Screen"
   Identifier "Screen1"
   Device     "Card1"
   Monitor    "Monitor1"
   SubSection "Display"
      Viewport   0 0
      Depth     1
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     4
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     8
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     15
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     16
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     24
   EndSubSection
EndSection

I have two monitors. The first one is a monitor of the laptop and the second one is a NEC. So GNOME is started, but I see a problem with the temperature:

Code:
root@lady_free:/usr/home/reface # sysctl -a | grep temper
hw.acpi.thermal.tz0.temperature: 84.0C

But if I use this /etc/X11/xorg.conf the temperature is OK, but I have a problem with the second monitor:

Code:
Section "ServerLayout"
   Identifier     "X.org Configured"
   Screen      0  "Screen0" 0 0
   Screen      1  "Screen1" RightOf "Screen0"
   InputDevice    "Mouse0" "CorePointer"
   InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
   ModulePath   "/usr/local/lib/xorg/modules"
   FontPath     "/usr/local/lib/X11/fonts/misc/"
   FontPath     "/usr/local/lib/X11/fonts/TTF/"
   FontPath     "/usr/local/lib/X11/fonts/OTF/"
   FontPath     "/usr/local/lib/X11/fonts/Type1/"
   FontPath     "/usr/local/lib/X11/fonts/100dpi/"
   FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
   Load  "dbe"
   Load  "dri"
   Load  "dri2"
   Load  "extmod"
   Load  "record"
   Load  "glx"
EndSection

Section "InputDevice"
   Identifier  "Keyboard0"
   Driver      "kbd"
EndSection

Section "InputDevice"
   Identifier  "Mouse0"
   Driver      "mouse"
   Option       "Protocol" "auto"
   Option       "Device" "/dev/sysmouse"
   Option       "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
   Identifier   "Monitor0"
   VendorName   "Monitor Vendor"
   ModelName    "Monitor Model"
EndSection

Section "Monitor"
   Identifier   "Monitor1"
   VendorName   "Monitor Vendor"
   ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "NoAccel"               # [<bool>]
        #Option     "SWcursor"              # [<bool>]
        #Option     "EnablePageFlip"        # [<bool>]
        #Option     "ColorTiling"           # [<bool>]
        #Option     "ColorTiling2D"         # [<bool>]
        #Option     "RenderAccel"           # [<bool>]
        #Option     "SubPixelOrder"         # [<str>]
        #Option     "EXAVSync"              # [<bool>]
        #Option     "EXAPixmaps"            # [<bool>]
        #Option     "ZaphodHeads"           # <str>
        #Option     "EnablePageFlip"        # [<bool>]
        #Option     "SwapbuffersWait"       # [<bool>]
   Identifier  "Card0"
   Driver      "vesa"
   BusID       "PCI:1:0:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "ShadowFB"              # [<bool>]
        #Option     "DefaultRefresh"        # [<bool>]
        #Option     "ModeSetClearScreen"    # [<bool>]
   Identifier  "Card1"
   Driver      "vesa"
   BusID       "PCI:1:0:0"
EndSection

Section "Screen"
   Identifier "Screen0"
   Device     "Card0"
   Monitor    "Monitor0"
   SubSection "Display"
      Viewport   0 0
      Depth     1
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     4
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     8
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     15
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     16
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     24
   EndSubSection
EndSection

Section "Screen"
   Identifier "Screen1"
   Device     "Card1"
   Monitor    "Monitor1"
   SubSection "Display"
      Viewport   0 0
      Depth     1
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     4
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     8
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     15
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     16
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     24
   EndSubSection
EndSection
And the temperature is:
Code:
sysctl -a | grep temperature
hw.acpi.thermal.tz0.temperature: 75.0C

I tried to do this: https://forums.freebsd.org/viewtopic.php?t=172

So in my etc/rc.conf:

Code:
hostname="lady_free"
ifconfig_alc0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
hald_enable="YES"
dbus_enable="YES"
#gdm_enable="YES"
webcamd_enable="YES"
linux_enable="YES"

For /etc/sysctl.conf/sysctl:

Code:
sysctl debug.cpufreq.lowest=600
sysctl debug.cpufreq.highest=1200
dev.cpu.0.cx_lowest=C3
dev.cpu.1.cx_lowest=C2
Of cource I rebuilt the kernel for sysctl debug.cpufreq.highest=1200 with patch /usr/src/sys/kern/kern_cpu.c:
Code:
--- kern_cpu.c.orig   2008-11-08 13:12:24.000000000 -0500
+++ kern_cpu.c   2008-11-08 10:33:18.000000000 -0500
@@ -131,12 +131,16 @@
 DRIVER_MODULE(cpufreq, cpu, cpufreq_driver, cpufreq_dc, 0, 0);
 
 static int      cf_lowest_freq;
+static int      cf_highest_freq;
 static int      cf_verbose;
 TUNABLE_INT("debug.cpufreq.lowest", &cf_lowest_freq);
+TUNABLE_INT("debug.cpufreq.highest", &cf_highest_freq);
 TUNABLE_INT("debug.cpufreq.verbose", &cf_verbose);
 SYSCTL_NODE(_debug, OID_AUTO, cpufreq, CTLFLAG_RD, NULL, "cpufreq debugging");
 SYSCTL_INT(_debug_cpufreq, OID_AUTO, lowest, CTLFLAG_RW, &cf_lowest_freq, 1,
     "Don't provide levels below this frequency.");
+SYSCTL_INT(_debug_cpufreq, OID_AUTO, highest, CTLFLAG_RW, &cf_highest_freq, 1,
+    "Don't provide levels above this frequency.");
 SYSCTL_INT(_debug_cpufreq, OID_AUTO, verbose, CTLFLAG_RW, &cf_verbose, 1,
     "Print verbose debugging messages");
 
@@ -295,6 +299,14 @@
       goto out;
    }
 
+   /* Reject levels that are above our specified threshold. */
+   if (cf_highest_freq > 0 && level->total_set.freq > cf_highest_freq) {
+      CF_DEBUG("rejecting freq %d, greater than %d limit\n",
+          level->total_set.freq, cf_highest_freq);
+      error = EINVAL;
+      goto out;
+   }
+
    /* If already at this level, just return. */
    if (CPUFREQ_CMP(sc->curr_level.total_set.freq, level->total_set.freq)) {
       CF_DEBUG("skipping freq %d, same as current level %d\n",
@@ -617,8 +629,13 @@
          continue;
       }
 
-      /* Skip levels that have a frequency that is too low. */
-      if (lev->total_set.freq < cf_lowest_freq) {
+      /*
+       * Skip levels that have a frequency that is too low or too
+       * high.
+       */
+      if (lev->total_set.freq < cf_lowest_freq ||
+          (cf_highest_freq > 0 &&
+           lev->total_set.freq > cf_highest_freq)) {
          sc->all_count--;
          continue;
       }

Then I deleted /etc/X11/xorg.conf, but the result is the same:

Code:
root@lady_free:/usr/home/reface # sysctl -a | grep temper
hw.acpi.thermal.tz0.temperature: 84.0C
root@lady_free:/usr/home/reface #

And my laptop shut down. Please help me to solve this problem.
 
Re: Problem with temperature in Gnome on laptop ASUS.

Why are you patching the kernel with ancient code?
 
Re: Problem with temperature in Gnome on laptop ASUS.

wblock@ said:
Why are you patching the kernel with ancient code?
It was an advice - https://forums.freebsd.org/viewtopic.php?f=38&t=44130#p245875 , but it doesn't solve my problem. I can rebuild the kernel and delete this "dust of furniture", it is not hard - only fifteen minutes for it, but my problem will be still with me.

P.S.@DutchDaemon I'm trying. Thank you for your patience :)
 
Last edited by a moderator:
Re: Problem with temperature in GNOME on Asus laptop

So, I rebuilt my kernel and of course I deleted all old code in /usr/src/sys/kern/kern_cpu.c before it. Then I updated my Freebsd FreeBSD to 10-RC5 and did this:
Code:
portmaster graphics/libdrm graphics/dri x11-servers/xorg-server \
    x11-drivers/xf86-input-mouse x11-drivers/xf86-input-keyboard \
    x11-drivers/xf86-video-intel x11-drivers/xf86-video-ati graphics/libGL
But the result is same, my laptop shuts down every time when I use radeon in Xorg.conf or when I use HAL.
 
Re: Problem with temperature in GNOME on Asus laptop

We can't see what else is set. Is ACPI disabled? Is powerd(8) running? Why didn't you rebuild the ports as the instructions showed?
 
Re: Problem with temperature in GNOME on Asus laptop

wblock@ said:
We can't see what else is set. Is ACPI disabled? Is powerd(8) running? Why didn't you rebuild the ports as the instructions showed?
What information do you need? powerd(8):

top:
Code:
1117 root            1  20    0 14400K  1836K select  0   0:01   0.00% powerd
If I disable ACPI, my OS is not started, I have such error:
Code:
panic: running without device atpic requires a local APIC
cpuid=0
KDB: Stack backtrace:
#0: 0xffffffff808e76d0 at ?? +0
#1: 0xffffffff8808af8b5 at ?? +0
#2: 0xffffffff80d9106f at ?? +0
#3: 0xffffffff80861238 at ?? +0
#4: 0xffffffff802d3e0c
And I rebuilt these ports:
portmaster graphics/libdrm graphics/dri x11-servers/xorg-server \
x11-drivers/xf86-input-mouse x11-drivers/xf86-input-keyboard \
x11-drivers/xf86-video-intel x11-drivers/xf86-video-ati graphics/libGL

When I used 10-RC4 my X.Org server was built with/etc/make.conf:
Code:
WITH_KMS=yes
WITH_NEW_XORG=yes
WITH_GALLIUM=yes
 
Re: Problem with temperature in GNOME on Asus laptop

Some basics:
  • Please give the specific model of computer. "Asus laptop" could be any of thousands.
  • Make sure you have the latest BIOS version.
  • Show the contents of /boot/loader.conf and /etc/rc.conf.
 
Re: Problem with temperature in GNOME on Asus laptop

wblock@ said:
Some basics:
  • Please give the specific model of computer. "Asus laptop" could be any of thousands.
  • Make sure you have the latest BIOS version.
  • Show the contents of /boot/loader.conf and /etc/rc.conf.
Model - X54H
MB Ver - K54HR
X54HR-SX114R
My BIOS updated to ver 205, but problem is still with me.
/boot/loader.conf - nothing, it is clean.
/etc/rc.conf -
Code:
hostname="lady_free"
ifconfig_alc0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
hald_enable="YES"
dbus_enable="YES"
gdm_enable="YES"
webcamd_enable="YES"
linux_enable="YES"
#moused_enable="YES"
 
Re: Problem with temperature in GNOME on Asus laptop

I think, my problem is solved. I'll make some tests. So tomorrow I'll write a solution.
Code:
$ sysctl -a | grep temper
hw.acpi.thermal.tz0.temperature: 72,0C
$ sysctl -a | grep temper
hw.acpi.thermal.tz0.temperature: 72,0C
$ sysctl -a | grep temper
hw.acpi.thermal.tz0.temperature: 72,0C
$ sysctl -a | grep temper
hw.acpi.thermal.tz0.temperature: 73,0C
$ sysctl -a | grep temper
hw.acpi.thermal.tz0.temperature: 64,0C
$ sysctl -a | grep temper
hw.acpi.thermal.tz0.temperature: 60,0C
$ sysctl -a | grep temper
hw.acpi.thermal.tz0.temperature: 60,0C
 
Re: Problem with temperature in GNOME on Asus laptop

So. My problem is solved. I used this manuals:
Thank you @fonz !!! So I had a temperature - 80 C. This was not bad. Then I cleaned the cooler of my laptop. The temperature was - 75C. A good result.
Then I soldered another one cooler which was powered from another power adapter. And the result - 70C with maximal CPU usage.
I think my problem is solved and this topic could be closed.
 
Last edited by a moderator:
Back
Top