The officially official Devuan Forum!

You are not logged in.

#1 Hardware & System Configuration » Getting "iHD_drv_video.so init failed" error on ThinkPad » 2023-02-23 15:11:55

john2009w
Replies: 0

I installed Devuan Daedalus (testing) i386 on a ThinkPad with i3 cpu. While installing, on the tasksel screen, I unchecked everything except standard utilities (last one) for a minimal setup. After install I logged in to the system and installed xserver-xorg package, openbox and some other things.

From openbox session when I run vainfo I get a "iHD_drv_video.so init failed" error:

$ vainfo
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva error: /usr/lib/i386-linux-gnu/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 1
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.17 (libva 2.12.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Ironlake Mobile - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc

Setting "LIBVA_DRIVER_NAME=i965" gets rid of the error though:

$ LIBVA_DRIVER_NAME=i965 vainfo 
libva info: VA-API version 1.17.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.17 (libva 2.12.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Ironlake Mobile - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc

I haven't tried setting it on environment system-wide. Is that a good idea?

Searching around I found this thread which links to this task on Arch Linux project that has these 2 comments:

Downgrading intel-gmmlib 22.1.2-1 -> 22.0.3-1 is enough to restore functionality.
...
Rebuilding intel-media-driver against uptodate intel-gmmlib is enough to fix the issue as well.

Other outputs:

$ sudo lshw -c CPU | head -n4
  *-cpu                     
       description: CPU
       product: Intel(R) Core(TM) i3 CPU       M 330  @ 2.13GHz
       vendor: Intel Corp.
$ lspci -nn | grep -E 'VGA|Display'
00:02.0 VGA compatible controller [0300]: Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 02)
$ glxinfo | grep ^Open
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics (ILK)
OpenGL version string: 2.1 Mesa 22.3.3
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 22.3.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:
$ sudo lshw -c video
  *-display                 
       description: VGA compatible controller
       product: Core Processor Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 02
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 resolution=1280,800
       resources: irq:27 memory:f2000000-f23fffff memory:d0000000-dfffffff ioport:1800(size=8) memory:c0000-dffff
$ sudo dmesg | grep i915
[   18.602520] intel ips 0000:00:1f.6: failed to get i915 symbols, graphics turbo disabled until i915 loads
[   20.326065] i915 0000:00:02.0: vgaarb: deactivate vga console
[   20.328931] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[   20.377923] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
[   20.379331] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   20.393557] fbcon: i915drmfb (fb0) is primary device
[   20.996558] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
[   23.910795] intel ips 0000:00:1f.6: i915 driver attached, reenabling gpu turbo

Is there a solution to this?

#2 Re: Documentation » [HowTo] Install PHP 8.2 on Devuan Chimaera (stable) » 2023-02-19 09:08:54

mckaygerhard wrote:

i used php 5.6 and 7.3 "should not be used" .. pifff the problem with geek people its that confused security with fashion updates.. the excuse from upstream is security, but for that there are so many people working in such thing, like debian LTS with freexian repos

There could be vulnerabilities. 7.4 is just deprecated and what if new vulnerabilities emerge? And without official support this is a risk.

Even if someone patches things it could take more time to do. Why take the risk? This should not be forced on to all users at least. If someone has old code that needs 7.x that's fine. But users should be able to get out of an unsupported version. (I am not recommending this method for everyone as mentioned above and below, but rather have been requesting for a backport as a more logical solution.)

mckaygerhard wrote:

ALSO  mixing repos from unstable only works cos right now unstable and testing are very close in dependencies.. but this does not works as is.. so this guide is not so great neither secure ironically

I used testing, not unstable. Also understand that I had to do that as a last resort. TDR repos did not have i686 support. I did not recommend this for everyone (please check NOTEs and WARNINGs), rather recommended to check backports first. This is for people who are willing to take the risk of testing the setup. Didn't have any other way, this worked, was fairly stable, so thought of sharing it. If this may have any problems in future, please point that out as it should be sort of a warning to what someone is getting into.

This is why 8.x should be in backports so that I don't have to jump through hoops just to get out of an unsupported version.

#3 Re: Off-topic » deb.sury.org now requires systemd » 2023-02-16 08:05:11

@Erdem

Here is a guide if you want PHP 8.2 on Devuan Chimaera.

@tdrnetworks

I see. No problem though. I have figured out a way to "mix" testing/daedalus packages with chimaera and got PHP 8.2 working on i686. So I should be good for now at least.

Although it would be good to see a collaboration of you guys with Devuan team maintaining PHP 8.2. And hopefully it will be there on backports, as 7.4 is deprecated on November 2022. It should be made available asap.

#4 Documentation » [HowTo] Install PHP 8.2 on Devuan Chimaera (stable) » 2023-02-16 07:57:41

john2009w
Replies: 3

Tested under a i686 install of Devuan Chimaera (stable) with runit init system and nginx server.

Devuan Chimaera has PHP 7.4 on repos which has been made EOL on November 2022 and should not be used. This guide explains a way to install PHP 8.2 on Chimaera.

NOTE: There are many applications which don't support PHP 8.2 yet. Please check all the application system requirements to be sure that everything will work. For example, the current Nextcloud release, version 25, does not support PHP 8.2, but only up to 8.1. Nextcloud 26 is going to be released on March 2023 and should have support for PHP 8.2. Another option is TDR repos which at the time of writing this has PHP 8.0.15 and 8.1.2 but only x64 and thus doesn't have i686 support.

WARNING: These instructions have not been tested extensively and I'm not experienced with this. Even though it has been running great on my machine, be sure to test it on staging environment thoroughly before serious use.

There are packages in daedalus (testing) and ceres (unstable) for PHP 8.2. So in this guide we're going to mix these packages from testing with stable. But we're going to do that in a process that does not ruin the stable experience. apt will see testing packages when we explicitly mention so. Otherwise it will see and install stable packages (unless some are installed from testing already). NOTE: If PHP 8.x becomes available in chimaera-backports in future (check here to see if chimaera-backports is mentioned under a 8.x package), using that instead may be a better idea. At the time of writing this, it is not the case.

I followed official Debian guide for "mixing" testing packages in stable and as much as I tested it worked fine for me. So if you're eager, read on...

Edit /etc/apt/apt.conf and add:

APT::Default-Release "chimaera";

Here we are setting the default release that we want apt to see when using apt normally. NOTE: You may need to change this when upgrading Devuan.

Edit /etc/apt/sources.list and add:

# To allow to mix packages from testing
deb http://deb.devuan.org/merged daedalus main contrib non-free
deb-src http://deb.devuan.org/merged daedalus main contrib non-free

Here we are enabling daedalus (currently testing) repos to install PHP 8.2 from. NOTE: You may need to change this when upgrading Devuan.

Now update to reflect changes:

sudo apt update

I noticed that when I try to apt upgrade, it tries to install linux-image from daedalus. But I want to keep linux-image from stable. I don't want any packages from testing unless I say so. So I had to set priorities for repositories by adding the following on /etc/apt/preferences to make sure this happens:

Package: *
Pin: release a=stable
Pin-Priority: 900

Package: *
Pin: release a=testing
Pin-Priority: 400

Now to install from testing, try things like:

apt search -t testing php-fpm
sudo apt-get -t testing install php-fpm php-mysql
# and so on...

You can also use repo name exclusively, for example, "-t daedalus". Carefully check what these commands install and if you are ok with them. And when running apt search carefully check from which repo it is seeing packages from. It should have the repo after the "package-name/" part, like "php7.4-fpm/stable,stable-security,now", "php8.2-fpm/testing,now". It should select "php8.2" series packages on the apt install command above if everything went well.

To confirm, run php --version:

$ php --version
PHP 8.2.2 (cli) (built: Feb  7 2023 11:27:52) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.2, Copyright (c) Zend Technologies
	with Zend OPcache v8.2.2, Copyright (c), by Zend Technologies

To install anything from stable, just drop the "-t testing" argument and use apt like you used before. Like "apt search nodejs" should show "nodejs/stable".

If anybody notices any issues with this guide feel free to respond below.

UPDATES:
1. Updated some URLs, change "php8.2", minor changes (20230216)

#5 Re: Off-topic » deb.sury.org now requires systemd » 2023-02-14 06:44:20

tdrnetworks wrote:

Hi,

I have just now pushed a set of new php versions to the repo. 

php8.1 and Devuan Chimaera are now added.

Thanks for the hard work. I have a x86 chimaera install and when I try to apt update it says:

N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://pkgs.tdrnetworks.com/apt/devuan chimaera InRelease' doesn't support architecture 'i386'

1. Is there any chance x86 support is coming?
2. When will it be available in chimaera-backports? PHP7.4 is now EOL. So PHP8.x should be made available.
3. I found this php-8.2 package which is available in ceres and daedalus. Can this be used instead on x86? What would be the difference with tdr option? I'm thinking of following this to mix Daedalus packages with Chimaera if it doesn't cause issues.

EDIT: I tried adding

deb http://deb.devuan.org/merged chimaera-backports main non-free contrib

in /etc/apt/sources.list and after an apt update I found php-8.2 and many other extensions are available. So far so good. But php-fpm is still at 7.4 unfortunately. A search shows that it is available in ceres and daedalus. Is there a way to install it with backports? Or would I have to mix?
Please disregard the edit. Some packages were left from my earlier attempts.

#6 Re: Off-topic » What other distro are you using (besides devuan)? » 2020-07-19 00:04:11

Head_on_a_Stick wrote:

I've switched to Alpine Linux for my daily driver — the musl libc base ensures a fundamental incompatibility with systemd that I'm sure will be appreciated by the community here smile

omg!! You're my favorite guy from now on! I wanted to run sway inside Alpine a few months ago. My target was almost the same, to avoid bloat and to see if I can fit it inside a below 512 MB flash drive (very old drive, hence the size). But forgot to try it because I got busy on other projects.

Do you have a guide/blog post describing how you did all these? I would love to read something like that.

btw... I have

- Arch
- Parabola
- Trisquel
- Sparky Linux
- Void Linux (love it!! my daily driver!)
- Artix
- Also use Slax, Puppy, Tiny Core, Slitaz on some of my flash drives when I need to rescue a machine

#7 Re: Other Issues » [SOLVED] How do I install Kodi on Devuan? » 2020-07-18 23:48:43

bgstack15 wrote:
Head_on_a_Stick wrote:

Yes, Guix is very nice. All the cool kids use Nix but that isn't free (as in speech). There's also pkgsrc.

For my edification, please elaborate! I did a brief Internet search for "nix not free software" but of course the results are polluted with items unrelated to your statement. I would like to understand Nix (and maybe NixOS) better from your side. And yeah, I do know a hipster at work who uses Nix and loves it...

Guix is from GNU. So it values the 4 essential freedoms of the Free Software Movement/FSF. There are many projects that are open source but not Free software because it does not completely have those 4 freedoms.

Linux is open source but not Free software

Open source ≠ Free Software.

Linux is open source but not Free software - because it has some closed source binary blobs for some drivers - you can't change binary code and redistribute changed copies of it so it disqualifies as being Free. So to make it fully Free software, some people started Linux-Libre which is Free software. Linux libre is basically Linux but has all those binary blobs removed. I use it too with my Devuan and I love it. But I have setup my hardware to support linux libre, otherwise everything may not work as expected (i.e. I changed or removed hardware that needs binary blobs to function).

Guix doesn't have semi-Free software. It only has pure, libre software. Hence it's different. There are many other distros that are 100% libre and have Linux Libre as default kernel and their repos are free from semi-Free software.

Head_on_a_Stick wrote:

Guix is a fork of Nix.

I see. That explains a lot.

#8 Re: DIY » [HowTo] runit-init as PID1 » 2020-07-18 23:26:31

Well, previously tried runit on Beowulf. It also froze up like Chimaera. The difference is that it asked a question when installing. Otherwise everything else was the same.

It's OK. I think I found a solution to these problems. No new threads necessary. I installed slim dm and then started slim service, rebooted. Before rebooting I reverted the changes. And then after reboot when I logged in with slim, everything worked fine. Mouse and keyboard was working, nm openvpn connection was working. It even fixed a pavucontrol issue that was showing "Connection to PulseAudio failed. Automatic retry in 5s". I didn't need slim on sysvinit. So I guess using a dm is a must when switching to runit (to avoid problems that needs manual changes otherwise). But I had a good adventure tbh!

#9 Re: DIY » [HowTo] runit-init as PID1 » 2020-07-18 09:52:35

Head_on_a_Stick wrote:
john2009w wrote:

I had to add needs_root_rights = yes on /etc/X11/Xwrapper.config.

That is no longer needed, elogind should allow rootless X without xserver-xorg-legacy.

Thanks for the hint. Unfortunately having elogind did not work for me. I looked into a failed xorg log when mouse was not working. It had entries like:

(EE) xf86OpenSerial: Cannot open device /dev/input/event1

I searched around and found that adding the user to "input" group should solve the issue without needing to set `needs_root_rights=yes`. So removed the line from Xwrapper.config, ran sudo dpkg-reconfigure xserver-xorg-legacy command, then:

sudo usermod -aG input $USER

Then found out there was another problem. I wasn't able to connect to openvpn connections. It said `Error: Connection activation failed: Not authorized to control networking.` So I made sure I added myself to sudo usermod -aG netdev $USER, then put the code below on /etc/polkit-1/localauthority/50-local.d/80-networkmanager.pkla:

[network manager allow users]
Identity=unix-group:netdev
Action=org.freedesktop.NetworkManager.*
ResultAny=yes

Then rebooted to apply the group changes. Now everything's fine. (so far at least)

I think there should be some wiki or doc somewhere about these things. This is way past installing just a package.

Head_on_a_Stick wrote:
john2009w wrote:

But I need to change to other desktops/wms sometimes

For Devuan ~/.xsession should be used instead of ~/.xinitrc. And you don't need to prepend openbox-session with dbus-launch.

That's interesting. I've never used that. How do I change the desktop/wm then?

john2009w wrote:

when I tried `sudo sv restart network-manager` it didn't work

The service management is performed through wrapper functions so you just treat the box as if it was running sysvinit.

That's great. cool Then it becomes easier than I thought.

xinomilo wrote:

runit for debian is far for complete.. tried runit (& s6) in artix and indeed, a very different experience there.

I don't mind it, at least the way it's on Devuan. Artix/Parabola OpenRC also has some issues which need manual intervention during setup. But what really helps is  a doc/wiki page guiding through this process. Artix has good guides on switching to and installing runit. Having something similar would be helpful.

#10 Re: DIY » [HowTo] runit-init as PID1 » 2020-07-17 22:09:47

Head_on_a_Stick wrote:

It's called "testing" for a reason wink

Haha. You said it right. Living on Artix/Void has made me used to it. I think I found a solution. I remember I got this problem once on Artix/Parabola OpenRC. I had to add needs_root_rights = yes on /etc/X11/Xwrapper.config. So my steps are:

  • Install runit-init package

sudo -s
apt install runit-init
  • If it asks for a question answer it

  • Add the line below to /etc/X11/Xwrapper.config

needs_root_rights = yes
  • Then as the config file suggests, run this to keep the changes intact across upgrades:

dkpg-reconfigure xserver-xorg-legacy

When it prompts, default selection (console) is fine then press enter

  • Then run `reboot`

  • When asked to enter root password, enter it. Then again `reboot`

Head_on_a_Stick wrote:

You shouldn't need dbus-launch or ~/.xinitrc.

Try

rm ~/.xinitrc
# update-alternatives --set x-session-manager /usr/bin/openbox-session
startx

But I need to change to other desktops/wms sometimes, so startx is easier for me. It's more Unixy this way. Everything is a file, you just edit and it works.

EDIT: I have a question though... I have `runit` returned on `cat /proc/1/comm`. But when I tried `sudo sv restart network-manager` it didn't work. I have to restart network manager through `sudo service network-manager restart`. Why it that?

#11 Re: Other Issues » [SOLVED] How do I install Kodi on Devuan? » 2020-07-17 21:54:34

Didn't know about Nix. Seems similar to Guix:

Nix stores packages in the Nix store, usually the directory /nix/store ... You can have multiple versions or variants of a package installed at the same time. This is especially important when different applications have dependencies on different versions of the same package — it prevents the “DLL hell”.

I want packages like IceCat also. Nix doesn't have that so it wouldn't be a thing for me. But good to know it exists.

#12 Re: DIY » [HowTo] runit-init as PID1 » 2020-07-17 20:25:20

My mouse cursor freezes under runit and I have no choice but to shutdown with power button. I'm on Chimaera/testing. I use `exec dbus-launch openbox-session &` with ~/.xinitrc

When I ran `# apt install runit-init`, it said:

...
dpkg: sysvinit-core: dependency problems, but removing anyway as you requested:
 init depends on sysvinit-core | runit-init: however:
  Package sysvinit-core is to be removed.
  Package runit-init is not installed.
...
Unpacking runit-init (2.1.2-36) ...
Setting up runit-init (2.1.2-36) ...

And there was no question asked like, "To continue type in the phrase" etc. Is this normal?

However I ran `reboot` and it said at the end:

Will now restart.
Give root password for maintenance
(or press Control-D to continue):

Pressing Ctrl+D says `sulogin: cannot read /dev/tty1: Operation not permitted`, then asks for root password again. If I enter root password it logins to a root prompt. I run `reboot` there and it finally rebooted.

After the reboot when I login on tty1 and run startx, it shows tint2 panel and everything, but I can't move the mouse cursor, can't do anything with keyboard and the machine freezes!! Please help!

#13 Re: Other Issues » [SOLVED] How do I install Kodi on Devuan? » 2020-07-17 16:45:09

Head_on_a_Stick wrote:

That's an interesting approach, does Guix also install the packages that are needed for hardware video acceleration?

Guix pulled down a version of mesa from its repository when I installed Kodi. So I guess yes.

You can also check out their available package list. It's not bad. Lots of packages to install.

#14 Re: Other Issues » [SOLVED] How do I install Kodi on Devuan? » 2020-07-16 15:04:27

No problem, I used Guix to install Kodi:

cd /tmp
wget https://sv.gnu.org/people/viewgpg.php?user_id=15145 -O gpgkey
gpg --import gpgkey
wget https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
chmod +x guix-install.sh
sudo ./guix-install.sh
# when asked "Permit downloading pre-built package binaries", entered "yes"

echo 'export PATH=~/.guix-profile/bin:$PATH'>> ~/.bashrc

# To run the guix daemon on non-systemd environment like in Devuan:
sudo setsid /root/.config/guix/current/bin/guix-daemon --build-users-group=guixbuild &

guix install kodi

And since Python 2 is still there on repo, I can probably build form source too.

Guix pulls down a lot of dependencies (and did I mention it's painfully slow?) So advanced users may want to build it from source to keep things light. But otherwise Guix can help to get the latest version of packages without the hassle of configuring and building or upgrading. And it can work on top of any Linux distro, not only Devuan. I kind of like the idea.

#15 Other Issues » [SOLVED] How do I install Kodi on Devuan? » 2020-07-15 17:44:24

john2009w
Replies: 11

I see Kodi is not available on Devuan repos.

I found some instructions but it doesn't work for Devuan. For a start it says to add this to `/etc/apt/sources.list`:

deb http://http.debian.net/debian jessie-backports main

But it doesn't work, since there is no `jessie-backports` dir on http://ftp.debian.org/debian/dists/. I was going to try bullseye, then got nervous about mixing repos. Can I get only Kodi from debian repos? Is there any special config to do this?

I'm on Chimaera/testing.

#16 Re: Other Issues » Can't mount LUKS VG LVMs - Failed to activate device: File exists » 2020-07-14 19:00:43

Install libpam-elogind to satisfy the dependency on libpam-systemd. network-manager works in beowulf.

Thanks, it worked. Also installed `network-manager-gnome` for nm-applet. Working as expected.

OK, so I reached a temporary workaround. I reinstalled Chimaera/testing this time and did not install Xfce to test everything from ground up. I have installed thunar, thunar-volman, gvfs, ran `update-initramfs -u -k all` just in case. I use `exec dbus-launch openbox-session` as before.

Typically, when unlocking an encrypted VG, it asks for LUKS password, then user password. I was looking for a config to skip the user password. I had many failed attempts but luckily found this answer. It said that if the output of pkaction --version is less than `0.106`, then policykit's .rules files won't work. Devuan is still at `0.105`, so .pkla file should be used. I created /etc/polkit-1/localauthority/50-local.d/60-udisks.pkla with:

[udisks]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks.*;org.freedesktop.udisks2.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

For this to work I had to make sure I was in `plugdev` group: sudo usermod -aG plugdev $USER and then reboot for it to take effect.
Now we should be able to mount things without entering our user password. I could probably setup a polkit agent, but this is easier for me now to test around.

I used `lvscan` and found that my VG+LVMs were active already, but they weren't showing up on sidebar, even the external ones (like I reported before, external VGs are affected in Devuan v3 and above but not v2, and VGs booted from are affected in v2-4). Surprizingly when I ran vgchange -ay <vg name>, they came up on sidebar!

But activating the VG I'm currently running Devuan from caused an error telling me that 2 of the lvms are mounted. So I figured I would have to activate LVMs individually with `lvchange`: sudo lvchange -an /dev/<vg name>/<lvm name> && sudo lvchange -ay /dev/<vg name>/<lvm name> for all of them. I don't know why it needs `-an` first, but it works. I wrote a script for running this command for all the VG-LVMs automatically:

#!/bin/bash

# reactivate-lvms.sh
# Loops through LVMs and re-activate them in order for them to appear
# in file explorer sidebars on some versions of Devuan
if [ -z $(command -v lvscan) ];then echo "Run as root. e.g. sudo $0"; exit 1; fi
lvscan | while read lv_line ; do
	LV=`echo $lv_line | awk '{print $2}'`
	# Remove quotes
	LV="${LV%\'}"
	LV="${LV#\'}"
	echo "-- Re-activating $LV..."
	lvchange -an $LV
	lvchange -ay $LV
done

Plus, this should take care for VGs/LVMs both in internal and external media. Theoretically it should work for LVMs even without VGs.

I was never able to list and mount lvm with gui in debian. Plain encrypted partitions, yes, but not lvm. Find out how those others do it, and maybe it can be replicated. Maybe something is missing.

I'm not sure where the issue is... udev, udisks or somewhere else. I'm not that familiar with how these things work. I am looking into udev rules first. I have already tried to use udev rules from Trisquel, but failed. Using rules from v2 raises dmsetup initramfs error. I'm not even a noob when it comes to udev. So an experienced hand would be helpful. Please let me know if I can contact someone.

#17 Re: Other Issues » Can't mount LUKS VG LVMs - Failed to activate device: File exists » 2020-07-11 13:36:08

Thanks, I'll test that.

But even if it works, it would still mean that I'd have to update them when I add/remove/change my lvms. Plus, it wouldn't solve not showing up VG in the USB drive (on beowulf). I think listing all the possible LVMs in fstab won't be practical for me in the long run, as I have lots of other drives with VGs and lots of LVMs in them. Finding out names, mounting them one by one is not very user friendly as well.

First I thought it was a non-systemd issue. But Void Linux (runit init) can list LVMs just fine. So I guess it can be done on Devuan as well. My best guess is that there are some config that is not letting it work. Esp. seeing that it works partially on Devuan 2 makes me think I'm right.

#18 Re: Other Issues » Can't mount LUKS VG LVMs - Failed to activate device: File exists » 2020-07-11 12:16:05

I tried some mounting options from Thunar - Preferences - Advanced tab - Volume Management - Configure, checked 3 checkboxes under Removable Storage. But it didn't solve the problem.

I have "defaults" set for my / and swap on my fstab. Can you suggest any options that I can try?

About trying the upgrade... upgrading to Devuan 3 didn't help. It worsened. Now unlocking the usb VG shows LVMs from neither of the VGs.

I think if I reinstall, I should stick with 2. I like Devuan, but there are more issues than I expected in a stable release. I had network-manager and openvpn installed. They are uninstalled by themselves after the upgrade. When I try to install network-manager it complains "network-manager : Depends: libpam-systemd". Xfce's focus started following the mouse cursor. I had to change it to click manually.

#19 Re: Other Issues » Can't mount LUKS VG LVMs - Failed to activate device: File exists » 2020-07-11 08:20:23

I have gvfs-backends and also gvfs-fuse and udiskie in case it was needed. But not working.

Well, I am not sure if auto-mount with fstab is going to help. I don't actually want it to automount. I want to see the list of the LVMs in Thunar/pcmanfm's sidebar and want to mount it on click.

Another interesting thing I noticed is that I reinstalled with Xfce desktop, and this time stayed with Devuan 2.1. Now if I click on the VG that I have installed Devuan on, the behavior is same as before. It doesn't show LVMs. But when I plug in the USB drive with VG, and unlock it, it shows LVMs from both internal VG and usb VG!! Strange!

As much as I've experimented with config changes, I am suspecting some udisks or polkit config to be missing or wrong. It works, but not on the VGs that are already unlocked and used by system, atleast not before some other device triggers something that makes it work somehow. (probably a bug?)

[I'll probably upgrade to 3 to see if that behavior stays the same and edit this] EDIT: It got worse on 3

#20 Re: Other Issues » Can't mount LUKS VG LVMs - Failed to activate device: File exists » 2020-07-09 14:38:28

fsmithred wrote:

You should be able to mount whatever /dev/mapper/something that needs to be mounted. Or maybe mount /dev/vg1/storage.

Or maybe I'm missing something because I don't know udiskctl. I always use cryptsetup, vgchange and mount to manually mount encrypted lvm.

Yes. You're right. I can mount with:

$ sudo mkdir -p /media/user/storage && sudo mount /dev/mapper/vg1-storage /media/user/storage

But I wanted it to be automatic like the other distros.

The LVMs show up on Thunar/pcmanfm's sidebar on other distros after unlocking the VG. It isn't the case on my install.

Other distros (esp. the minimal ones, like Arch, Void) have this kind of problem too. After I install gvfs, add dbus-launch and reboot usually everything works. But not happening here. udiskctl is just to show you the output, I dont use it either.

#21 Other Issues » Can't mount LUKS VG LVMs - Failed to activate device: File exists » 2020-07-07 13:46:13

john2009w
Replies: 10

Recently I installed Devuan 2 ASCII on an LVM inside a LUKS encrypted VG. I couldn't find a way to install Devuan on an existing VG in the installer. So I installed it with debootstrap. Later I upgraded to Devuan 3 Beowulf.

The problem is that Devuan boots just fine, but I can't mount any LVMs inside my VG that Devuan is booting from. I tried:

$ sudo udisksctl unlock -b /dev/sda2
Passphrase: 
Error unlocking /dev/sda2: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error unlocking /dev/sda2: Failed to activate device: File exists
$ sudo udisksctl mount -b /dev/mapper/vg1-storage
Error looking up object for device /dev/mapper/vg1-storage
$ sudo vgscan | grep vg1
  Found volume group "vg1" using metadata type lvm2
$ sudo lvscan | grep storage
  ACTIVE            '/dev/vg1/storage' [xxx GiB] inherit

Even Thunar and pcmanfm is failing to do so, while pcmanfm just repeats the message on terminal "Error unlocking /dev/sda2: Failed to activate device: File exists" and Thunar silently fails. Tried so many config changes around the web, but didn't help.

Thinking that this is occuring due to booting and mounting from the same VG, I tried another USB device with a VG, and I think I was right. It works:

$ sudo udisksctl unlock -b /dev/sdb2
Passphrase: 
Unlocked /dev/sdb2 as /dev/dm-8.
$ sudo vgchange -ay vg32
  3 logical volume(s) in volume group "vg32" now active
$ sudo udisksctl mount -b /dev/mapper/vg32-root32
Mounted /dev/dm-10 at /media/root/root32.

I can click and mount the other LVMs from /dev/sdb2 like normal (but not /dev/sda2). So the issue is only with the VG I'm currently running Devuan from.

I am using Openbox and I start it in ~/.xinitrc with exec dbus-launch openbox-session. My user is on users sys adm disk cdrom floppy sudo audio dip www-data video plugdev groups. Other OSs like Trisquel, Void Linux and Parabola just either works out of the box or had to dbus-launch the session, but Devuan is having this issue.

Please help!!

Board footer

Forum Software