LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-18-2023, 10:19 PM   #1
rootaccess
Member
 
Registered: Mar 2012
Posts: 311

Rep: Reputation: Disabled
Can't control brightness


I converted a VM into a physical laptop which worked like a charm. Its slackware 15.0. My laptop is a Thinkpad T480.

I can't seem to control the brightness with xbacklight or xrandr, getting errors from:

Code:
# xbacklight -set 40
RANDR Query Version returned error -1
Tried installing laptop-mode-tools which only displays my battery which is fine but no brightness setting.

I noticed this post here recommending how to change it, down towards the middle under "Every step required for xbacklight control"

https://askubuntu.com/questions/7153...cklight-folder

So here is some output from my system. I don't even want to look at the screen so I am using ssh. Tried VNC but password doesnt work. That's my other thread.
Code:
# find /sys -type f -name brightness
/sys/devices/platform/thinkpad_acpi/leds/platform::mute/brightness
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinklight/brightness
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::power/brightness
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::standby/brightness
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinkvantage/brightness
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::kbd_backlight/brightness
/sys/devices/platform/thinkpad_acpi/leds/platform::micmute/brightness
/sys/devices/platform/i8042/serio0/input/input0/input0::scrolllock/brightness
/sys/devices/platform/i8042/serio0/input/input0/input0::capslock/brightness
/sys/devices/platform/i8042/serio0/input/input0/input0::numlock/brightness
/sys/devices/pci0000:00/0000:00:1c.6/0000:03:00.0/leds/phy0-led/brightness
/sys/devices/virtual/sound/ctl-led/speaker/brightness
/sys/devices/virtual/sound/ctl-led/mic/brightness
Nothing found in /sys/class/brightness and any linking fails with Operation not permitted.

I don't want to have to reinstall slackware because I got all my settings from the VM and I've been wanting to do this for a long time. I had to use syslinux because this is an NVMe install, but worked great. Just trying to fix this brightness issue. None of my function keys work either
 
Old 12-19-2023, 12:22 AM   #2
Loomx
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 184

Rep: Reputation: Disabled
Quote:
Originally Posted by rootaccess View Post
None of my function keys work either
Do you mean they don't work at all? Or do they just work as the F-keys. e.g. F5 in Firefox to refresh the page.

Sometimes to get these to work they need to be enabled in the UEFI settings. When your laptop boots it hopefully will show (briefly) something like "Press F12 to enter setup menu"
The key might be Delete or F5 or Esc or...

Once in the UEFI settings look for something about Fn keys. On my laptop I could choose to have them work as Volume up, Volume down, Brightness up, Brightness down, etc when pressed, then as normal Function keys when the "Fn" modifier key is held.
 
Old 12-19-2023, 01:15 AM   #3
rootaccess
Member
 
Registered: Mar 2012
Posts: 311

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Loomx View Post
Do you mean they don't work at all? Or do they just work as the F-keys. e.g. F5 in Firefox to refresh the page.

Sometimes to get these to work they need to be enabled in the UEFI settings. When your laptop boots it hopefully will show (briefly) something like "Press F12 to enter setup menu"
The key might be Delete or F5 or Esc or...

Once in the UEFI settings look for something about Fn keys. On my laptop I could choose to have them work as Volume up, Volume down, Brightness up, Brightness down, etc when pressed, then as normal Function keys when the "Fn" modifier key is held.
Interesting. I disabled UEFI and went with Legacy Mode with CSM supported because I wanted a truly legacy system and nothing UEFI related but if it blocks me from dimming my screen than yeah I guess I'll have to re-do it all in UEFI.

The keys work on the laptop, I could get into BIOS but the function keys don't work in Slackware. They work if I install mint of course but I don't want to run that anymore.

Last edited by rootaccess; 12-19-2023 at 01:38 AM.
 
Old 12-19-2023, 03:08 AM   #4
Loomx
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 184

Rep: Reputation: Disabled
I don't *think* it should be anything to do with UEFI vs Legacy mode.
But in one of those menus where you chose Legacy mode hopefully you will find the "Function Keys" setting.

Quote:
Originally Posted by rootaccess View Post
The keys work on the laptop, I could get into BIOS but the function keys don't work in Slackware. They work if I install mint of course but I don't want to run that anymore.
I'm still not exactly sure what you mean by "don't work".
Do you want them to work as F1, F2, etc like you would need in Midnight commander or htop?
Do you want them to control volume, brightness, etc like the little icons on the keys?
Do they do either at present?
What happens if you hold down the "Fn" key while you press them?

Are you using XFCE or KDE or ?
 
Old 12-19-2023, 04:06 AM   #5
_peter
Member
 
Registered: Sep 2014
Location: paris
Distribution: slackware
Posts: 314

Rep: Reputation: Disabled
screen brightness adjustment (as well as audio volume) works natively on T450 X270 thinkpads with kde&xfce

on windows manager such as fluxbox xrandr adjusts the gamma,
if you can't get the software dirty solution working, you may have another issue somewhere.
Quote:
in the file .fluxbox/keys

XF86MonBrightnessUp :Exec xrandr --output YourScreen --mode 1366x768 --brightness 0.8
XF86MonBrightnessDown :Exec xrandr --output YourScreen --mode 1366x768 --brightness 0.2

YourScreen is obtained via xrandr as you know.

Quote:
--brightness brightness
Multiply the gamma values on the crtc currently attached to the
output to specified floating value. Useful for overly bright or
overly dim outputs. However, this is a software only modifica‐
tion, if your hardware has support to actually change the
brightness, you will probably prefer to use xbacklight.

Last edited by _peter; 12-19-2023 at 03:33 PM. Reason: typo xrandr
 
Old 12-19-2023, 06:34 AM   #6
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,833
Blog Entries: 17

Rep: Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640
Quote:
Originally Posted by rootaccess View Post
The keys work on the laptop, I could get into BIOS but the function keys don't work in Slackware. They work if I install mint of course but I don't want to run that anymore.
These things require "WMI" modules from the Kernel. Probably it's called Thinkpad WMI or something similar. Is that loaded?

Perhaps dmesg will give you an indication:
Code:
dmesg | grep -i wmi
And lsmod:
Code:
lsmod | grep -i wmi
All the Kernel symbols can be found under "device drivers" --> "x86 plarform specific device drivers".. And looking at that, the "wmi" driver for Lenovo might be named something else than "wmi" probably "config_thinkpad_acpi"..

Last edited by zeebra; 12-19-2023 at 06:56 AM.
 
Old 12-19-2023, 10:07 AM   #7
rootaccess
Member
 
Registered: Mar 2012
Posts: 311

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Loomx View Post
I don't *think* it should be anything to do with UEFI vs Legacy mode.
But in one of those menus where you chose Legacy mode hopefully you will find the "Function Keys" setting.


I'm still not exactly sure what you mean by "don't work".
Do you want them to work as F1, F2, etc like you would need in Midnight commander or htop?
Do you want them to control volume, brightness, etc like the little icons on the keys?
Do they do either at present?
What happens if you hold down the "Fn" key while you press them?

Are you using XFCE or KDE or ?
Im using XFCE. I want the keys to work but even if they didn't, I still want to be able to control my brightness with xbacklight or other command line utilities. If I hold Fn down nothing happens but in a terminal, I just get a bunch of '~'
 
Old 12-19-2023, 10:07 AM   #8
rootaccess
Member
 
Registered: Mar 2012
Posts: 311

Original Poster
Rep: Reputation: Disabled
Code:
# dmesg |grep -i wmi
[    4.698747] acpi PNP0C14:02: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01)
[    4.698967] acpi PNP0C14:03: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01)
# lsmod |grep -i wmi
intel_wmi_thunderbolt    16384  0
wmi_bmof               16384  0
wmi                    32768  3 intel_wmi_thunderbolt,wmi_bmof,think_lmi
#
Quote:
Originally Posted by zeebra View Post
These things require "WMI" modules from the Kernel. Probably it's called Thinkpad WMI or something similar. Is that loaded?

Perhaps dmesg will give you an indication:
Code:
dmesg | grep -i wmi
And lsmod:
Code:
lsmod | grep -i wmi
All the Kernel symbols can be found under "device drivers" --> "x86 plarform specific device drivers".. And looking at that, the "wmi" driver for Lenovo might be named something else than "wmi" probably "config_thinkpad_acpi"..
 
Old 12-19-2023, 10:34 AM   #9
rootaccess
Member
 
Registered: Mar 2012
Posts: 311

Original Poster
Rep: Reputation: Disabled
Smile

I ended up re-installing which is a huge blow but I guess it isn't smart to convert from a VM because the VM was probably not installed with some stuff that the installer probably does automatically even thought I selected everything except XFCE (i manually installed tales-xfce repo even on this). I thought I had it covered when i did
Code:
mkinitrd
after i copied everything over which I would expect would detect settings from a laptop when making a new initrd.gz but I guess not. With this new install, the
Code:
find /sys -type f -name brightness
ended up being what the poster on the ubuntu forum suggested. The only thing that worked was

creating /etc/X11/xorg.conf which didn't even exist with the following and rebooted

Code:
Section "Device"
    Identifier      "Device0"
    Driver          "intel"
    Option          "Backlight"      "intel_backlight"
EndSection

Section "Monitor"
    Identifier      "Monitor0"
EndSection

Section "Screen"
    Identifier      "Screen0"
    Monitor         "Monitor0"
    Device          "Device0"
EndSection
now
Code:
xbacklight -set 5
works great

Last edited by rootaccess; 12-19-2023 at 10:36 AM.
 
1 members found this post helpful.
Old 12-19-2023, 10:50 AM   #10
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,833
Blog Entries: 17

Rep: Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640
Quote:
Originally Posted by rootaccess View Post
Code:
# dmesg |grep -i wmi
[    4.698747] acpi PNP0C14:02: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01)
[    4.698967] acpi PNP0C14:03: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01)
# lsmod |grep -i wmi
intel_wmi_thunderbolt    16384  0
wmi_bmof               16384  0
wmi                    32768  3 intel_wmi_thunderbolt,wmi_bmof,think_lmi
#
Hmm, ok, that could probably be right, not sure since it's not working. Wmi_bmof has a rather bad description in the Kernel, described as "tedious" and requiring userspace tools. That could be the reason perhaps, missing userspace tools.

What happens if you do this:
Code:
modprobe thinkpad_acpi
And if nothing improves, you could additionally try:
Code:
modprobe -r wmi_bmof
And if that does nothing, also:
Code:
modprobe -r think_lmi
According to the Kernel documentation thinkpad_acpi is suppose to be the one that controls the so called "fn" key and those things. Perhaps it's already loaded?
Code:
lsmod | grep -i thinkpad
think_lmi is the "wmi" part and works on "machines that support these things in the bios".. <-- this might be where the wmi_bmof comes in, it's..

It's difficult to say what your machine should use, and even the Kernel can load these things incorrectly once in awhile. You could try different combinations of these things.

https://github.com/iksaif/thinkpad-wmi
According to this page, if you use a bios password, you should disable it to test if these things works without. Otherwise you have to include a password with WMI requests to the bios.
 
Old 12-19-2023, 10:54 AM   #11
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,833
Blog Entries: 17

Rep: Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640
Quote:
Originally Posted by rootaccess View Post
works great
Just out of curiosity, what output do you now get compared to previously (lsmod/dmesg)?
 
Old 12-19-2023, 02:49 PM   #12
rootaccess
Member
 
Registered: Mar 2012
Posts: 311

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zeebra View Post
Just out of curiosity, what output do you now get compared to previously (lsmod/dmesg)?
Code:
# lsmod |grep -i wmi
wmi_bmof               16384  0
intel_wmi_thunderbolt    16384  0
wmi                    32768  3 intel_wmi_thunderbolt,wmi_bmof,think_lmi
# dmesg |grep -i wmi
[    4.974177] acpi PNP0C14:02: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01)
[    4.974357] acpi PNP0C14:03: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01)
#
it bothers me that i supposedly install everything in the system and don't get xbacklight working (nevermind the xfce because i am using gtk-2.0 but even on the new install i did the same thing, did not install anything in /xfce, then used the tales-repo from solarfields and got my xbacklight working). i used to do these types of system transfers on 14.1 where I setup my own partitions, and just tar everything over netcat and just modify /etc/fstab. this is why i wanted to move back to slackware as my daily driver.

the output from sys backlight differed when i made the transfer from the VM. it was not the same before. if I am loading this super bloated huge kernel, what business does it have to not install that if it's a VM environment. I bet that is in the install script somewhere slackware has. If its huge, put everything in there including laptop power tools even if its a VM dammit. I can recompile my own damn kernel, ive done it a million times and my own initrd (although i do like mkinitrd on slackware, just makes it easier for that purpose alone.) i heard lilo doesn't work on nvme so i was prepared and didn't bother. i was in a chroot environment, created a syslinux.cfg and wrote it to nvme0n1 using extlinux and dd'd the syslinux mbr.bin at bs=440 count=1 over that and it booted like a charm without lilo, no images, none of that. however, funny thing is on the new install, i did run lilo just to see if it would work and it does.

i'm just upset about stuff that's potentially hidden in the slackware install and being selective even with a huge kernel. not only did i waste a lot of time but now i dont get that sense of accomplishment from doing something challenging.... and the reason i do it this way is because i'm not going to sit there like an idiot and reinstall the system, compile all my software and rebuild my entire system, modify all my settings, directories, all my files, etc when i can automate it like i did. i think im good for now being able to mirror this setup because its coming from a laptop now so if it was another laptop, i would have the xbacklight working and if its a VM that i want to mirror this machine into, i wouldn't care.

Last edited by rootaccess; 12-19-2023 at 02:55 PM.
 
Old 12-19-2023, 03:57 PM   #13
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,833
Blog Entries: 17

Rep: Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640
Quote:
Originally Posted by rootaccess View Post
the output from sys backlight differed when i made the transfer from the VM. it was not the same before. if I am loading this super bloated huge kernel, what business does it have to not install that if it's a VM environment. I bet that is in the install script somewhere slackware has. If its huge, put everything in there including laptop power tools even if its a VM dammit.
Well, that is one of the advantages of Linux, you can take the system with the Kernel and move it pretty much anywhere, and it will adapt and work in the new environment. Preferably this is done with the generic Kernel, rather than huge.

Technically, there is nothing that should prevent that VM carryover to the machine. Obviously something is, but it should be possible to make it work. Perhaps test out making a new initrd for the VM carryover Kernel?

So, the new output is the same as the old, that's a bit strange. And I doubt it's anything special Slackware has, it tends to be pretty slim on that front, but it could be worth spending some time browsing /etc.
 
Old 12-19-2023, 04:49 PM   #14
rootaccess
Member
 
Registered: Mar 2012
Posts: 311

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zeebra View Post
Well, that is one of the advantages of Linux, you can take the system with the Kernel and move it pretty much anywhere, and it will adapt and work in the new environment. Preferably this is done with the generic Kernel, rather than huge.

Technically, there is nothing that should prevent that VM carryover to the machine. Obviously something is, but it should be possible to make it work. Perhaps test out making a new initrd for the VM carryover Kernel?

So, the new output is the same as the old, that's a bit strange. And I doubt it's anything special Slackware has, it tends to be pretty slim on that front, but it could be worth spending some time browsing /etc.

Yes I'll have to look into it more I guess. I am intending to rebuild the kernel anyway but so far I'm happy with everything else. Pretty sure if I were to transfer the laptop to another one, I wouldn't have any issues. But it was real nice to see it boot up after all that I did, including bypassing lilo (I had thought lilo is incompatible with NVMe's but my VM was sda and this laptop is an nvme0n1).

Going to tar up the entire system to a 15g file since that's my root system now besides /home. You just never know when your system might die or your hard drive fails. I had an NVMe fail last year with all my VMs on it. It was a 1TB samsung 970 EVO. Took me 4 days just to get to baseline, had to restore all the VMs I was using which was Windows and a lot of software installation in there so that took up a ton of time. Now I have separate backups for VMs and multiple backups of my system. I had backups of my data so that wasn't a problem but the objective here is to a be able to re-create my entire system at the snap of my finger and just copy over my data in case my systems either die or get stolen lol.
 
Old 12-19-2023, 05:03 PM   #15
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,833
Blog Entries: 17

Rep: Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640
Quote:
Originally Posted by rootaccess View Post
Going to tar up the entire system to a 15g file since that's my root system now besides /home. You just never know when your system might die or your hard drive fails. I had an NVMe fail last year with all my VMs on it. It was a 1TB samsung 970 EVO. Took me 4 days just to get to baseline, had to restore all the VMs I was using which was Windows and a lot of software installation in there so that took up a ton of time. Now I have separate backups for VMs and multiple backups of my system. I had backups of my data so that wasn't a problem but the objective here is to a be able to re-create my entire system at the snap of my finger and just copy over my data in case my systems either die or get stolen lol.
It sounds like an interesting way to do things. I've personally moved to VM's for most internet use, and I intend to expand on that. But those are mostly disposable and I keep a base image. Aside from that, my regular root partition and so fourth, I have a system there, but only backups for emergency. Nothing like an easy to deploy way if things get really messed up somehow.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change brightness percentage that screen brightness keys increase/decrease MozillaUser3172 Slackware 5 03-24-2020 06:07 PM
Can't adjust brightness with function key and can't adjust brightness after suspend. QuarkDev Linux Deepin 2 03-19-2015 10:46 AM
Mint 15 = black screen (brightness = 0) on start up - have to manually set brightness Netnovice Linux Mint 4 01-16-2014 08:46 PM
[SOLVED] Brightness set to zero: moved to http://www.linuxquestions.org/questions/slackware-14/brightness-set Z0K4 Linux - Laptop and Netbook 5 09-15-2011 10:09 AM
tc traffic control tc traffic control Linux QoS control tool(noob help) inv|s|ble Linux - General 1 07-26-2007 11:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration