Re: heavy CPU consumption and laggy/stuttering video on thinkpad x230

2019-11-21 Thread David Trudgian

On 11/21/19 1:40 AM, Josh wrote:

Thanks Travis for listing down your BIOS settings. The changes I made
to match your settings:
Config - Power
   8254 Timer Clock Gating -> Auto  this was to Disabled in my BIOS
Config - USB
   Always On USB - Disabled  this was Enabled in my BIOS
Security - I/O Port Access
   Memory Card Slot -> Disabled  this was Enabled in my BIOS
Boot
   UEFI/Legacy Boot -> Both <<< this was UEFI only
   UEFI/Legacy Boot -> Priority UEFI First

I installed 6.6 on an external drive. After some intensive use
(Chromium streaming 4K video), fan kicks in. However, when closing
down Chromium (or at least the 4K tab), FAN will stop running after a
short while and won't stay up consistently anymore - similar to 6.5's
behaviour.

@Dave, what are your BIOS settings? If different, would be interested
to know if those given by Travis would lower the ~15W idling to ~10W
on 6.6 ...


I have just gone through and set the following on my T430:

 - Reset to Defaults
 - Security - Secure Boot Configuration
  Secure Boot -> Disabled (was enabled)
 - Startup
  UEFI/Legacy Booot -> Both
  UEFI/Legacy Boot Prirority -> UEFI First
 - Config - USB
  Always on USB - Disabled (was enabled)
 - Config - I/O Port Access
  Bluetooth -> Disabled (was enabled)
  Fingerprint Reader -> Disabled (was enabled)
  Memory Card Slot -> Disabled (was enabled)

I don't have an 8524 Timer Clock Gating setting.

Booted into 6.6 and my power draw seen from `sysctl | grep batt` was 
unchanged, hovering around 15.19W idle sitting in the X session.


Did then notice this machine's bios was a 2017 version... went and 
updated to the latest 2.82 21 Aug 2019


Not an appreciable change to the battery consumption. Hovering around 
14.98W. Fan is slightly different though - it's not constantly running. 
Comes on and off.


Cheers,

DT










Re: heavy CPU consumption and laggy/stuttering video on thinkpad x230

2019-11-15 Thread David Trudgian
On 11/15/19 9:51 AM, Michael H wrote:
> *laptop: thinkpad x230, i7 processor, 8G ram, intel hd 4000 gpu*
> *New OpenBSD user with a fresh install.*

I have a ThinkPad T430 which I'm now typing this on. It's an i5-3320m
(vs your i7-3520m) with 12GB RAM and the same HD4000 class graphics, so
it's pretty close.

> My user account is created from the install process and has "staff" class -
> though i haven't increased the datasize-cur, datasize-max for staff yet.
> Additionally, apmd has been set to -A as suggested by the faq.

Am no expert, having only installed OpenBSD for the first time recently,
but played around with the staff settings when I couldn't use a browser
or play video at all well. Started with some values in a blog post on
the net from someone setting up a laptop, and ended up with:

:datasize-cur=8192M:\
:datasize-max=8192M:\
:maxproc-max=4096:\
:maxproc-cur=1024:\
:openfiles-max=32768:\
:openfiles-cur=16384:\

I have also set the following systcl values:

# shared memory limits (browsers, etc.)
# max shared memory pages (*4096=8GB)
kern.shminfo.shmall=20971552
# max shared memory segment size (2GiB)
kern.shminfo.shmmax=2147483647
# max shared memory identifiers
kern.shminfo.shmmni=1024
# max shared memory segments per process
kern.shminfo.shmseg=1024

# Other
kern.maxproc=32768
kern.maxfiles=131072
kern.maxvnodes=262144
kern.bufcachepercent=50

The large files numbers here are due to using syncthing, and (I'd guess)
probably not generally advisable. The other stuff is quite likely to be
inadvisable or just plain wrong (due to my inexperience), but it has
given me a responsive system when using Firefox / Chromium, playing
video etc.

> *Is this an issue with the system somehow using the modesetting driver
> instead of the inteldrm* *driver*? if so, why is that and how should i best
> remedy this problem? I thought old thinkpads are generally fully supported
> by OpenBSD?

Although the login.conf and sysctl settings made the most difference for
me, I do have a smoother experience using the intel driver than the
modesetting one. It's especially noticable when playing video in
Firefox, and dragging the browser window around on my XFCE desktop. The
intel driver happily plays the video smoothly as the window moves
around. The modesetting driver wouldn't do that for me.

I have the following at /etc/X11/xorg.conf.d/intel.conf

Section "Device"
Identifier "drm"
Driver "intel"
Option "TearFree" "true"
EndSection

Hope some of this might be useful!

Cheers,

Dave Trudgian