How to apply grub command line parameters for backlight brightness to Qubes OS?

Continuing the discussion from Changing brighness via shortcut fails to change screen brighness:

On my laptop manufacturer’s website there are instructions (see https://www.tuxedocomputers.com/en/Infos/Help-Support/Instructions/Brightness-for-120-Hz-and-144-Hz-displays_1.tuxedo) to fix brightness control failures in a system using grub, but I do not know how to apply this to the different booting architecture of Qubes OS, since the file /etc/default/grub does not exist in Qubes OS and I am not familiar with the Qubes OS boot architecture.
The instructions on the website are the following:

  • sudo nano /etc/default/grub
  • add the parameters acpi_osi= acpi_os_name=Linux i915.enable_dpcd_backlight to the variable GRUB_CMDLINE_LINUX_DEFAULT,
  • update grub and reboot.

Does anyone know where these parameters and/or their values or adapted parameters/values can be placed in the Qubes OS system to have the same effect?

1 Like

But it does exist. Check dom0 terminal.

When I execute

ls -la /etc/default

in the dom0 terminal I get

drwxr-xr-x   2 root root  4096 Mar  9 06:57 .
drwxr-xr-x 106 root root 12288 Mar  9 07:26 ..
-rw-r--r--   1 root root  1756 Aug 16  2017 nss
-rw-r--r--   1 root root  1561 Feb  5  2016 rmt
-rw-r--r--   1 root root   119 Jun 14  2016 useradd

and

nano /etc/default/grub

opens an empty new file. Am I missing something?

(All was done after sudo -i.)

Strange. Here is what I get:

[user@dom0 ~]$ ls -la /etc/default
total 32
drwxr-xr-x 2 root root 4096 Oct 16 2019 .
drwxr-xr-x 106 root root 12288 Feb 24 10:05 …
-rw-r–r-- 1 root root 672 Oct 16 2019 grub
-rw-r–r-- 1 root root 1756 Aug 16 2017 nss
-rw-r–r-- 1 root root 1561 Feb 5 2016 rmt
-rw-r–r-- 1 root root 119 Jun 14 2016 useradd

Which version of Qubes OS are you running? Mine is 4.0 with all updates.

I had just downloaded and installed the latest Qubes OS release (Qubes-R4.0.4-x86_64.iso) two days ago and up to this point all qubes are updated.

Going to “Qube Manager” → “About” → “Qubes OS” shows me

Qubes OS
Qubes release 4.0 (R4.0)

and clicking on “Version Information” shows

xen_version            : 4.8.5-30.fc25
Linux 5.4.98-1.fc25.qubes.x86_64
  
Installed Packages:  
  
i3-settings-qubes.x86_64                          	1.6-1.fc25 
kernel-qubes-vm.x86_64                            	1000:5.4.98-1.fc25.qubes 
python2-qubesadmin.noarch                         	4.0.32-1.fc25 
python3-qubesadmin.noarch                         	4.0.32-1.fc25 
python3-qubesdb.x86_64                            	4.0.16-1.fc25 
python3-qubesimgconverter.x86_64                  	4.0.31-1.fc25 
qubes-anaconda-addon.noarch                       	4.0.11-1.fc25 
qubes-artwork.noarch                              	4.0.1-2.fc25 
qubes-core-admin-addon-whonix.noarch              	4.0.2-1.fc25 
qubes-core-admin-client.noarch                    	4.0.32-1.fc25 
qubes-core-dom0.x86_64                            	4.0.58-1.fc25 
qubes-core-dom0-linux.x86_64                      	4.0.28-1.fc25 
qubes-core-dom0-linux-kernel-install.x86_64       	 
qubes-db.x86_64                                   	4.0.16-1.fc25 
qubes-db-dom0.x86_64                              	4.0.16-1.fc25 
qubes-db-libs.x86_64                              	4.0.16-1.fc25 
qubes-desktop-linux-common.noarch                 	4.0.21-1.fc25 
qubes-desktop-linux-manager.noarch                	4.0.25-1.fc25 
qubes-gpg-split-dom0.x86_64                       	2.0.50-1.fc25 
qubes-gui-dom0.x86_64                             	4.0.12-1.fc25 
qubes-img-converter-dom0.x86_64                   	1.2.9-1.fc25 
qubes-input-proxy.x86_64                          	1.0.23-1.fc25 
qubes-input-proxy-receiver.x86_64                 	1.0.23-1.fc25 
qubes-libvchan-xen.x86_64                         	4.0.8-1.fc25 
qubes-manager.noarch                              	4.0.45-1.fc25 
qubes-menus.noarch                                	4.0.21-1.fc25 
qubes-mgmt-salt.noarch                            	4.0.24-1.fc25 
qubes-mgmt-salt-admin-tools.noarch                	4.0.24-1.fc25 
qubes-mgmt-salt-base.noarch                       	4.0.3-1.fc25 
qubes-mgmt-salt-base-config.noarch                	4.0.1-1.fc25 
qubes-mgmt-salt-base-overrides.noarch             	4.0.2-1.fc25 
qubes-mgmt-salt-base-overrides-libs.noarch        	 
qubes-mgmt-salt-base-topd.noarch                  	4.0.1-1.fc25 
qubes-mgmt-salt-config.noarch                     	4.0.24-1.fc25 
qubes-mgmt-salt-dom0.noarch                       	4.0.24-1.fc25 
qubes-mgmt-salt-dom0-qvm.noarch                   	4.0.10-1.fc25 
qubes-mgmt-salt-dom0-update.noarch                	4.0.9-1.fc25 
qubes-mgmt-salt-dom0-virtual-machines.noarch      	 
qubes-pdf-converter-dom0.x86_64                   	2.1.11-1.fc25 
qubes-release.noarch                              	4.0-9 
qubes-release-notes.noarch                        	4.0-9 
qubes-template-debian-10.noarch                   	4.0.6-202101091318 
qubes-template-fedora-32.noarch                   	4.0.6-202101091318 
qubes-template-whonix-gw-15.noarch                	4.0.6-202012170920 
qubes-template-whonix-ws-15.noarch                	4.0.6-202012170920 
qubes-usb-proxy-dom0.noarch                       	1.0.29-1.fc25 
qubes-utils.x86_64                                	4.0.31-1.fc25 
qubes-utils-libs.x86_64                           	4.0.31-1.fc25 
xfce4-settings-qubes.x86_64                       	4.0.3-1.fc25 

For 4.0, the difference depends on whether it is installed with legacy mode or UEFI mode. In the former mode, grub is will be used but not in the latter, so that that file is not exists but there is another one called xen.cfg instead.

[root@dom0 ~]# cat /boot/efi/EFI/qubes/xen.cfg
[global]
default=5.4.98-1.fc25.qubes.x86_64

[5.4.98-1.fc25.qubes.x86_64]
options=loglvl=all dom0_mem=min:1024M dom0_mem=max:4096M iommu=force ucode=scan smt=off
kernel=vmlinuz-5.4.98-1.fc25.qubes.x86_64 root=/dev/mapper/qubes_dom0-root rd.luks.uuid=luks-1dc4d737-6337-4cc3-a29d-edf3720a95cd rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap i915.alpha_support=1 rd.qubes.hide_all_usb plymouth.ignore-serial-consoles
ramdisk=initramfs-5.4.98-1.fc25.qubes.x86_64.img
[root@dom0 ~]#

For your reference.

3 Likes

Thank you for this input. Indeed my laptop is installed with UEFI mode and this is the place where to put kernel parameters, so I will mark this as solved.

As far as the brightness control goes: I appended the parameters as kernel parameters in the /boot/efi/EFI/qubes/xen.cfg file, but a reboot did not reveal any changes to brightness control. I will contact my manufacturer and see if I can get another hint from them, since these command line parameters from the instructions might be not be applicable to my laptop.

Hi @chrfre ,
with the cat /proc/cmdline command, you see the kernel options of your current kernel. So the first check is to verify if your wanted backlight options are present in this output.

Thanks. I tried that. The options which I put into /boot/efi/EFI/qubes/xen.cfg indeed appear when running cat /proc/cmdline.

@chrfre
As far as I understood:
What you did:
you changed the xen.cfg file and get something like

`[user@dom0 ~]# cat /boot/efi/EFI/qubes/xen.cfg
[global]
default=5.4.98-1.fc25.qubes.x86_64

[5.4.98-1.fc25.qubes.x86_64]
options=loglvl=all dom0_mem=min:1024M dom0_mem=max:4096M iommu=force ucode=scan smt=off
kernel=vmlinuz-5.4.98-1.fc25.qubes.x86_64 root=/dev/mapper/qubes_dom0-root rd.luks.uuid=luks-123dontcare rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap i915.alpha_support=1 rd.qubes.hide_all_usb plymouth.ignore-serial-consoles acpi_osi= acpi_os_name=Linux i915.enable_dpcd_backlight
ramdisk=initramfs-5.4.98-1.fc25.qubes.x86_64.img

Reboot

$ cat /proc/cmdline
[..] acpi_osi= acpi_os_name=Linux i915.enable_dpcd_backlight

So your original issue is not solved at all:
It is still not possible to change the brightness of the screen.
Did I get it right?

Hi @devnull, you are right. The original issue has not been resolved up to date. However a working solution to the main question of this post has been provided which is why it is marked as solved.

Hello chrfre

Apologies for the late reaction. I’m encountering exactly the same problem you did, and the solution isn’t working for me either. Could you please enlighten me to the working solution you have found?

Thanks!

@chrfre please see above

Hello @ryuu,
I have to ask: What do you mean with

?
As my introduction refers to another issue I am wondering if you mean the broader issue of backlight control or the issue of passing on backlight kernel parameters to the dom0 kernel correctly in UEFI mode. The latter has been answered by @kommuni in the marked answer, but if you have further questions about it, feel free to ask, also about the other issue.

I am very busy at the moment. I will answer as quickly as possible, but it might take a few days.

My problem is that the keys the regulate screen birghtness don’t work and instead open the dom0 Display settings menu.

I’ve added

acpi_osi= acpi_os_name=Linux i915.enable_dpcd_backlight

to /boot/efi/EFI/qubes/xen.cfg and rebooted.

when I then run cat /proc/cmdline i can see

acpi_osi= acpi_os_name=Linux i915.enable_dpcd_backlight

has been added, but the keys to regulate screen brightness still don’t work

It seemed to me that you had found a working solution to this issue from your post:

I am sorry for the late reply.

@ryuu, you are right. The title suggests what you seem to be hoping to find. I need to change it to better reflect what was actually achieved in this thread, but I do not see a button to do it at the moment. This thread is actually about finding the right place to pass on brightness control parameters to the kernel. What the kernel does with them once they correctly appear in its command line call is another issue.

It appears to me that even if the parameters are passed on to the kernel correctly, they have no effect. I thought that it might be a missing driver issue, which is why I opened another thread:

1 Like