The officially official Devuan Forum!

You are not logged in.

#276 Re: Desktop and Multimedia » when X is killed, lightdm restarts it [SOLVED] » 2018-05-02 11:19:15

Making progress: If I bind Control+Alt+Delete to this command, it does more or less what I want: sudo chvt 1; sudo service lightdm stop

The problem with this is that when lightdm stops, it leaves behind nothing but a black screen with a blinking cursor in tty7, thus rendering tty7 unusable. Doesn't lightdm know how to stop gracefully (e.g., to a command prompt or CLI login prompt)?

#277 Re: Desktop and Multimedia » when X is killed, lightdm restarts it [SOLVED] » 2018-05-02 10:38:28

Back in my Arch Linux days, I was able to get lightdm to behave itself by creating /etc/systemd/system/lightdm.service.d/norestart.conf with this in it:

[Service]
Restart=no

What would be the Devuan/SysVinit equivalent?

#278 Re: Desktop and Multimedia » when X is killed, lightdm restarts it [SOLVED] » 2018-05-02 10:26:34

Thank you, Geoff42. Those shortcuts are exactly what I use when I want a console.

I appreciate lightdm presenting a new graphical login screen when I log off. IMHO that is expected behavior.

When I kill X what I would like is, well, for X to be killed in tty7, stay dead (e.g., so that I can install/uninstall X-related packages), and for the system to present me with a non-GUI login or command prompt in tty7.

Lightdm's current (default) behavior "resurrects" X as soon as I kill it, which is annoying.

#279 Re: Devuan Derivatives » [Miyo] How to set daily trim job? [SOLVED] » 2018-05-02 03:03:50

Yes, you can mark it as solved. The timestamp in /var/spool/anacron/ is proof that the job ran smile

Now we're just making things more elegant and streamlined.

Ron wrote:

You mean I really don't even need the trim script file?

That's correct. For a simple one-liner task such as this, you don't need a script. I didn't want to point it out before--thinking it might be rewarding for you to get this working "your way"--but you can accomplish what you need by simply having this in /etc/anacrontab:

1 8    automatic.trim   /sbin/fstrim --all

(siva is right: the || true is not only superfluous, it can potentially be misleading. Without || true in there, if the fstrim command fails (not that it ever should) then the overall anacron job fails and if you investigate you'll be able to see that it failed. With || true in there, if the fstrim command fails then the true command runs, completes successfully (the true command always does nothing and completes sucessfully--that is what it does by design, which seems silly but is actually useful in several settings), and the overall anacron job completes successfully because the last command it ran completed successfully.)

#280 Re: Devuan Derivatives » [Miyo] How to set daily trim job? [SOLVED] » 2018-05-02 00:47:02

Now you're cooking.

cron.daily is a separate job. Yours is called example.daily and you are correct: You don't see it in syslog because you need to re-add it to /etc/anacrontab. The name of the job can be anything you want, by the way, so feel free to give it a more descriptive name such as automatic.trim or the like.

You can do it either way, Ron. If you put the script in /etc/cron.daily/ then the script will be run as part of the cron.daily job which comes with anacron by default (take a look inside /etc/anacrontab and you'll see the cron.daily job listed there). I prefer to have my scripts be their own separate jobs, because then they get their own separate timestamp file in /var/spool/anacron/ and things are a bit more explicit.

#281 Re: Devuan Derivatives » [Miyo] How to set daily trim job? [SOLVED] » 2018-05-02 00:20:24

Ron wrote:

which anacron returned nothing while almost every line from find / -iname anacron ended with Permission denied.

Ron, anacron isn't even installed on your system. In my previous post I listed everything you need to do. Sorry but unless you try what I suggested I cannot help you further.

The script will do what you want it to.

#282 Re: Desktop and Multimedia » closing and opening laptop lid maximizes brightness [SOLVED] » 2018-05-01 23:58:06

I see. Well, in my Jessie install I don't have acpi, acpid, or any packages installed which contain the string 'acpi' anywhere in the package name.

#283 Re: Desktop and Multimedia » closing and opening laptop lid maximizes brightness [SOLVED] » 2018-05-01 23:04:35

I never needed acpi in my Jessie installation, so never installed it. acpi_listen command is not present.

#284 Desktop and Multimedia » closing and opening laptop lid maximizes brightness [SOLVED] » 2018-05-01 22:43:24

GNUser
Replies: 8

Since graphics and laptop lid have given me such a headache in Ascii, I want to learn more about these things.

I have a T400 with integrated Intel grapics, libreboot, MATE, and lightdm. In my Devuan Jessie partition, which is quite a vanilla installation using the default kernel (version 3.16.51-3+deb8u1), I've noticed that if I turn the display brightness down, close laptop lid, then open laptop lid, brightness automatically changes itself to maximum. How can I prevent this?

Some details:
-acpi is not installed
-I have IgnoreLid=true in /etc/UPower/Upower.conf
-using i915.panel_ignore_lid=1 and i915.panel_ignore_lid=-2 kernel boot options have no effect

#285 Desktop and Multimedia » when X is killed, lightdm restarts it [SOLVED] » 2018-05-01 21:51:31

GNUser
Replies: 13

I use Ctrl+Alt+Backspace to kill my X session. Please, how do I prevent lightdm from immediately restarting X and showing a graphical login screen when the X session is killed?

When I kill the X session, it is because I want to work in a virtual console without X running.

I perused /etc/lightdm/lightdm.conf and /etc/init.d/lightdm but didn't find anything promising.

#286 Re: Devuan Derivatives » [Miyo] How to set daily trim job? [SOLVED] » 2018-05-01 21:28:11

Ron, we're getting warmer. Just a few tips:

1. @monthly is the only supported shortcut. @daily and @weekly are not supported. Use 1 and 7 for daily and weekly, respectively. In other words, this is what you want in /etc/anacrontab:

1 10    example.daily   /bin/bash /home/ron/Documents/trim

2. /usr/sbin/anacron should definitely be a real file. Please run these commands:

sudo apt-get purge live-config live-config-doc live-config-sysvinit anacron
sudo dpkg-divert --remove /usr/sbin/anacron
sudo apt-get install anacron

(If you don't have sudo, then run the command su without any arguments, enter your root password, then run the above commands without sudo.)
After you've done the above, check /usr/sbin/anacron again. It should be a real, executable file (not a link).

3. At that point you are ready to test to see if it is working. Reboot your computer then run this command:

sudo cat /var/log/syslog | grep anacron

If anacron is working, you should see a line saying that job 'example.daily' will run in 10 minutes.

4. To make sure that the job actually ran, wait over 10 minutes then examine the contents of the file /var/spool/anacron/example.daily. If your job actually ran, that file should exist and should contain a timestamp like '20180501'

5. When the job runs, it will do exactly what /home/ron/Documents/trim tells it to do, which may or may not be what you intend. Would you kindly share the contents of that file?

#287 Re: Hardware & System Configuration » what are the driver options for integrated Intel graphics? » 2018-05-01 12:27:38

devuser wrote:

I am on X220 and i am not even sure X uses the Intel driver.

Yep, when I was knee-deep in troubleshooting graphics issues on my T400 (graphics-related issues were by far the most painful part of upgrading from Devuan Jessie to Devuan Ascii for me) I tried uninstalling xserver-xorg-video-intel to see what would happen. Removing it had no effect on my system.

I am on Devuan Ascii and had tried the same kernel (3.16.something) I was using when I was running Devuan Jessie on this machine. Surprisingly, I had no issues on Jessie, but Ascii had occasional graphics-related lockups during boot (see this). Therefore, since identical hardware+kernel gave me no issues on Jessie but graphics-related boot lockups on Ascii, my guess is that from Jessie to Ascii there has been a change in Xorg that is problematic for my hardware (T400 with libreboot and integrated Intel graphics).

I considered lunario's idea of downgrading X to the version in Jessie (see post #9 here), but ultimately decided to keep Ascii's X version and try my luck with different kernels. I don't know if that was wise because I ended up trying 24 different kernels from 3.14.12 to 4.16.5 and not a single one was completely trouble-free for me.

At this point, I've done more troubleshooting than I can stomach. My current setup is quite tolerable: Devuan Ascii with its default Xorg, using linux-libre 4.16.2 (and its i915 module). With this setup, my only remaining issue is a lid-related graphics bug which I can avoid by disabling the lid switch (see this).

#288 Re: Desktop and Multimedia » Traditional GTK themes with support for GTK 3.22 » 2018-05-01 12:04:42

I feel your pain--broken themes are always near the top when it comes to OS-upgrade hassles. The GTK3 developers obviously don't give a hoot about backward compatibility. I only use their inconsiderate software because I more or less have to. I wish they were more like Linus Torvalds, conscientious about not breaking stuff as the code evolves.

All I liked about Arc-Darker were the color scheme and the window buttons (minimize, maximize, close), which is why I used it as a base. I find the extreme minimalism in today's UIs (including Arc-Darker) to be a disgrace. Therefore, my custom theme is basically Arc-Darker's traditional and more sensible sister.

#289 Re: Devuan Derivatives » [Miyo] How to set daily trim job? [SOLVED] » 2018-04-30 20:20:00

Oh, sorry to complicate things but if you installed Devuan Ascii from a live image (e.g., a Miyo live image), you may have been hit with this issue.

To check, run this command: ls -l /usr/sbin/anacron

If /usr/sbin/anacron is a link to /bin/true, then you need to run these commands for anacron to work properly:

sudo apt-get purge live-config live-config-doc live-config-sysvinit
sudo dpkg-divert --remove /usr/sbin/anacron
sudo apt-get install --reinstall anacron

Incidentally, this issue may explain why jobs in /etc/cron.daily aren't working for you. If anacron is present on your system, then cron delegates the jobs in /etc/cron.daily to anacron. However, if you installed from a live image, anacron is disabled until you do the above.

#290 Re: Devuan Derivatives » [Miyo] How to set daily trim job? [SOLVED] » 2018-04-30 16:31:10

Ron, I have a laptop with a SSD. An anacron job trims the SSD for me periodically.

Unless your machine is on 24/7, I'd go with anacron. Install it, then for a daily trim add this line to /etc/anacrontab:

1 1 dailytrim /sbin/fstrim -av

The first '1' means the job should run daily. The second '1' tells anacron to run the job one minute after anacron itself runs. (By default, anacron runs every time you boot, every time you resume from suspend, and everyday at 7:30 am. No matter how many times anacron runs in a 24 hour period, it will only run your job daily--it keeps track of when the job last ran with a timestamp in /var/spool/anacron/.)

If you are on a laptop and want the job to run regardless of whether you are on AC or battery power, make sure to edit /etc/default/anacron accordingly and remove the executable bit from /usr/lib/pm-utils/power.d/anacron if that file exists on your machine (see this).

#291 Re: Desktop and Multimedia » Again Mate and permissions problem » 2018-04-30 16:20:47

rolfie, my setup is very similar to yours (Devuan ASCII with LightDM and MATE) and I'm not having any permissions issues.

Is there a particular reason you are installing consolekit and friends? Neither MATE nor LightDM require consolekit, so maybe the consolekit packages are installed on your system but not actually being used.

I have no packages installed on my system with "consolekit" anywhere in the name. I have these with "elogind" in the name:

elogind 234.4-1+devuan1.5
libelogind0:amd64 234.4-1+devuan1.5
libpam-elogind:amd64 234.4-1+devuan1.5
libpolkit-backend-1-0-elogind:amd64 0.105-18+devuan2.4
libpolkit-gobject-1-0-elogind:amd64 0.105-18+devuan2.4

If I were you I'd backup my system, uninstall all the consolekit packages, and install the above elogind packages. I bet your permissions issues would go away.

#292 Re: Hardware & System Configuration » how to completely disable laptop lid detection? [SOLVED] » 2018-04-30 14:11:14

To attempt to answer my own question:

When I try miscellaneous other kernels, the lid-related graphics bug I describe in post #1 goes away. (Unfortunately these other kernels affect my system in other less tolerable ways, so using them is out of the question.) Therefore, although I can't prove it, I think the 4.16.2 kernel itself (or its i915 module) is the bad guy that messes up my display when I close and open the lid.

At any rate, with the lid switch disabled I can finally just sit back and enjoy my Devuan Ascii installation smile

Devuan rules!

#293 Re: Hardware & System Configuration » how to completely disable laptop lid detection? [SOLVED] » 2018-04-29 23:32:55

Haha, indeed!

Parenthetically, this whole thread was just a workaround/bandaid for my issue. The real question is "which system component is changing display settings in response to the laptop lid?" Before I close the laptop lid my display settings are fine, but after closing and reopening the laptop lid the display settings are severely messed up (see post #1).

#294 Re: Hardware & System Configuration » how to completely disable laptop lid detection? [SOLVED] » 2018-04-29 19:00:08

I found a low-tech solution: I taped a tiny magnet at the right spot*. Now the switch is still detected as an input device, but closing and opening the lid has absolutely no effect.

P.S. To find the right spot, I just moved a magnet around until it triggered the lid switch. For my T400, the spot was below the display and just above the bluetooth LED.

#295 Re: Hardware & System Configuration » how to completely disable laptop lid detection? [SOLVED] » 2018-04-29 02:55:51

These are all excellent ideas, which makes me all the more flabbergasted that I don't have a hot lead yet:

1. My kernel is linux-libre 4.16.2, which causes me the fewest problems (only the bug described in post #1). The button driver is definitely not a kernel module for this particular kernel, so I guess it must be a built-in driver.

2. Indeed, I found the thinkpad_acpi module loaded. Surprisingly, blacklisting it has no discernible effect.

3. modinfo $(lsmod | sed 's/\s.*//') is a great idea. Alas, I cannot find the string "button" in the output. I did find the panel_ignore_lid parameter for the i915 kernel module and I tried all of the values, no joy.

4. I installed xserver-xorg-input-evdev. Interestingly, there is basically no change in /var/log/Xorg.0.log:

[     7.869] (II) config/udev: Adding input device Lid Switch (/dev/input/event1)
[     7.869] (II) No input driver specified, ignoring this device.
[     7.869] (II) This device may have been added with another device file.

5. I'd like to try disabling the Lid Switch input method in X with a custom config file in /usr/share/X11/xorg.conf.d similar to this (without the MatchIsTouchscreen, of course), but it's looking bleak given that $ xinput --list does not output anything that looks like a lid switch.

It seems that I underestimated the complexity involved in completely disabling the lid switch. One would think it would be simple.

#296 Re: Hardware & System Configuration » how to completely disable laptop lid detection? [SOLVED] » 2018-04-28 15:43:20

From looking at the output of the udevadm command in post #11, another option might be to somehow blacklist the button driver. Alas, button does not seem to be a kernel module (I don't see button in the output of lsmod), so I have no idea how to blacklist it.

#297 Re: Hardware & System Configuration » how to completely disable laptop lid detection? [SOLVED] » 2018-04-28 15:14:24

Here is the output of udevadm info -a -n /dev/input/event1:

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2a/PNP0C09:00/PNP0C0D:00/input/input1/event1':
    KERNEL=="event1"
    SUBSYSTEM=="input"
    DRIVER==""

  looking at parent device '/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2a/PNP0C09:00/PNP0C0D:00/input/input1':
    KERNELS=="input1"
    SUBSYSTEMS=="input"
    DRIVERS==""
    ATTRS{uniq}==""
    ATTRS{properties}=="0"
    ATTRS{phys}=="PNP0C0D/button/input0"
    ATTRS{name}=="Lid Switch"

  looking at parent device '/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2a/PNP0C09:00/PNP0C0D:00':
    KERNELS=="PNP0C0D:00"
    SUBSYSTEMS=="acpi"
    DRIVERS=="button"
    ATTRS{hid}=="PNP0C0D"
    ATTRS{path}=="\_SB_.PCI0.LPCB.EC__.LID_"

  looking at parent device '/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2a/PNP0C09:00':
    KERNELS=="PNP0C09:00"
    SUBSYSTEMS=="acpi"
    DRIVERS=="ec"
    ATTRS{uid}=="0"
    ATTRS{hid}=="PNP0C09"
    ATTRS{path}=="\_SB_.PCI0.LPCB.EC__"

  looking at parent device '/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2a':
    KERNELS=="device:2a"
    SUBSYSTEMS=="acpi"
    DRIVERS==""
    ATTRS{adr}=="0x001f0000"
    ATTRS{path}=="\_SB_.PCI0.LPCB"

  looking at parent device '/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00':
    KERNELS=="PNP0A08:00"
    SUBSYSTEMS=="acpi"
    DRIVERS==""
    ATTRS{adr}=="0x00000000"
    ATTRS{hid}=="PNP0A08"
    ATTRS{path}=="\_SB_.PCI0"

  looking at parent device '/devices/LNXSYSTM:00/LNXSYBUS:00':
    KERNELS=="LNXSYBUS:00"
    SUBSYSTEMS=="acpi"
    DRIVERS==""
    ATTRS{hid}=="LNXSYBUS"
    ATTRS{path}=="\_SB_"

  looking at parent device '/devices/LNXSYSTM:00':
    KERNELS=="LNXSYSTM:00"
    SUBSYSTEMS=="acpi"
    DRIVERS==""
    ATTRS{hid}=="LNXSYSTM"
    ATTRS{path}=="\"

The lid switch has the convenient "Lid Switch" name attribute. Can someone help me write a udev rule that will disable the lid switch?

I know very little about udev rules, but tried creating /etc/udev/rules.d/90-disable-lid-switch with this in it:

ACTION=="add", ATTRS{name}=="Lid Switch", RUN="/bin/sh -c 'echo 0 >/sys/\$devpath/authorized'"

Not surprisingly, my feeble attempt at a udev rule had no effect--lid switch is still functional and able to trigger the video bug.

#298 Re: Hardware & System Configuration » how to completely disable laptop lid detection? [SOLVED] » 2018-04-28 14:24:05

Thank you for that, mlsmith. I tried it and closing/reopening the lid still triggers the bug.

I think my best chance is to disable the lid switch at the lowest possible level. dmesg shows this:

bruno@thinkpad:~$ dmesg | grep Lid
[    0.797043] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2a/PNP0C09:00/PNP0C0D:00/input/input1
[    0.797058] ACPI: Lid Switch [LID]

Is eudev related to the first line above?

I will try ralph.ronnquist's idea to explore eudev meanwhile.

#299 Re: Hardware & System Configuration » how to completely disable laptop lid detection? [SOLVED] » 2018-04-28 12:55:14

@ralph.ronnquist. I have very strange results to report:

1. My lid switch is /dev/input/event1, so manually deleted /dev/input/event1. I also deleted /var/log/Xorg.0.log
2. I then kill X (Control + Alt + Backspace) and log back in
3. /var/log/Xorg.0.log shows the same Lid Switch lines (it is added as /dev/input/event1) even though /dev/input/event1 does not exist
4. Closing and opening the lid triggers the crazy graphics bug

@mlsmith:

bruno@thinkpad:~$ cat /proc/acpi/wakeup
Device	S-state	  Status   Sysfs node
HDEF	  S4	*disabled  pci:0000:00:1b.0
USB1	  S4	*enabled   pci:0000:00:1d.0
USB2	  S4	*enabled   pci:0000:00:1d.1
USB3	  S4	*enabled   pci:0000:00:1d.2
EHC1	  S4	*enabled   pci:0000:00:1d.7
USB4	  S4	*enabled   pci:0000:00:1a.0
USB5	  S4	*enabled   pci:0000:00:1a.1
USB6	  S4	*enabled   pci:0000:00:1a.2
EHC2	  S4	*enabled   pci:0000:00:1a.7
SLT1	  S4	*disabled  pci:0000:05:00.0
SLT2	  S4	*disabled
SLT3	  S4	*disabled
SLT6	  S4	*disabled
LANC	  S3	*disabled
LANR	  S3	*disabled
SLPB	  S3	*enabled   platform:PNP0C0E:00
LID	  S3	*enabled   platform:PNP0C0D:00

#300 Re: Hardware & System Configuration » how to completely disable laptop lid detection? [SOLVED] » 2018-04-28 12:40:09

ralph.ronnquist, I updated my post above with the subsequent lines from the log. It does seem that something else is presenting the lid switch to X.

I will do the experiment and will report back in a minute.

Board footer

Forum Software